emacs-devel
[Top][All Lists]
Advanced

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

Re: [rant] Should reverting a buffer really discard undo history?


From: Daniel Brockman
Subject: Re: [rant] Should reverting a buffer really discard undo history?
Date: Tue, 31 May 2005 04:30:31 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Jonathan Yavner <address@hidden> writes:

>> the first thing I did following this incident was to set
>> 'version-control' to t, and curse myself for not doing so earlier.
>
> This sounds like a work-around.  Why isn't "revert" an undoable
> operation?

It makes no sense to me.  I have not yet found the approximately
two-year-old thread that Stefan mentioned.

> Maybe it would cost too much RAM when reverting a 64 MB file,

Reverting a 64 MB file would cause the undo information to be
discarded anyway unless your `undo-outer-limit' was set really high.

> but for typical files on today's computers we can afford to treat
> the entire buffer text as having been replaced.

Yes, I very rarely, if ever, open files whose size exceed the default
value of `undo-outer-limit' (about three megabytes).

Anyway, the undo information will be saved for `C-x h C-w' followed by
`C-x i large-file RET'.  So why not for `M-x revert-buffer RET'?

<off-topic>

>> you cannot use Customize to, e.g., bind keys.

Johan Bockgård linked to this thread on IRC a while ago:

<http://lists.gnu.org/archive/html/emacs-devel/2003-12/msg00682.html>

> Nor can you use it to define your own functions that will be bound
> to keys.

I don't see any point in doing this from a Customize buffer.
Simple lambdas could be specified inline in a key binding widget, but
larger functions should really be defined separately, so that you can
format them nicely, comment them, and so on.

> Nor can it deal with conditional code in your .emacs dealing with
> platforms other than the one you're using at the moment.

That is a problem, but a very complex problem.  In my experience,
simply setting an option to different values depending on the platform
is rarely sufficient.  (I regret not being able to cite an example
from my init file.)

</off-topic>

-- 
Daniel Brockman <address@hidden>





reply via email to

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