From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#21684: 25.0.50; undo in query-replace w/o exit Date: Sun, 18 Oct 2015 00:49:46 +0300 Organization: LINKOV.NET Message-ID: <87r3kt5fnp.fsf@mail.linkov.net> References: <87k2qpmna2.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445118750 31315 80.91.229.3 (17 Oct 2015 21:52:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2015 21:52:30 +0000 (UTC) Cc: 21684@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 17 23:52:19 2015 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 1ZnZOj-0000KW-GT for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Oct 2015 23:52:17 +0200 Original-Received: from localhost ([::1]:59884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnZOd-0002VA-P5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Oct 2015 17:52:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnZOZ-0002Uu-M5 for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2015 17:52:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnZOU-0001tM-Ll for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2015 17:52:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnZOU-0001t7-IB for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2015 17:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZnZOU-0006J7-6o for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2015 17:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Oct 2015 21:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21684 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 21684-submit@debbugs.gnu.org id=B21684.144511868324200 (code B ref 21684); Sat, 17 Oct 2015 21:52:02 +0000 Original-Received: (at 21684) by debbugs.gnu.org; 17 Oct 2015 21:51:23 +0000 Original-Received: from localhost ([127.0.0.1]:54650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZnZNr-0006IF-86 for submit@debbugs.gnu.org; Sat, 17 Oct 2015 17:51:23 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:46851 helo=homiemail-a12.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZnZNo-0006I7-Qu for 21684@debbugs.gnu.org; Sat, 17 Oct 2015 17:51:21 -0400 Original-Received: from homiemail-a12.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTP id 6CE351030063; Sat, 17 Oct 2015 14:51:19 -0700 (PDT) Original-Received: from localhost.linkov.net (m212-119-129-196.cust.tele2.ee [212.119.129.196]) (Authenticated sender: jurta@jurta.org) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTPA id 6FE6C103005E; Sat, 17 Oct 2015 14:51:18 -0700 (PDT) In-Reply-To: (Tino Calancha's message of "Sat, 17 Oct 2015 22:04:44 +0900 (JST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107702 Archived-At: > See new patch (replace-2.patch): AFAICS is working as i wanted. > Please try it and feel free to give me any comments if you > find some issues to fix/improve. Thank you, your patch is working well. One issue to improve I noticed that when a previous replacement is skipped with "n" then undo "U" acts exactly as backup "^" by going to the previous place, and doing no undo actually. Maybe better would be for undo "U" to only undo and skip non-replacement entries in the stack? (Implementation-wise this means looping until finding a previous non-replacement entry in the stack). A minor comment is that to save cons cells you could just put both new elements shallow as elements 3 and 4 in the stack instead of adding a list of them. Another minor suggestions is for better names you could rename the prefix -solved-regexp to -replaced, i.e. replace search-string-solved-regexp, next-replacement-solved-regexp with search-string-replaced, next-replacement-replaced. Also we need this feature to be documented in etc/NEWS. Have you already signed FSF copyright assignment papers? Your patch for bug#21663 is short enough to be installed without the copyright paperwork, but your changes for bug#21684 require it.