[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Errors in interactive commands
From: |
David Kastrup |
Subject: |
Re: Errors in interactive commands |
Date: |
Wed, 03 Aug 2011 10:08:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Andreas Röhler <address@hidden> writes:
> Am 03.08.2011 09:28, schrieb Stephen J. Turnbull:
>> Andreas Röhler writes:
>>
>> > A move-forward at the end of the buffer isn't a wrong command as such,
>> > just will not be successful.
>> >
>> > Therefor it should not be raised an error, just nil returned.
>>
>> This is problematic, IMO. Suppose you have a buffer which is supposed
>> to have an even number of objects in it, and you want to delete every
>> second then. Then
>>
>> (progn
>> (goto (point-min))
>> (while (not (eobp))
>> (forward-object 2)
>> (delete-object -1)))
>>
>> DTRTs, including detecting the "incorrect state" of an odd number of
>> objects, and not deleting the first object on an incomplete last line.
[...]
> Nonetheless think arguments are wrong here, mixing up two levels of
> execution.
>
> To get what you want, it's a state-of-affairs variable to introduce
> pointing at the action.
>
> Ie 'Delete-every-second' is the matter at stake, whilst "forward-"
> below resp. inside.
>
> With a little bit pseudo-code introduced:
>
> (progn
> (goto (point-min))
> (while (and (QUERY Delete-every-second-state)(not (eobp)))
> (forward-object 2)
> (delete-object -1)
> (UPDATE Delete-every-second-state)))
>
> Useful return values of "forward-" is important for a wide range of
> things, not just to serve several specific cases.
>
> Sorting execution levels might be the term at stake.
> Would like to read another term from experts. Pretty sure exists some
> in informatics.
I consider it likely that most experts would take the term
"befuddlement" into close consideration. I consistently fail to
recognize a logical connection between your postings and what they are
supposed to be a reply to.
--
David Kastrup