From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Brockman Newsgroups: gmane.emacs.devel Subject: Re: [rant] Should reverting a buffer really discard undo history? Date: Tue, 31 May 2005 04:30:31 +0200 Message-ID: <87wtpg3z5k.fsf@wigwam.deepwood.net> References: <200505302028.25944.jyavner@member.fsf.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1117507283 1168 80.91.229.2 (31 May 2005 02:41:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 May 2005 02:41:23 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 31 04:41:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DcwgZ-0002uK-By for ged-emacs-devel@m.gmane.org; Tue, 31 May 2005 04:40:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DcwlZ-000162-5m for ged-emacs-devel@m.gmane.org; Mon, 30 May 2005 22:46:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dcwki-0000sg-4u for emacs-devel@gnu.org; Mon, 30 May 2005 22:45:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dcwi1-0000He-7k for emacs-devel@gnu.org; Mon, 30 May 2005 22:42:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dcwhx-00006w-Ls for emacs-devel@gnu.org; Mon, 30 May 2005 22:42:21 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DcwWS-0000De-G5 for emacs-devel@gnu.org; Mon, 30 May 2005 22:30:28 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DcwS8-0001vc-Ss for emacs-devel@gnu.org; Tue, 31 May 2005 04:26:00 +0200 Original-Received: from c-4fb670d5.028-10-67766c2.cust.bredbandsbolaget.se ([213.112.182.79]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 May 2005 04:26:00 +0200 Original-Received: from daniel by c-4fb670d5.028-10-67766c2.cust.bredbandsbolaget.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 May 2005 04:26:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 53 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c-4fb670d5.028-10-67766c2.cust.bredbandsbolaget.se X-Face: :&2UWGm>e24)ip~'K@iOsA&JT3JX*v@1-#L)=dUb825\Fwg#`^N!Y*g-TqdS AevzjFJe96f@V'ya8${57/T'"mTd`1o{TGYhHnVucLq!D$r2O{IN)7>.0op_Y`%r;/Q +(]`3F-t10N7NF\.Mm0q}p1:%iqTi:5]1E]rDF)R$9.!,Eu'9K':y9^U3F8UCS1M+A$ 8[[[WT^`$P[vu>P+8]aQMh9giu&fPCqLW2FSsGs User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:2YgymrssXfdZumZR71GqNO4Nv0Y= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:37915 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37915 Jonathan Yavner 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'? >> you cannot use Customize to, e.g., bind keys. Johan Bockgård linked to this thread on IRC a while ago: > 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.) -- Daniel Brockman