unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Brockman <daniel@brockman.se>
Subject: Re: [rant] Should reverting a buffer really discard undo history?
Date: Tue, 31 May 2005 04:30:31 +0200	[thread overview]
Message-ID: <87wtpg3z5k.fsf@wigwam.deepwood.net> (raw)
In-Reply-To: 200505302028.25944.jyavner@member.fsf.org

Jonathan Yavner <jyavner@member.fsf.org> 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 <daniel@brockman.se>

  reply	other threads:[~2005-05-31  2:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1DcrBs-0005I0-W6@monty-python.gnu.org>
2005-05-31  0:28 ` [rant] Should reverting a buffer really discard undo history? Jonathan Yavner
2005-05-31  2:30   ` Daniel Brockman [this message]
2005-05-30 19:57 Daniel Brockman
2005-05-30 21:28 ` Stefan Monnier
2005-05-30 21:56   ` Juanma Barranquero
2005-05-30 21:58   ` Lennart Borgman
2005-06-01 23:19   ` Dan Nicolaescu
2005-06-01 23:31     ` Stefan Monnier
2005-06-02 18:10       ` Dan Nicolaescu
2005-06-03 22:30         ` Richard Stallman
2005-05-31 17:47 ` Richard Stallman
2005-05-31 18:23   ` Drew Adams
2005-06-01 17:25     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wtpg3z5k.fsf@wigwam.deepwood.net \
    --to=daniel@brockman.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).