From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.bugs Subject: bug#22295: viper-mode undo bug introduced between Nov 10 and Nov 14 Date: Tue, 17 May 2016 09:46:19 +0100 Message-ID: <87futh5axw.fsf@russet.org.uk> References: <83vb2h6lfq.fsf@gnu.org> <83r3d56jrg.fsf@gnu.org> <87poso7nf5.fsf@russet.org.uk> <878tzatbte.fsf@russet.org.uk> <83zirq3qt4.fsf@gnu.org> <5739FFDD.8080206@cs.stonybrook.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1463475209 11317 80.91.229.3 (17 May 2016 08:53:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 May 2016 08:53:29 +0000 (UTC) Cc: 22295@debbugs.gnu.org, Jim Meyering To: Michael Kifer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 17 10:53:16 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 1b2akd-0007am-ID for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 May 2016 10:53:15 +0200 Original-Received: from localhost ([::1]:49344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2akc-0002WJ-KJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 May 2016 04:53:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2akX-0002OL-Ot for bug-gnu-emacs@gnu.org; Tue, 17 May 2016 04:53:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2akR-0002Oc-3J for bug-gnu-emacs@gnu.org; Tue, 17 May 2016 04:53:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2akQ-0002OX-W0 for bug-gnu-emacs@gnu.org; Tue, 17 May 2016 04:53:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b2akQ-0004Uc-RO for bug-gnu-emacs@gnu.org; Tue, 17 May 2016 04:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 May 2016 08:53: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.146347515417210 (code B ref 22295); Tue, 17 May 2016 08:53:02 +0000 Original-Received: (at 22295) by debbugs.gnu.org; 17 May 2016 08:52:34 +0000 Original-Received: from localhost ([127.0.0.1]:54675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2ajy-0004TP-HA for submit@debbugs.gnu.org; Tue, 17 May 2016 04:52:34 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:38795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2aju-0004Sb-CU for 22295@debbugs.gnu.org; Tue, 17 May 2016 04:52:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:References:Message-ID :Date:In-Reply-To:Subject:Cc:To:From; bh=RUDw0l6kpk10HRd8hEoDiP9BU+NUur4qHOeGfYttV8Y=; b=oaq26K15RHf6ltxKF6/5h6gWnN VuQpX/CYTYkJaLZ71iRXHQ0mXA5t5HN7HtXSU6nWjmuy8cwH/IsoyLhumdO90pG3Hnq/1Dk4shjPT OGumKiFkXuOEUobSr9tJomg8XYTJB7m3m4F9VWOM1c9JrOalDJTNGdd6lzjV0Xvw/ejYJTMhyNc64 vJ/030B/Aa4ovv6hOFPhUVtZilr7pmigFRBn3Aqti6ggnu+BWpVDrrbRUNZWBvU+1DtD5whVK4QVq 17fNXHf+TVOdXZzcReOMMzKjK4iLSY8d7TcMimkbBorTy1r2XOIMClqnbUMXuIFgQGQaZgfp1CBwn g10R1koQ==; Original-Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:46422 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b2ajo-000Pc4-AB; Tue, 17 May 2016 09:52:24 +0100 In-Reply-To: <5739FFDD.8080206@cs.stonybrook.edu> (Michael Kifer's message of "Mon, 16 May 2016 13:14:05 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk 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:118343 Archived-At: Michael Kifer writes: >> You see, when I said this is undocumented, I meant precisely that: the >> expected effect of 'undo' in VI is not described, so someone who is >> not a VI user doesn't know what to test and how to program that. > > In VI, an undo is supposed to undo the effect of the previous VI > command. In Emacs terms, each such command usually means several > inserts and deletes, which in Emacs would be undone via a series of > undos. Such behavior is a non-no to a vi user. Actually, by default inserts and (simple) deletes are amalgamated by Emacs and undone in chunks of 20 rather than one at a time. > I was referring to the insertion of a special marker into the undo > list. Obviously, the usual Vi conventions are not documented because > this would require to duplicate the Vi manual. Actually, that would be a useful statement to have. Viper may replicate "vi" behaviour, although I don't have a copy of vi to test it on. It doesn't replicate vim's undo. >> Another alternative is to make viper use the default Emacs undo, and >> then ask you and other users of viper to tell where the results don't >> match your expectations. It could well be that starting with a clean >> slate will get us to the goal faster and with less complex code. > > This would be a non-starter and would cause a mass migration to vim. > The undo would also then be implementation dependent. If, say, "delete > 2 words" is implemented differently from how it is now then it would > be undone via a different sequence of commands. People will get a different sequence of commands if they migrate to vim also! Anyway, I have sent more code upstream. It changes the implementation, but (hopefully) will preserve the currrent behaviour. Phil