From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Espen Newsgroups: gmane.emacs.help Subject: Re: Reverting but keeping undo Date: Wed, 29 May 2013 09:25:44 -0400 Organization: A noiseless patient Spider Message-ID: References: <87mwrwede7.fsf@wanadoo.es> <8738t6tqie.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369840180 5103 80.91.229.3 (29 May 2013 15:09:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 May 2013 15:09:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 29 17:09:41 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uhi0S-0003zu-LO for geh-help-gnu-emacs@m.gmane.org; Wed, 29 May 2013 17:09:40 +0200 Original-Received: from localhost ([::1]:59893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhi0S-00028d-5Q for geh-help-gnu-emacs@m.gmane.org; Wed, 29 May 2013 11:09:40 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 89 Injection-Info: mx05.eternal-september.org; posting-host="b8816fa7300cd668c1c8ea38fc847e8a"; logging-data="2788"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+N+E8SecX2TbKWs1mPNq1OpniCZqcwT7k=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) Cancel-Lock: sha1:fuiUFaY99p147pCZxyWJtWysAQ4= sha1:J2CsTVCKCpCEls+hLhmh/qzSxcE= Original-Xref: usenet.stanford.edu gnu.emacs.help:198865 X-Mailman-Approved-At: Wed, 29 May 2013 11:09:27 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91136 Archived-At: Drew Adams writes: >> >> FWIW, I just installed a patch in Emacs's trunk which makes that >> >> revert-buffer doesn't discard undo history any more. >> > >> > Hm. So `revert-buffer' no longer removes undo? That has always been a >> > part of what reverting means. And it is clearly intended in the code, >> > not just an unfortunate accident or oversight. >> >> I think it's a great change. >> >> > And why no discussion beforehand? > > Yes, why? Any good reason? > >> > I can't think of a great reason why >> > undo should *always* be removed as part of reverting (as it always has >> > been). But just maybe there is a good reason for doing that, at least >> > some or even most of the time. Why not give Richard et al the benefit >> > of the doubt (30 years of "classic" reverting) and make undo removal >> > optional, at least for a while? (Or is doubt a no-no?) >> >> Are you, personally, asking for it to be customizable? > > Code and users should control whether to get the new behavior or the > behavior they've had for the last 3 decades. (Sure, users can add > back code themselves to empty the undo list and get back the former > behavior...) > >> What's your use case for throwing away the undo list? > > That's what reverting is about: returning to an initial state. The > undo list did not exist when the buffer was first visited - a new > buffer has no undo. Reverting generally means starting over from > scratch - i.e., putting things in the same state they had at the > outset (since the last save). > > Yes, there are some exceptions - some buffers have special reverting > behavior. And yes, we can define Emacs to be anything. We can change > what reverting means generally in Emacs, if we want. But such a basic > change calls for a little discussion at emacs-devel, don't you think? > > Maybe someone wants to keep some highlighting they applied in the > buffer too, or keep some local variables, or... A similar argument > could be made for keeping all sorts of changes to the buffer state > after "reversion". But generally the way to make any such > design/behavior change is to first propose and discuss in > emacs-devel@gnu.org. > > There might well be someone out there who, "personally" or not (?), > has (another) good argument for keeping things the way they were - at > least as an option. Who knows? As Richard often says (especially for > changes to basic, longstanding behavior), why not poll the users? > > Do you "personally" know that no one wants to drop the undo list when reverting - whether interactively or in code? > > Don't you wonder that this came up now seemingly for the first time? > Do you think that no one has thought before about whether the undo > list should be kept or dropped when reverting? A bit presumptuous, > no? > > Give those who designed and first implemented buffers and buffer > reverting the benefit of the doubt, at least to start with. They were > not necessarily right, but they were not obviously wrong, which is > seemingly the way you look at it. To you it is apparently a > no-brainer that undo should not be dropped - how silly they were in > the old days... > > Has something changed recently that suddenly makes the original design > no longer appropriate? What's new here? Facebook? Mobile apps? The > Kardashians? Why should this behavior be changed now - why not > before? > > Think about it a bit more. Open it for discussion on emacs-devel. Why act so precipitously? Is that "personally" necessary? Reading through all that, I can only conclude that you can't think of any reason why retaining undo history is bad. Tradition or it used to work that way is ridiculous. I can easily think of reasons why it's good. I control compilation with file variables. If I change the file variables, a revert makes Emacs aware of the new values. I certainly don't want to lose my undo history. I say, great change. -- Dan Espen