emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undo discard prompt


From: Stefan Monnier
Subject: Re: Undo discard prompt
Date: Wed, 26 Jan 2005 09:48:18 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

>> Now I can also undo it by using diff-unified->context, so if I could
>> replace the large undo entries with just one entry that says "call
>> diff-unified-> context" it would not be a problem any more.
>> 
>> The idea of extensible undo entries is interesting, but using it for
>> composite operations such as this would be unreliable.  It is better
>> to undo them based on their actual edits.

> I don't think it would be unreliable in practice.

Well, in the case of diff-u->c and diff-c->u, it might indeed not be 100%
reliable with the current code.

> In cua-mode, I also needed more advanced undo information to make undo
> work correctly for the advanced rectangle commands.

We really need to keep a file of "HACKS" that we should get rid of.
It would contain things like defadvice that someone had to use to work
around the lack of a hook (e.g. for uniquify), or other such things that try
to workaround the lack of a particular feature.

> If the standard undo list just had some form of "eval this form to undo"
> entry, it would give a lot of flexibility.

The SES author had tried to get such a feature accepted.  IIRC when we
talked about it, the proposal looked something like: add support for undo
records of the form (funcall START END FUN ARGS), where START and END
describe the affected region.
We could already use such a feature in set-buffer-multibyte.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]