From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#22295: viper-mode undo bug introduced between Nov 10 and Nov 14 Date: Wed, 01 Jun 2016 20:11:37 -0400 Message-ID: References: <83vb2h6lfq.fsf@gnu.org> <83r3d56jrg.fsf@gnu.org> <87poso7nf5.fsf@russet.org.uk> <878tzatbte.fsf@russet.org.uk> <877fe85z1e.fsf@russet.org.uk> <574F62DD.4000506@cs.stonybrook.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464826347 6686 80.91.229.3 (2 Jun 2016 00:12:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jun 2016 00:12:27 +0000 (UTC) Cc: 22295@debbugs.gnu.org, Jim Meyering , Phillip Lord To: Michael Kifer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 02 02:12:15 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 1b8GFC-0008MU-RM for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jun 2016 02:12:14 +0200 Original-Received: from localhost ([::1]:44594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8GFC-0007YZ-1K for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jun 2016 20:12:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8GF5-0007YJ-UN for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 20:12:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8GF0-0002Z5-LK for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 20:12:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8GF0-0002Yl-I8 for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 20:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b8GF0-0005fm-5E for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 20:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jun 2016 00:12: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.146482630521783 (code B ref 22295); Thu, 02 Jun 2016 00:12:02 +0000 Original-Received: (at 22295) by debbugs.gnu.org; 2 Jun 2016 00:11:45 +0000 Original-Received: from localhost ([127.0.0.1]:50280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8GEi-0005fH-Rx for submit@debbugs.gnu.org; Wed, 01 Jun 2016 20:11:45 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:43407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8GEh-0005f4-AC for 22295@debbugs.gnu.org; Wed, 01 Jun 2016 20:11:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BVBQA731xV/y+tSC1cDoMChALHWIEOAoE9PBABAQEBAQEBgQqEIwEBAwF5EAsNJxIUGDEuiAkIzyMBAQEHAgEfizqBPYNIB4QtBZA0lUGPDyOBZiQND4EUWiKCeAEBAQ X-IPAS-Result: A0BVBQA731xV/y+tSC1cDoMChALHWIEOAoE9PBABAQEBAQEBgQqEIwEBAwF5EAsNJxIUGDEuiAkIzyMBAQEHAgEfizqBPYNIB4QtBZA0lUGPDyOBZiQND4EUWiKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="240201680" Original-Received: from unknown (HELO pastel.home) ([45.72.173.47]) by ironport2-out.teksavvy.com with ESMTP; 01 Jun 2016 20:11:37 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 524F763FDB; Wed, 1 Jun 2016 20:11:37 -0400 (EDT) In-Reply-To: <574F62DD.4000506@cs.stonybrook.edu> (Michael Kifer's message of "Wed, 1 Jun 2016 18:34:05 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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:118962 Archived-At: >> Oh dear. Yes, that is a problem. The difficulty is that viper modifies >> the undo-list, removing boundaries only *after* we leave insert mode. I don't see any difficulty in there. >> Viper's solution of introducing a 'viper symbol is a nice one, but has >> it's problems. Agreed. >> primitive-undo: Unrecognized entry in undo list viper > not in 25.0.50 viper worked fine with this for 20 years and I'd say > it is Emacs breakage, not Viper's. FWIW, Viper adds an entry to buffer-undo-list which is incompatible with the documented format of the entries, so while it worked, Viper was doing something unkosher. In any case it shouldn't be difficult to fix that problem. E.g. you could use (defconst viper--undo-marker '(1 . 1)) instead of a symbol. >> The deep problem here is that undo boundary == nil I know you like to think of it as a problem ;-) >> 1) Restore all the old viper code >> 2) Instead of adding a 'viper mark, copy the buffer-undo-list to >> "viper-old-buffer-undo-list". Don't copy, just (setq viper--original-undo-list buffer-undo-list). >> This is also quite a big change, and I worry about buffer compaction -- >> viper-old-buffer-undo-list would not be open for GC. Why not? This said, AFAIK the OP's problem may not be directly linked to the addition of a special symbol in the undo-list. We should first figure out what's actually going wrong there. Stefan