From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 18 10:04:26 2019 Received: (at submit) by debbugs.gnu.org; 18 Aug 2019 14:04:26 +0000 Received: from localhost ([127.0.0.1]:58317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzLnF-0002n3-Mo for submit@debbugs.gnu.org; Sun, 18 Aug 2019 10:04:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:49768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzLnD-0002mv-Bk for submit@debbugs.gnu.org; Sun, 18 Aug 2019 10:04:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52646) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzLnC-0005Sr-96 for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2019 10:04:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzLnB-0003VW-24 for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2019 10:04:22 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:44081) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzLnA-0003Uy-QT for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2019 10:04:21 -0400 Received: by mail-wr1-x429.google.com with SMTP id p17so6002806wrf.11 for ; Sun, 18 Aug 2019 07:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=xAAelrz5umkb8lw5p5rfKxpo0upYvzl+HfGPGTcu6yQ=; b=cC1y4Ufv8DPKxra6Ti/Ovz2An7Gsv/DlUy0ChBPAfBzgHcpWDCbb2SooYt+R2SUW6y y9Ygm+9il/tM3xBHYETxM3bBx1IkwB07JZqzFC91vSr4anVMbIx/sELAtIjLRVFmY8R5 uLVM/1TPKTOuXXimkmiB+qZy/gSDxFZatvcHD9PyA0NJNB1/fd6cBkPgF2Bc6KpoZu/L xEYKp+QTo4YK2cN7etcgawQ92HIYUg4mfVcAikad3ng+SASfLxalTVYEjV0EKBokR6xe Tn50vl5usggFYCZxQopirJCKxhhXqgJtpLRmNHiyCSnUvdEdQW1ZCwcJtZ4fqCuVLp9E 6LZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=xAAelrz5umkb8lw5p5rfKxpo0upYvzl+HfGPGTcu6yQ=; b=pXCadig59DjuszHmvSmaF7DfEtueYnZhb8czSXk4XUpmDAvmvUFGVYuafHZZOgGc9P IfyK4QjNoCYIiEPEU8H5/Qh4jco62qrQgq1ZBpBCwHTQFD9PlB3mkfeI1WNKvet1XdRK lGkS7UqS5nJHYtdzSjX5Rw0DLTukhhcVnFACTWeHW+gsinvQaYTKErOowb5dUKVXcbXo 4oIGtff6QNRN1rwrVx7zpcnp7dCn6iAKpeClpmVZgwE+HSGfRqABgmacrI3Rr4Lt4Mym sgYsKoLqIdOJAM9fhQxxZ/bZixXThfMSvERV4vIVKbQv1H9z1XwcIJNKqlrFjFNA7Vmu rYjg== X-Gm-Message-State: APjAAAVP7WsHz7YXO2jJ/6ESd0j+T8fgUNtG1WeYfcdo7gxIz/YlD3KB o+S6SOi0DMOU7dEFGNlNhJX7T7WeUvI= X-Google-Smtp-Source: APXvYqw87XTryk2SQdbcpAZwtRPuRqG6DYXlamTM4Y31NnEarsvE66SYkG9gN1AmKpAeY3uemVnzcg== X-Received: by 2002:adf:db03:: with SMTP id s3mr10316157wri.214.1566137059046; Sun, 18 Aug 2019 07:04:19 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp ([2a02:8308:70c5:4d00:a2fc:1435:82df:8682]) by smtp.gmail.com with ESMTPSA id a23sm20168226wma.24.2019.08.18.07.04.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Aug 2019 07:04:18 -0700 (PDT) From: Tino Calancha To: bug-gnu-emacs@gnu.org Subject: 26.2.90; query-replace-regexp undo feature missing quote the regexps Date: Sun, 18 Aug 2019 16:04:00 +0200 Message-ID: <87h86elgdr.fsf@calancha-pc.dy.bbexcite.jp> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Tags: patch That causes the undo feature to fail if the replacement contains special characters. emacs -Q C-x b *foo* RET M-: (insert "theorem 1\ntheorem 2\ntheorem 3") RET M-< M-C-% theorem \([0-9]+\) RET \,(format "theorem \\ref{theo_%s}" \1) RET SPC SPC u q ;; Buffer *foo* now contains: theorem 1ref{theo_1} theorem 2ref{theo_2} theorem 3 ;; Expected: theorem 1 theorem 2 theorem 3 --8<-----------------------------cut here---------------start------------->8--- commit 9f9c56cfa99b1e6fe296ec591ab335521e185e55 Author: Tino Calancha Date: Sun Aug 18 15:57:59 2019 +0200 Fix query-replace-regexp undo feature * lisp/replace.el (perform-replace): Quote regexp (Bug#37073). * test/lisp/replace-tests.el (query-replace-undo-bug37073): Add test diff --git a/lisp/replace.el b/lisp/replace.el index 08feb8eae7..fb703abd92 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2614,7 +2614,7 @@ perform-replace (setq real-match-data (save-excursion (goto-char (match-beginning 0)) - (looking-at search-string) + (looking-at (regexp-quote search-string)) ; Bug#37073 (match-data t (nth 2 elt))) noedit (replace-match-maybe-edit diff --git a/test/lisp/replace-tests.el b/test/lisp/replace-tests.el index cd30633e37..f96bd9cf05 100644 --- a/test/lisp/replace-tests.el +++ b/test/lisp/replace-tests.el @@ -454,5 +454,15 @@ replace-tests--query-replace-undo input "a" "B" ((?\s . (1 2 3)) (?E . (4)) (?U . (5))) ?q (string= input (buffer-string)))))) +(ert-deftest query-replace-undo-bug37073 () + "Test for https://debbugs.gnu.org/37073 ." + (let ((input "theorem 1\ntheorem 2\ntheorem 3")) + (should + (replace-tests-with-undo + input "theorem \\([0-9]+\\)" + "theorem \\\\ref{theo_\\1}" + ((?\s . (1 2)) (?U . (3))) + ?q + (string= input (buffer-string)))))) ;;; replace-tests.el ends here --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.2.90 (build 19, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-08-18 built Repository revision: 3f00db7ca6d40312651a302842561e7fb168ee99 From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 18 17:10:18 2019 Received: (at 37073) by debbugs.gnu.org; 18 Aug 2019 21:10:18 +0000 Received: from localhost ([127.0.0.1]:58838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzSRN-0003rd-Sf for submit@debbugs.gnu.org; Sun, 18 Aug 2019 17:10:18 -0400 Received: from camel.birch.relay.mailchannels.net ([23.83.209.29]:26569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzSRL-0003rP-NY for 37073@debbugs.gnu.org; Sun, 18 Aug 2019 17:10:16 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A10002C1DB1; Sun, 18 Aug 2019 21:10:14 +0000 (UTC) Received: from pdx1-sub0-mail-a11.g.dreamhost.com (100-96-35-20.trex.outbound.svc.cluster.local [100.96.35.20]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 101C82C27FC; Sun, 18 Aug 2019 21:10:14 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a11.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Sun, 18 Aug 2019 21:10:14 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Cooperative-Shelf: 446f107647eca5ca_1566162614470_1118977026 X-MC-Loop-Signature: 1566162614470:3104855986 X-MC-Ingress-Time: 1566162614470 Received: from pdx1-sub0-mail-a11.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a11.g.dreamhost.com (Postfix) with ESMTP id 16CC783CDF; Sun, 18 Aug 2019 14:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=JvrAzvaS/7nneK3mQjpjF/hMfU8=; b= d7RO+oQumY8zseZEJFoxestBQTH4tD9bgluGuCwNFVCGvzP5axZo8P2u0I3pP6K0 ksjXQ6xisAHK3wU+UVBjC2xJHSVLK1+GWzlM01TGzYajmUjdInzb3dn7iYpe7+XZ yieEWhPpur4OFkVShPBkL7Xzr0/4gllJf1+D2znPmuU= Received: from mail.jurta.org (m91-129-109-163.cust.tele2.ee [91.129.109.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a11.g.dreamhost.com (Postfix) with ESMTPSA id 7F99683CEA; Sun, 18 Aug 2019 14:10:08 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a11 From: Juri Linkov To: Tino Calancha Subject: Re: bug#37073: 26.2.90; query-replace-regexp undo feature missing quote the regexps Organization: LINKOV.NET References: <87h86elgdr.fsf@calancha-pc.dy.bbexcite.jp> Date: Mon, 19 Aug 2019 00:06:20 +0300 In-Reply-To: <87h86elgdr.fsf@calancha-pc.dy.bbexcite.jp> (Tino Calancha's message of "Sun, 18 Aug 2019 16:04:00 +0200") Message-ID: <87ftlygpb7.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudefjedgudehiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledrudeifeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrdduieefpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepthhinhhordgtrghlrghntghhrgesghhmrghilhdrtghomhenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37073 Cc: 37073@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > That causes the undo feature to fail if the replacement contains special characters. Thanks. Are there other looking-at/looking-back occurrences in perform-replace that are looking at non-regexp strings? > commit 9f9c56cfa99b1e6fe296ec591ab335521e185e55 > Author: Tino Calancha > Date: Sun Aug 18 15:57:59 2019 +0200 > > Fix query-replace-regexp undo feature > > * lisp/replace.el (perform-replace): Quote regexp (Bug#37073). > * test/lisp/replace-tests.el (query-replace-undo-bug37073): Add test This looks good, but please ask Eli about pushing it to emacs-26 branch. Recently we fixed another problem exactly in the same place, but pushed the fix to the master. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 19 11:17:09 2019 Received: (at 37073) by debbugs.gnu.org; 19 Aug 2019 15:17:09 +0000 Received: from localhost ([127.0.0.1]:60426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzjPB-0001YD-Bi for submit@debbugs.gnu.org; Mon, 19 Aug 2019 11:17:09 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:33083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzjP8-0001Xm-Uq for 37073@debbugs.gnu.org; Mon, 19 Aug 2019 11:17:08 -0400 Received: by mail-wr1-f41.google.com with SMTP id u16so9133102wrr.0 for <37073@debbugs.gnu.org>; Mon, 19 Aug 2019 08:17:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:in-reply-to:message-id:mime-version; bh=/mNqZTRcRZdVNiNirbwGkFKyO2ZdqFvh2lVzFUbTM8o=; b=pNoJjTvAfhAOfKnpDzzN8k+g2VO7ZQjpOXvqHkFWgxmfNXg04RLEuDcZsokEH0aTM3 52IEbSQXvpFwtSWtJUNiJbK6D40/NBTdXjxtddgnaxI27owyt9djQjIuEnXF5BJYUW/v Okpg3Mka6UmX1JTbgJ4oKTKZrRvFwIPB8z3BtOT7P+g5mSEIoHlKZTMhwg73ArwqcsAD eOlbW5AIGvJSUQLPOMzM+hvBYuiQJFCyhgu1ZPOOQ2rHB1IFbSqCAnkcy75JUsgGhwv2 swW/xOQ5MESh5wbrjTCIYyFgXEFvoBlOpCqcy09mpTDHuPH4XDF1eiAO1R2D7jo86ZzS 6o7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:in-reply-to:message-id :mime-version; bh=/mNqZTRcRZdVNiNirbwGkFKyO2ZdqFvh2lVzFUbTM8o=; b=M8cn/v9SrigQvsqzndaUBbhSimH22xfxIGi9qPKlkhiyejhGughHrSERlk03bWwlEK mQwX1YWhw3mcGp0pThxSnb69Z0IAfu+XD5dSws4UwWyYPM0YZEoA9BQ8BW/dtKZcM0WB fLQXCnUbXUkgLQUH0R2KZCOAsUDpzrP3X+GvYEz/ey+me6YhdTGF58RoFxla7H0sAjSF GjV2iYCT1mN1pZ8yZ6EceAUVQnGwf4mqBqKF50gdFOJi9yqqzaBkhLb3JO6ttmMPgqbG NIuYrYhhhrdrpEos8pXL073Uv2w4WrAMUOwgkXSGB8VK8MpR3kcbEWt5XjhhDutdJlBs m3iQ== X-Gm-Message-State: APjAAAWvbGMZfRE20Ygx5TfyVPn0MoDQozDy6JRPJdAFqafA5P8LyCm7 /QR3W2wZ/QYmAa80JK09SYE= X-Google-Smtp-Source: APXvYqxKKCIvxp+AWXmlOSuvkDz5KGLqozMtuM5dK3hTD7XCom7zYcJc9jZu79crRysSUvuPKljI4Q== X-Received: by 2002:adf:f008:: with SMTP id j8mr12512170wro.129.1566227821027; Mon, 19 Aug 2019 08:17:01 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp ([2a02:8308:70c5:4d00:a2fc:1435:82df:8682]) by smtp.gmail.com with ESMTPSA id g197sm10744490wme.30.2019.08.19.08.16.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 08:17:00 -0700 (PDT) From: Tino Calancha To: Juri Linkov Subject: Re: bug#37073: 26.2.90; query-replace-regexp undo feature missing quote the regexps Date: Mon, 19 Aug 2019 17:16:55 +0200 In-Reply-To: Juri Linkov's message of "Mon\, 19 Aug 2019 00\:06\:20 +0300 \(18 hours\, 3 minutes\, 15 seconds ago\)" Message-ID: <87d0h1kwwo.fsf@calancha-pc.dy.bbexcite.jp> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37073 Cc: Eli Zaretskii , 37073@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >Thanks. Are there other looking-at/looking-back occurrences >in perform-replace that are looking at non-regexp strings? Yes, there is another one affecting the same feature (see updated patch at the end). >This looks good, but please ask Eli about pushing it to emacs-26 branch. >Recently we fixed another problem exactly in the same place, >but pushed the fix to the master. I see. Added Eli as CC. --8<-----------------------------cut here---------------start------------->8--- commit 6e58c32caaf34f914b64a6dbc976bc1e62c12d90 Author: Tino Calancha Date: Mon Aug 19 17:06:02 2019 +0200 Fix query-replace-regexp undo feature Ensure that non-regexp strings used with `looking-at' are quoted. * lisp/replace.el (perform-replace): Quote regexp (Bug#37073). * test/lisp/replace-tests.el (replace-tests-perform-replace-regexp-flag): New variable. (replace-tests-with-undo): Use it. (query-replace-undo-bug37073): Add tests. diff --git a/lisp/replace.el b/lisp/replace.el index 08feb8eae7..0ddebb1270 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2614,7 +2614,8 @@ perform-replace (setq real-match-data (save-excursion (goto-char (match-beginning 0)) - (looking-at search-string) + ;; We must quote the string (Bug#37073) + (looking-at (regexp-quote search-string)) (match-data t (nth 2 elt))) noedit (replace-match-maybe-edit @@ -2624,7 +2625,9 @@ perform-replace real-match-data (save-excursion (goto-char (match-beginning 0)) - (looking-at next-replacement) + (if regexp-flag + (looking-at next-replacement) + (looking-at (regexp-quote next-replacement))) (match-data t (nth 2 elt)))) ;; Set replaced nil to keep in loop (when (eq def 'undo-all) diff --git a/test/lisp/replace-tests.el b/test/lisp/replace-tests.el index cd30633e37..cd08a522e3 100644 --- a/test/lisp/replace-tests.el +++ b/test/lisp/replace-tests.el @@ -365,6 +365,9 @@ replace-occur-test-create (defvar replace-tests-bind-read-string nil "A string to bind `read-string' and avoid the prompt.") +(defvar replace-tests-perform-replace-regexp-flag t + "Value for regexp-flag argument passed to `perform-replace' in undo tests.") + (defmacro replace-tests-with-undo (input from to char-nums def-chr &rest body) "Helper to test `query-replace' undo feature. INPUT is a string to insert in a temporary buffer. @@ -412,7 +415,7 @@ replace-tests-with-undo (if replace-tests-bind-read-string (lambda (&rest args) replace-tests-bind-read-string) (symbol-function 'read-string)))) - (perform-replace ,from ,to t t nil)) + (perform-replace ,from ,to t replace-tests-perform-replace-regexp-flag nil)) ,@body)))) (defun replace-tests--query-replace-undo (&optional comma) @@ -454,5 +457,26 @@ replace-tests--query-replace-undo input "a" "B" ((?\s . (1 2 3)) (?E . (4)) (?U . (5))) ?q (string= input (buffer-string)))))) +(ert-deftest query-replace-undo-bug37073 () + "Test for https://debbugs.gnu.org/37073 ." + (let ((input "theorem 1\ntheorem 2\ntheorem 3")) + (should + (replace-tests-with-undo + input "theorem \\([0-9]+\\)" + "theorem \\\\ref{theo_\\1}" + ((?\s . (1 2)) (?U . (3))) + ?q + (string= input (buffer-string))))) + ;; Now run a test with regexp-flag arg in `perform-replace' set to nil + (let ((input " ^theorem$ 1\n ^theorem$ 2\n ^theorem$ 3") + (replace-tests-perform-replace-regexp-flag nil) + (expected " theo 1\n ^theorem$ 2\n ^theorem$ 3")) + (should + (replace-tests-with-undo + input "^theorem$" + "theo" + ((?\s . (1 2 4)) (?U . (3))) + ?q + (string= expected (buffer-string)))))) ;;; replace-tests.el ends here --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.2.90 (build 29, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-08-19 built Repository revision: 876a0c65c4f8a28dc2fbd4d2044321d5a8c48b1a From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 19 11:29:49 2019 Received: (at 37073) by debbugs.gnu.org; 19 Aug 2019 15:29:49 +0000 Received: from localhost ([127.0.0.1]:60438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzjbR-0001qQ-Cc for submit@debbugs.gnu.org; Mon, 19 Aug 2019 11:29:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzjbQ-0001qD-9o for 37073@debbugs.gnu.org; Mon, 19 Aug 2019 11:29:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hzjbK-0002Vp-SW; Mon, 19 Aug 2019 11:29:42 -0400 Received: from [176.228.60.248] (port=4433 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hzjbJ-0000ur-O7; Mon, 19 Aug 2019 11:29:42 -0400 Date: Mon, 19 Aug 2019 18:29:42 +0300 Message-Id: <83sgpxkwbd.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87ftlygpb7.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 19 Aug 2019 00:06:20 +0300) Subject: Re: bug#37073: 26.2.90; query-replace-regexp undo feature missing quote the regexps References: <87h86elgdr.fsf@calancha-pc.dy.bbexcite.jp> <87ftlygpb7.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37073 Cc: 37073@debbugs.gnu.org, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Mon, 19 Aug 2019 00:06:20 +0300 > Cc: 37073@debbugs.gnu.org > > > Fix query-replace-regexp undo feature > > > > * lisp/replace.el (perform-replace): Quote regexp (Bug#37073). > > * test/lisp/replace-tests.el (query-replace-undo-bug37073): Add test > > This looks good, but please ask Eli about pushing it to emacs-26 branch. I'm okay with pushing this to emacs-26, but please do it soon, because RC1 of 26.3 is in the works. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 19 11:36:34 2019 Received: (at 37073-done) by debbugs.gnu.org; 19 Aug 2019 15:36:34 +0000 Received: from localhost ([127.0.0.1]:60443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzjhy-00021V-57 for submit@debbugs.gnu.org; Mon, 19 Aug 2019 11:36:34 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:34548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzjhw-00021D-6B for 37073-done@debbugs.gnu.org; Mon, 19 Aug 2019 11:36:32 -0400 Received: by mail-wm1-f51.google.com with SMTP id e8so297537wme.1 for <37073-done@debbugs.gnu.org>; Mon, 19 Aug 2019 08:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:in-reply-to:message-id:mime-version; bh=Lf9c7TVFa4BSbiUc+VJTzRIWKWahmFlodW+DNCGZDu0=; b=CGRfYmgzzFiuDFjqJNizjorUy35otHVYYs3YbYPGRcRNSPs0I35gKcr1+gI8dUTSxZ 5LtMW8ar4dyPdPixlLdkO8Ph6aodG+Y3TgEucY2UnCGP6b+kV55uxTLFo58mk5WomfK5 rdW34+oyUiG1/X2Z0lPzB837+I1lpq1MZcfRAkJCb76pbWkGrItnHFJjVQOz+caNSU84 vhclza1DVUBPYiQIu+UT2uS43sJMnuAX1ehqiSteBrsXDXUYVIDYAPfk5MDDetOCf59t rl8/l0YoPMUm6hHB6dDecJqjkg1Ab0TAcsT7pIFl57R777V749ED7uWFR7r4Exwr8d5Z JxTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:in-reply-to:message-id :mime-version; bh=Lf9c7TVFa4BSbiUc+VJTzRIWKWahmFlodW+DNCGZDu0=; b=nC1litFyQ4E9PRVsG8oJFKsSIR9KgnWA50DtUmYbrNrMF/MZhmS1G+hjQKpBEnvXfV 3FvPfELsRVRee8OQyRVknTRMO1DOghwaJ3KlIRfvelGBhcT4XPY50KUo5zGfjq5eaMSX 78c5sHDo3pR4FL/xELdcZBFCzTPSTFGugDgXVqTAaZ9+5GSyU+DPyKQ0fnytTKC/Nzfd y9ACCWpdUyad3pkciBS38KZXNMvc1yK1ylxI8JiKgiUHGrpxPT6dsZRrmzDtqCPp1mNt UZA2tjb0bIy1V+ceglL9KCdQvcohPRuPG3pq42F22R7xOpkFBZB4IJ9AwGxXgY2Y/XNe 2NKQ== X-Gm-Message-State: APjAAAWgCj+keujFeh1deIupd0ubASG263bgMRZuMcr1I8XbWoa21HnA aCGu1EjZqsI2mZ9KUrG+qDIDzt6mDQA= X-Google-Smtp-Source: APXvYqxvSWZdx2tHTt3GKYD+rOOrn4BSHV37TKmNDRhY5sPYy4ZDQBshrEJffeAe7UPD2YkruI6LIg== X-Received: by 2002:a1c:2314:: with SMTP id j20mr21272819wmj.152.1566228985972; Mon, 19 Aug 2019 08:36:25 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp ([2a02:8308:70c5:4d00:a2fc:1435:82df:8682]) by smtp.gmail.com with ESMTPSA id n9sm20660588wrp.54.2019.08.19.08.36.24 for <37073-done@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 08:36:25 -0700 (PDT) From: Tino Calancha To: 37073-done@debbugs.gnu.org Subject: Re: bug#37073: 26.2.90; query-replace-regexp undo feature missing quote the regexps Date: Mon, 19 Aug 2019 17:36:23 +0200 In-Reply-To: Eli Zaretskii's message of "Mon\, 19 Aug 2019 18\:29\:42 +0300 \(4 minutes\, 36 seconds ago\)" Message-ID: <87a7c5kw08.fsf@calancha-pc.dy.bbexcite.jp> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37073-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> This looks good, but please ask Eli about pushing it to emacs-26 branch. >I'm okay with pushing this to emacs-26, but please do it soon, because >RC1 of 26.3 is in the works. Pushed into emacs-26 as commit 'Fix query-replace-regexp undo feature' (beb1d22260af2e03d80d34fcc1db212785a9d903) [Hopefully soon enough :-|] From unknown Sun Jun 15 08:11:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 17 Sep 2019 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator