From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22295: viper-mode undo bug introduced between Nov 10 and Nov 14 Date: Fri, 20 May 2016 13:00:20 +0300 Message-ID: <83iny982x7.fsf@gnu.org> References: <83vb2h6lfq.fsf@gnu.org> <83r3d56jrg.fsf@gnu.org> <87poso7nf5.fsf@russet.org.uk> <878tzatbte.fsf@russet.org.uk> <87k2it5bgh.fsf@russet.org.uk> <87wpmrvia7.fsf@russet.org.uk> <8737pfavrn.fsf@russet.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1463738491 28496 80.91.229.3 (20 May 2016 10:01:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 May 2016 10:01:31 +0000 (UTC) Cc: jwiegley@gmail.com, 22295@debbugs.gnu.org, phillip.lord@russet.org.uk To: Jim Meyering Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 20 12:01:19 2016 Return-path: Envelope-to: geb-bug-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 1b3hF9-0003Ui-Av for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 May 2016 12:01:19 +0200 Original-Received: from localhost ([::1]:54276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3hF5-0004pk-9M for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 May 2016 06:01:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3hEx-0004pC-LO for bug-gnu-emacs@gnu.org; Fri, 20 May 2016 06:01:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3hEs-0007pA-Fh for bug-gnu-emacs@gnu.org; Fri, 20 May 2016 06:01:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3hEs-0007p6-As for bug-gnu-emacs@gnu.org; Fri, 20 May 2016 06:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b3hEs-0005s2-2w for bug-gnu-emacs@gnu.org; Fri, 20 May 2016 06:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 May 2016 10:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22295 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22295-submit@debbugs.gnu.org id=B22295.146373843422520 (code B ref 22295); Fri, 20 May 2016 10:01:02 +0000 Original-Received: (at 22295) by debbugs.gnu.org; 20 May 2016 10:00:34 +0000 Original-Received: from localhost ([127.0.0.1]:58603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b3hEP-0005rA-Ri for submit@debbugs.gnu.org; Fri, 20 May 2016 06:00:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b3hEM-0005qv-4A for 22295@debbugs.gnu.org; Fri, 20 May 2016 06:00:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3hEC-0007jf-LU for 22295@debbugs.gnu.org; Fri, 20 May 2016 06:00:24 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3hE6-0007il-Bw; Fri, 20 May 2016 06:00:14 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3019 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b3hE4-0005uZ-Ao; Fri, 20 May 2016 06:00:12 -0400 In-reply-to: (message from Jim Meyering on Wed, 18 May 2016 18:09:36 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118472 Archived-At: > From: Jim Meyering > Date: Wed, 18 May 2016 18:09:36 -0700 > Cc: 22295@debbugs.gnu.org, John Wiegley , Eli Zaretskii > > On Wed, May 18, 2016 at 2:42 PM, Phillip Lord > wrote: > > Jim Meyering writes: > > > >> On Wed, May 18, 2016 at 2:15 AM, Phillip Lord > >> wrote: > >>> Yeah, I was adding two undo-boundaries to rather than just one. For no > >>> readily apparent reason I was directly changing the buffer-undo-list, > >>> rather than calling undo-boundary. > >>> > >>> Anyway, that should be fixed. > >> > >> Confirmed. > >> Thanks again for fixing all of that. > > > > > > Let me know if you find anything else. > > > > John, this is a reasonably extensive change now -- affecting both > > simple.el, but also a big rework of viper undo. > > > > To Emacs-25 or not to Emacs-25 that is the question? > > Perspective of a viper-mode user: including this fix in Emacs-25 is a > must: without it, any existing viper-mode user will very quickly > notice how "undo" appears to destroy data, seemingly unrecoverably, > since "redo" does not restore it -- they'd have to go look in emacs' > yank buffer. FWIW, I think this should go to emacs-25, since (a) the changes affect only viper-mode, and (b) users of that mode will be most unhappy without these changes. However, we should add comments to viper-cmd.el that document the special handling of 'undo' by viper-mode, and how that interacts with the core 'undo' functionalities. We should also comment in simple.el that undo-auto-disable-boundaries is used by viper-mode, and document that variable in the ELisp manual. Phillip, can you add these bits to the branch, please? Thanks.