From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 May 2015 21:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 20687@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14328475523991 (code B ref -1); Thu, 28 May 2015 21:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 May 2015 21:12:32 +0000 Received: from localhost ([127.0.0.1]:59839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yy56N-00012I-Po for submit@debbugs.gnu.org; Thu, 28 May 2015 17:12:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59972) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yy56L-000122-3g for submit@debbugs.gnu.org; Thu, 28 May 2015 17:12:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy56F-0006Mn-0E for submit@debbugs.gnu.org; Thu, 28 May 2015 17:12: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 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy56E-0006Mj-U0 for submit@debbugs.gnu.org; Thu, 28 May 2015 17:12:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy56D-0006t9-Mv for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:12:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy56A-0006Lf-Fb for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:12:21 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:33939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy56A-0006LU-96 for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 17:12:18 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4SLCGqg012695 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 28 May 2015 21:12:17 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t4SLCG2U004245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 28 May 2015 21:12:16 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t4SLCG5w004274 for ; Thu, 28 May 2015 21:12:16 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 28 May 2015 14:12:16 -0700 (PDT) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) You can bind any key you like in `query-replace-map'. But `perform-replace', in effect, hard-codes the keys that it recognizes. This is not necessary. You shbould be able to bind a new key in that map to some command, and have `perform-replace' invoke that command. All that's required for this is to add another `cond' clause, just before the final `t' (otherwise) clause, to do this: (cond ... (def (call-interactively def)) ; User-defined key - invoke it. (t ;; Note: we do not need to treat `exit-prefix' ;; specially here, since we reread ;; any unrecognized character. ...)) It seems silly for the code to be written like it is. We already look up the key you press in the q-r keymap. If we find a DEF that is not one of those predefined by Emacs then we ignore it? That makes no sense (to me). In GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2014-10-20 on LEG570 Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking=3Dyes,glyphs CPPFLAGS=3D-DGLYPH_DEBUG=3D1' From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jun 2015 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 20687@debbugs.gnu.org Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.14331920135729 (code B ref 20687); Mon, 01 Jun 2015 20:54:02 +0000 Received: (at 20687) by debbugs.gnu.org; 1 Jun 2015 20:53:33 +0000 Received: from localhost ([127.0.0.1]:36430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzWiC-0001UK-C0 for submit@debbugs.gnu.org; Mon, 01 Jun 2015 16:53:32 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:43711 helo=homiemail-a15.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzWiA-0001UC-Hn for 20687@debbugs.gnu.org; Mon, 01 Jun 2015 16:53:31 -0400 Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id C639C76C08C; Mon, 1 Jun 2015 13:53:29 -0700 (PDT) Received: from localhost.linkov.net (m213-100-241-26.cust.tele2.ee [213.100.241.26]) (Authenticated sender: jurta@jurta.org) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPA id CCCCC76C08A; Mon, 1 Jun 2015 13:53:28 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: Date: Mon, 01 Jun 2015 23:53:05 +0300 In-Reply-To: (Drew Adams's message of "Thu, 28 May 2015 14:12:16 -0700 (PDT)") Message-ID: <87pp5fb172.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) > You can bind any key you like in `query-replace-map'. But > `perform-replace', in effect, hard-codes the keys that it recognizes. > > This is not necessary. You shbould be able to bind a new key in that > map to some command, and have `perform-replace' invoke that command. > > All that's required for this is to add another `cond' clause, just > before the final `t' (otherwise) clause, to do this: > > (cond > ... > (def (call-interactively def)) ; User-defined key - invoke it. > (t > ;; Note: we do not need to treat `exit-prefix' > ;; specially here, since we reread > ;; any unrecognized character. > ...)) > > It seems silly for the code to be written like it is. We already look > up the key you press in the q-r keymap. If we find a DEF that is not > one of those predefined by Emacs then we ignore it? That makes no sense > (to me). Could you please send an example of your custom keybindings in `query-replace-map' that currently don't work. From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jun 2015 21:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 20687@debbugs.gnu.org Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.14331931147402 (code B ref 20687); Mon, 01 Jun 2015 21:12:02 +0000 Received: (at 20687) by debbugs.gnu.org; 1 Jun 2015 21:11:54 +0000 Received: from localhost ([127.0.0.1]:36440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzWzx-0001vJ-L3 for submit@debbugs.gnu.org; Mon, 01 Jun 2015 17:11:53 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:20576) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzWzw-0001v6-0m for 20687@debbugs.gnu.org; Mon, 01 Jun 2015 17:11:52 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t51LBjiH006683 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 1 Jun 2015 21:11:46 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t51LBhYL003064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 1 Jun 2015 21:11:45 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t51LBh03004851; Mon, 1 Jun 2015 21:11:43 GMT MIME-Version: 1.0 Message-ID: <890ac68c-1c71-49c7-9e60-45afba90d74a@default> Date: Mon, 1 Jun 2015 14:11:42 -0700 (PDT) From: Drew Adams References: <87pp5fb172.fsf@mail.linkov.net> In-Reply-To: <87pp5fb172.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (--) > Could you please send an example of your custom keybindings in > `query-replace-map' that currently don't work. I don't have any custom keybindings in `query-replace-map' that don't work (in fact, I don't have any custom bindings in that map at all). This bug report came from this emacs.StackExchange answer - see the discussion in the comments. http://emacs.stackexchange.com/a/12781/105. The aim here was to add `C' to `query-replace-map', to have it toggle `case-fold-search'. But it doesn't matter what key a user might want to bind to what command during q-r. The point is that a user can do that (that's what keymaps and key bindings are for), but currently `perform-replace' refuses to recognize such a key and its command. There is no good reason for this, AFAICT. It should be OK for a user to do this. Of course, that doesn't update the doc string to reflect the new key and its action, but that's all. At the user level, this should be something that users can do easily, without needing to perform surgery. From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' References: In-Reply-To: Resent-From: Kaushal Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jun 2015 13:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 20687@debbugs.gnu.org Cc: Drew Adams , juri@linkov.net Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.143325058128198 (code B ref 20687); Tue, 02 Jun 2015 13:10:03 +0000 Received: (at 20687) by debbugs.gnu.org; 2 Jun 2015 13:09:41 +0000 Received: from localhost ([127.0.0.1]:36974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yzlwq-0007Kk-Ck for submit@debbugs.gnu.org; Tue, 02 Jun 2015 09:09:40 -0400 Received: from mail-yh0-f42.google.com ([209.85.213.42]:36727) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yzlwn-0007KV-H4 for 20687@debbugs.gnu.org; Tue, 02 Jun 2015 09:09:38 -0400 Received: by yhan67 with SMTP id n67so19565882yha.3 for <20687@debbugs.gnu.org>; Tue, 02 Jun 2015 06:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=MQ0/rMXyChkH4ec8I0sUMeQWsoUzYd5berWcRH6A3YY=; b=bi/55oehiAPo1v02uEvL2Pp6oN5jOJ9zywAI8BPi4SURoUxb3GshfU0Sq4UAA6ihDl MQV5WqtD0MQ19fS4g0hL1eJYJZxguQBrVlNCxJdcal6jfnqngIpdK6ovBahOVrVZVvuS +3F8SvXbsi174EanXXRgjr33EbsUPit/36FWjepi1s8EMirZUJVhB1RESQj0GD1V0Sv0 lek9yiP6XQ8MmWTWw78ShMFfihLwnUN5UO1e34gzEOUFaQlEk+xoExBZg9whGb9Bntau aAw4bA1Qu1pLV/+g4jKy8c32vIp+f5PXxG/d6eq2kyKApGL1yiavUSpSJl+suI3plX4A LhYQ== X-Received: by 10.236.229.161 with SMTP id h31mr28901886yhq.57.1433250571973; Tue, 02 Jun 2015 06:09:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.253.5 with HTTP; Tue, 2 Jun 2015 06:08:51 -0700 (PDT) From: Kaushal Date: Tue, 2 Jun 2015 09:08:51 -0400 Message-ID: Content-Type: multipart/alternative; boundary=089e016357b23778c8051788a761 X-Spam-Score: -0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.4 (/) --089e016357b23778c8051788a761 Content-Type: text/plain; charset=ISO-8859-1 Hi guys, I tried the fix as Drew suggested and it works great. Patch: --- replace.el 2015-06-02 09:04:57.944380000 -0400 +++ replace-editted.el 2015-06-02 09:08:22.038682000 -0400 @@ -2099,12 +2099,11 @@ ;; Data for the next match. If a cons, it has the same format as ;; (match-data); otherwise it is t if a match is possible at point. (match-again t) - (message (if query-flag (apply 'propertize (substitute-command-keys - "Query replacing %s with %s: (\\\\[help] for help) ") + "%sQuery replacing %s with %s: (\\\\[help] for help) ") minibuffer-prompt-properties)))) ;; If region is active, in Transient Mark mode, operate on region. @@ -2275,6 +2274,8 @@ nocasify literal)) next-replacement))) (message message + ;; Show whether `case-fold-search' is `t' or `nil' + (if case-fold-search "[case] " "[CaSe] ") (query-replace-descr from-string) (query-replace-descr replacement-presentation))) (setq key (read-event)) @@ -2404,6 +2405,7 @@ (replace-dehighlight) (save-excursion (recursive-edit)) (setq replaced t)) + (def (call-interactively def)) ; User-defined key - invoke it. ;; Note: we do not need to treat `exit-prefix' ;; specially here, since we reread ;; any unrecognized character. Here is then how I add a new binding to the query-replace-map: ;; http://emacs.stackexchange.com/a/12781/115 (defun drew/toggle-case () "Toggle the value of `case-fold-search' between `nil' and non-nil." (interactive) ;; `case-fold-search' automatically becomes buffer-local when set (setq case-fold-search (not case-fold-search))) (define-key query-replace-map (kbd "C") #'drew/toggle-case) ( https://github.com/kaushalmodi/.emacs.d/blob/e690fddc7176368b3d25b0d34ec02510ee92503a/setup-files/setup-search.el#L22-L28 ) -- Kaushal Modi --089e016357b23778c8051788a761 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi guys,

I tried the fix as Drew suggest= ed and it works great.

Patch:

--- replace.el 2015-06-02 09:04:57.944380000 -= 0400
+++ replace-editted.el 2015-06-02 09:08:22.038682000 -0400
@@ -2099,12 +2099,11 @@<= /font>
=A0 =A0 =A0 =A0 =A0 ;; Data for the next match.=A0 If a cons, it has = the same format as
=A0 =A0 =A0 =A0 =A0 ;; (match-data); otherwise it = is t if a match is possible at point.
=A0 =A0 =A0 =A0 =A0 (match-agai= n t)
-
=A0 =A0 =A0 =A0 =A0 (message
=A0 =A0 =A0 =A0 =A0 = =A0(if query-flag
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(apply 'properti= ze
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (substitute-command-ke= ys
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"Query replacing= %s with %s: (\\<query-replace-map>\\[help] for help) ")<= /div>
+= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"%sQuery replacing %s with= %s: (\\<query-replace-map>\\[help] for help) ")
=A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 minibuffer-prompt-properties))))=
= =A0
=A0 =A0 =A0;; If region is active, in Transient Mark mode, operat= e on region.
@@ -2275,6 +2274,8 @@
=A0 =A0 =A0 nocasify literal))
=A0 =A0 next-replacement)))
=A0 =A0 =A0(message = message
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; = Show whether `case-fold-search' is `t' or `nil'
+ =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (if case-fold-search "= ;[case] " "[CaSe] ")
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 (query-replace-descr from-string)
<= div class=3D"gmail_default">=A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (query-replace-descr r= eplacement-presentation)))
=A0 =A0(setq key (read-event))
@@ -2404,6 +2405,7 @@=
= =A0 (replace-dehighlig= ht)
=A0 (save-ex= cursion (recursive-edit))
=A0 (setq replaced t))
<= font face=3D"trebuchet ms, sans-serif">+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0(def (call-interactively def)) ; User-defined key - invoke i= t.
=A0 ;; Note: w= e do not need to treat `exit-prefix'
=A0 ;; specially here, since we reread
=
=A0 ;; any unrecognized chara= cter.


Here is then how I add= a new binding to the query-replace-map:

(defun drew/toggle-case ()
=A0 &quo= t;Toggle the value of `case-fold-search' between `nil' and non-nil.= "
=A0 (interactive)
=A0 ;; `case-fold-search' = automatically becomes buffer-local when set
=A0 (setq case-fold-s= earch (not case-fold-search)))
(define-key query-replace-map (kbd= "C") #'drew/toggle-case)

<= br>

--
Kaushal Modi
--089e016357b23778c8051788a761-- From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jun 2015 22:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 20687@debbugs.gnu.org Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.143328273328040 (code B ref 20687); Tue, 02 Jun 2015 22:06:01 +0000 Received: (at 20687) by debbugs.gnu.org; 2 Jun 2015 22:05:33 +0000 Received: from localhost ([127.0.0.1]:38005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzuJQ-0007I6-Up for submit@debbugs.gnu.org; Tue, 02 Jun 2015 18:05:33 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:51929 helo=homiemail-a100.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzuJN-0007Ht-Vd for 20687@debbugs.gnu.org; Tue, 02 Jun 2015 18:05:30 -0400 Received: from homiemail-a100.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTP id 4F60931A073; Tue, 2 Jun 2015 15:05:29 -0700 (PDT) Received: from localhost.linkov.net (m83-176-9-1.cust.tele2.ee [83.176.9.1]) (Authenticated sender: jurta@jurta.org) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTPA id 5CD7F31A070; Tue, 2 Jun 2015 15:05:28 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: <87pp5fb172.fsf@mail.linkov.net> <890ac68c-1c71-49c7-9e60-45afba90d74a@default> Date: Wed, 03 Jun 2015 01:01:39 +0300 In-Reply-To: <890ac68c-1c71-49c7-9e60-45afba90d74a@default> (Drew Adams's message of "Mon, 1 Jun 2015 14:11:42 -0700 (PDT)") Message-ID: <873829u5vg.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) > The point is that a user can do that (that's what keymaps and > key bindings are for), but currently `perform-replace' refuses to > recognize such a key and its command. I see there are already commands (as opposed to special internal values such as `act' and `skip') in query-replace-map: (define-key map "\C-v" 'scroll-up) (define-key map "\M-v" 'scroll-down) (define-key map [next] 'scroll-up) (define-key map [prior] 'scroll-down) (define-key map [?\C-\M-v] 'scroll-other-window) (define-key map [M-next] 'scroll-other-window) (define-key map [?\C-\M-\S-v] 'scroll-other-window-down) (define-key map [M-prior] 'scroll-other-window-down) These bindings look like real commands intended to be called interactively, so after enabling this feature in query-replace they will start doing their job which is good. The only suggestion I have is to check whether the binding is a command before trying to call it, i.e.: diff --git a/lisp/replace.el b/lisp/replace.el index 1bf1343..503531a 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2404,6 +2404,8 @@ (defun perform-replace (from-string replacements (replace-dehighlight) (save-excursion (recursive-edit)) (setq replaced t)) + ((commandp def t) + (call-interactively def)) ;; Note: we do not need to treat `exit-prefix' ;; specially here, since we reread ;; any unrecognized character. From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jun 2015 22:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Kaushal Cc: 20687@debbugs.gnu.org, Drew Adams Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.143328273828058 (code B ref 20687); Tue, 02 Jun 2015 22:06:02 +0000 Received: (at 20687) by debbugs.gnu.org; 2 Jun 2015 22:05:38 +0000 Received: from localhost ([127.0.0.1]:38007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzuJU-0007IQ-Ll for submit@debbugs.gnu.org; Tue, 02 Jun 2015 18:05:37 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:60005 helo=homiemail-a22.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzuJQ-0007I3-MO for 20687@debbugs.gnu.org; Tue, 02 Jun 2015 18:05:33 -0400 Received: from homiemail-a22.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a22.g.dreamhost.com (Postfix) with ESMTP id 170D11A8071; Tue, 2 Jun 2015 15:05:32 -0700 (PDT) Received: from localhost.linkov.net (m83-176-9-1.cust.tele2.ee [83.176.9.1]) (Authenticated sender: jurta@jurta.org) by homiemail-a22.g.dreamhost.com (Postfix) with ESMTPA id DBF5F1A8069; Tue, 2 Jun 2015 15:05:30 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: <890ac68c-1c71-49c7-9e60-45afba90d74a@default> Date: Wed, 03 Jun 2015 01:02:51 +0300 In-Reply-To: (Kaushal's message of "Tue, 2 Jun 2015 09:08:51 -0400") Message-ID: <87zj4hsr90.fsf_-_@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) > I tried the fix as Drew suggested and it works great. > > Patch: > > --- replace.el 2015-06-02 09:04:57.944380000 -0400 > +++ replace-editted.el 2015-06-02 09:08:22.038682000 -0400 > @@ -2099,12 +2099,11 @@ > ;; Data for the next match. If a cons, it has the same format as > ;; (match-data); otherwise it is t if a match is possible at > point. > (match-again t) > - > (message > (if query-flag > (apply 'propertize > (substitute-command-keys > - "Query replacing %s with %s: (\\\\[help] for help) ") > + "%sQuery replacing %s with %s: (\\\\[help] for help) ") > minibuffer-prompt-properties)))) > > ;; If region is active, in Transient Mark mode, operate on region. > @@ -2275,6 +2274,8 @@ > nocasify literal)) > next-replacement))) > (message message > + ;; Show whether `case-fold-search' is `t' or `nil' > + (if case-fold-search "[case] " "[CaSe] ") > (query-replace-descr from-string) > (query-replace-descr Maybe we should use the same message about case-folding like in isearch? From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jun 2015 22:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 20687@debbugs.gnu.org Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.143328314129046 (code B ref 20687); Tue, 02 Jun 2015 22:13:02 +0000 Received: (at 20687) by debbugs.gnu.org; 2 Jun 2015 22:12:21 +0000 Received: from localhost ([127.0.0.1]:38013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzuQ0-0007YO-PK for submit@debbugs.gnu.org; Tue, 02 Jun 2015 18:12:21 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:50254) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzuPy-0007Y2-NN for 20687@debbugs.gnu.org; Tue, 02 Jun 2015 18:12:19 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t52MCAE4006305 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 2 Jun 2015 22:12:10 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t52MC9XA002119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 2 Jun 2015 22:12:09 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t52MC9e8004970; Tue, 2 Jun 2015 22:12:09 GMT MIME-Version: 1.0 Message-ID: <90dcb094-758c-4c1e-8708-afd654fe1b86@default> Date: Tue, 2 Jun 2015 15:12:09 -0700 (PDT) From: Drew Adams References: <87pp5fb172.fsf@mail.linkov.net> <890ac68c-1c71-49c7-9e60-45afba90d74a@default> <873829u5vg.fsf@mail.linkov.net> In-Reply-To: <873829u5vg.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (--) > These bindings look like real commands intended to be called > interactively, so after enabling this feature in query-replace > they will start doing their job which is good. >=20 > The only suggestion I have is to check whether the binding > is a command before trying to call it, i.e.: Good idea. Thx. From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jun 2015 22:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , Kaushal Cc: 20687@debbugs.gnu.org Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.14332854632571 (code B ref 20687); Tue, 02 Jun 2015 22:52:01 +0000 Received: (at 20687) by debbugs.gnu.org; 2 Jun 2015 22:51:03 +0000 Received: from localhost ([127.0.0.1]:38043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yzv1R-0000fE-I8 for submit@debbugs.gnu.org; Tue, 02 Jun 2015 18:51:02 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:49639) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yzv1P-0000ev-F8 for 20687@debbugs.gnu.org; Tue, 02 Jun 2015 18:51:00 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t52Moqsh013579 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 2 Jun 2015 22:50:53 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t52MoqWs030877 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 2 Jun 2015 22:50:52 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t52MoqG0020695; Tue, 2 Jun 2015 22:50:52 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 2 Jun 2015 15:50:51 -0700 (PDT) From: Drew Adams References: <890ac68c-1c71-49c7-9e60-45afba90d74a@default> <87zj4hsr90.fsf_-_@mail.linkov.net> In-Reply-To: <87zj4hsr90.fsf_-_@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (--) > > + ;; Show whether `case-fold-search' is `t' or `nil' > > + (if case-fold-search "[case] " "[CaSe] ") >=20 > Maybe we should use the same message about case-folding like in > isearch? The msg should somehow indicate that what is involved here is (only) case-sensitivity wrt FROM (i.e., wrt search, not replacement). Not sure what the best way to do that would be. IOW, there is more than one use of case sensitivity here, unlike the case for search. There is what `case-fold-search' controls (the search), and there is what `case-replace' controls (the replacement). And then there is what happens for the replacement according to the case of FROM. --- BTW, we might consider binding a key to toggle case sensitivity for search as part of this bug fix (i.e., not just fixing `perform-replace' so it respects keys that user might bind). In that case, maybe the same key we use in Isearch (`M-c') would be a good choice. --- BTW2, I think that Emacs manual node `Replacement and Case' is confusing. The first three paragraphs (2/3 of the node), for instance: If the first argument of a replace command is all lower case, the command ignores case while searching for occurrences to replace--provided `case-fold-search' is non-`nil'. If `case-fold-search' is set to `nil', case is always significant in all searches. An upper-case letter anywhere in the incremental search string makes the search case-sensitive. Thus, searching for `Foo' does not find `foo' or `FOO'. This applies to regular expression search as well as to string search. The effect ceases if you delete the upper-case letter from the search string. If you set the variable `case-fold-search' to `nil', then all letters must match exactly, including case. This is a per-buffer variable; altering the variable normally affects only the current buffer, unless you change its default value. *Note Locals::. This variable applies to nonincremental searches also, including those performed by the replace commands (*note Replace::) and the minibuffer history matching commands (*note Minibuffer History::). These paragraphs really say only that the search part of replace commands acts normally: `case-fold-search' governs. They should be removed or changed to say just that. Leaving them as they are just confuses readers, = IMO. From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Kaushal Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jun 2015 03:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams , Juri Linkov Cc: 20687@debbugs.gnu.org Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.14333025387220 (code B ref 20687); Wed, 03 Jun 2015 03:36:02 +0000 Received: (at 20687) by debbugs.gnu.org; 3 Jun 2015 03:35:38 +0000 Received: from localhost ([127.0.0.1]:38105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzzSq-0001sM-Fx for submit@debbugs.gnu.org; Tue, 02 Jun 2015 23:35:38 -0400 Received: from mail-yk0-f174.google.com ([209.85.160.174]:35880) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzzSm-0001s6-5R for 20687@debbugs.gnu.org; Tue, 02 Jun 2015 23:35:34 -0400 Received: by yked142 with SMTP id d142so60010076yke.3 for <20687@debbugs.gnu.org>; Tue, 02 Jun 2015 20:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=PziCGOVKH9NqDhsu/G+QM78HUxMgtiiyYYqkcgbL5bQ=; b=TbG+XJAojB7WOAzPuyOOus2z4HFdWcbrIcLmXJ59YhvC+HWV64lZZHENFwpXmqKfKL q6bsvZzoqwSNMmebfNs5YPaOtQXbO1NZ6a2S0e9PSCOb1TLa2+hdKA8wS2aFgqJkUfK4 bUqiNNxxp22JDtttMxa55mASzXPDM3w24/rtzFvA/HToIJlDrFcjy3i94D9TXMujLTdy an0siBFnQzFuvzHBUaamrdFk7/b08lhGLH5YvCGDzcfHGLERDUeoUIwwaWfFaXaK92u2 +gaasgwUjJodJBa0pKJlbiuQgeUdyVJv9phjhhLxGKZuiiQFAhPjJiND3aha80AmygXL Y2Hg== X-Received: by 10.236.45.38 with SMTP id o26mr32312388yhb.161.1433302526579; Tue, 02 Jun 2015 20:35:26 -0700 (PDT) MIME-Version: 1.0 References: <890ac68c-1c71-49c7-9e60-45afba90d74a@default> <87zj4hsr90.fsf_-_@mail.linkov.net> In-Reply-To: From: Kaushal Date: Wed, 03 Jun 2015 03:35:15 +0000 Message-ID: Content-Type: multipart/alternative; boundary=089e01160574f3de36051794bf35 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) --089e01160574f3de36051794bf35 Content-Type: text/plain; charset=ISO-8859-1 In that case, the patch becomes much more complicated. We have to modify the query-replace-map in replace.el itself as we cannot access the internal variables required to printed this message in isearch-style with (sit-for 1): (message query-replace-in-progress-message (query-replace-descr from-string) (query-replace-descr replacement-presentation) query-message-momentary) Here: from-string, replacement-presentation are internal variables and cannot be used in a function defined outside that (cond ..) form. So the earlier approach to define a function externally to toggle the case and to bind that to query-replace-map from outside does not apply (if we want to flash the case fold toggle info momentarily as done in isearch). Even the replacement-presentation was in a (let .. ) form not accessible to the (cond ..) form and so I moved it to an outer (let ..) form as seen in the below patch. I tested this out and the M-c and M-r bindings work great. It now also gives clear info on what the user should expect after that binding is used. Please give it a try. I have still kept this line (def (call-interactively def)) ; User-defined key, invoke it. as it could be useful to bind any other function from outside that does not need internal variables. --- replace.el 2015-06-02 23:21:42.631715000 -0400 +++ replace-editted.el 2015-06-02 23:32:47.754001000 -0400 @@ -1834,6 +1834,8 @@ (define-key map [M-next] 'scroll-other-window) (define-key map [?\C-\M-\S-v] 'scroll-other-window-down) (define-key map [M-prior] 'scroll-other-window-down) + (define-key map "\M-c" 'toggle-query-case) + (define-key map "\M-r" 'toggle-replace-preserve-case) ;; Binding ESC would prohibit the M-v binding. Instead, callers ;; should check for ESC specially. ;; (define-key map "\e" 'exit-prefix) @@ -2100,12 +2102,14 @@ ;; (match-data); otherwise it is t if a match is possible at point. (match-again t) - (message + (query-replace-in-progress-message (if query-flag (apply 'propertize (substitute-command-keys - "Query replacing %s with %s: (\\\\[help] for help) ") - minibuffer-prompt-properties)))) + (concat "Query replacing %s with %s: " + "(\\\\[help] for help) %s ")) + minibuffer-prompt-properties))) + (query-message-momentary "")) ;; If region is active, in Transient Mark mode, operate on region. (if backward @@ -2251,7 +2255,7 @@ noedit real-match-data backward) replace-count (1+ replace-count))) (undo-boundary) - (let (done replaced key def) + (let (done replaced key def replacement-presentation) ;; Loop reading commands until one of them sets done, ;; which means it has finished handling this ;; occurrence. Any command that sets `done' should @@ -2266,17 +2270,18 @@ regexp-flag delimited-flag case-fold-search backward) ;; Bind message-log-max so we don't fill up the message log ;; with a bunch of identical messages. - (let ((message-log-max nil) - (replacement-presentation - (if query-replace-show-replacement - (save-match-data - (set-match-data real-match-data) - (match-substitute-replacement next-replacement - nocasify literal)) - next-replacement))) - (message message + (let ((message-log-max nil)) + (setq replacement-presentation + (if query-replace-show-replacement + (save-match-data + (set-match-data real-match-data) + (match-substitute-replacement next-replacement + nocasify literal)) + next-replacement)) + (message query-replace-in-progress-message (query-replace-descr from-string) - (query-replace-descr replacement-presentation))) + (query-replace-descr replacement-presentation) + query-message-momentary)) (setq key (read-event)) ;; Necessary in case something happens during read-event ;; that clobbers the match data. @@ -2404,6 +2409,51 @@ (replace-dehighlight) (save-excursion (recursive-edit)) (setq replaced t)) + + ((eq def 'toggle-query-case) + (setq case-fold-search (not case-fold-search)) + (let ((message-log-max nil) + (query-message-momentary + (concat "[" + (if case-fold-search + "case insensitive search" + "Case Sensitive Search") + "]"))) + (message query-replace-in-progress-message + (query-replace-descr from-string) + (query-replace-descr replacement-presentation) + query-message-momentary) + (sit-for 1))) + + ((eq def 'toggle-replace-preserve-case) + (let ((message-log-max nil) + (nocasify-value-reason "") + query-message-momentary) + (setq nocasify (not nocasify)) + (cond + ((null case-fold-search) + (setq nocasify nil) + (setq nocasify-value-reason ", as case-fold-search is nil")) + ((null (isearch-no-upper-case-p from-string regexp-flag)) + (setq nocasify nil) + (setq nocasify-value-reason ", as FROM-STRING has an upper case char.")) + ((null (isearch-no-upper-case-p next-replacement regexp-flag)) + (setq nocasify t) + (setq nocasify-value-reason ", as REPLACEMENT has an upper case char."))) + (setq query-message-momentary + (concat "[Replaced text case will " + (if nocasify "NOT " "") + "be preserved" + nocasify-value-reason + "]")) + (message query-replace-in-progress-message + (query-replace-descr from-string) + (query-replace-descr replacement-presentation) + query-message-momentary) + (sit-for 1.5))) + + (def (call-interactively def)) ; User-defined key, invoke it. + ;; Note: we do not need to treat `exit-prefix' ;; specially here, since we reread ;; any unrecognized character. On Tue, Jun 2, 2015 at 6:51 PM Drew Adams wrote: > > > + ;; Show whether `case-fold-search' is `t' or `nil' > > > + (if case-fold-search "[case] " "[CaSe] ") > > > > Maybe we should use the same message about case-folding like in > > isearch? > > The msg should somehow indicate that what is involved here is (only) > case-sensitivity wrt FROM (i.e., wrt search, not replacement). Not > sure what the best way to do that would be. > > IOW, there is more than one use of case sensitivity here, unlike > the case for search. There is what `case-fold-search' controls (the > search), and there is what `case-replace' controls (the replacement). > And then there is what happens for the replacement according to the > case of FROM. > > --- > > BTW, we might consider binding a key to toggle case sensitivity for > search as part of this bug fix (i.e., not just fixing `perform-replace' > so it respects keys that user might bind). In that case, maybe the > same key we use in Isearch (`M-c') would be a good choice. > > --- > > BTW2, I think that Emacs manual node `Replacement and Case' is confusing. > The first three paragraphs (2/3 of the node), for instance: > > If the first argument of a replace command is all lower case, the > command ignores case while searching for occurrences to > replace--provided `case-fold-search' is non-`nil'. If > `case-fold-search' is set to `nil', case is always significant in all > searches. > > An upper-case letter anywhere in the incremental search string makes > the search case-sensitive. Thus, searching for `Foo' does not find > `foo' or `FOO'. This applies to regular expression search as well as > to string search. The effect ceases if you delete the upper-case > letter from the search string. > > If you set the variable `case-fold-search' to `nil', then all > letters must match exactly, including case. This is a per-buffer > variable; altering the variable normally affects only the current > buffer, unless you change its default value. *Note Locals::. This > variable applies to nonincremental searches also, including those > performed by the replace commands (*note Replace::) and the minibuffer > history matching commands (*note Minibuffer History::). > > These paragraphs really say only that the search part of replace commands > acts normally: `case-fold-search' governs. They should be removed or > changed to say just that. Leaving them as they are just confuses readers, > IMO. > --089e01160574f3de36051794bf35 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
In that case, the patch becomes much more complicated.=A0<= br>
We have to modify the query-replace-map in replace.el itself as we c= annot access the internal variables required to printed this message in ise= arch-style with (sit-for 1):

(message query-replace-in-p= rogress-message
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 (query-replace-descr from-string)
=A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (query-rep= lace-descr replacement-presentation)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 query-message-momentary)
<= div>
Here: from-string, replacement-presentation are internal= variables and cannot be used in a function defined outside that (cond ..) = form. So the earlier approach to define a function externally to toggle the= case and to bind that to query-replace-map from outside does not apply (if= we want to flash the case fold toggle info momentarily as done in isearch)= . Even the replacement-presentation was in a (let .. ) form not accessible = to the (cond ..) form and so I moved it to an outer (let ..) form as seen i= n the below patch.

I tested this out and the M-c a= nd M-r bindings work great. It now also gives clear info on what the user s= hould expect after that binding is used.
Please give it a try.=A0=

I have still kept this line

=A0(def (call-interactively def)) ; User-defined key, invoke it.<= br>

as it could be useful to bind any oth= er function from outside that does not need internal variables.

--- replace.el 2015-06-02 23:21:42.631715000 -0= 400
+++ replace-editted.el 2015-06-02 23:32:47.754001000 -0400
@@ = -1834,6 +1834,8 @@
=A0 =A0 =A0(define-key map [M-next] 'scrol= l-other-window)
=A0 =A0 =A0(define-key map [?\C-\M-\S-v] 'scr= oll-other-window-down)
=A0 =A0 =A0(define-key map [M-prior] '= scroll-other-window-down)
+ =A0 =A0(define-key map "\M-c&quo= t; 'toggle-query-case)
+ =A0 =A0(define-key map "\M-r&qu= ot; 'toggle-replace-preserve-case)
=A0 =A0 =A0;; Binding ESC = would prohibit the M-v binding.=A0 Instead, callers
=A0 =A0 =A0;;= should check for ESC specially.
=A0 =A0 =A0;; (define-key map &q= uot;\e" 'exit-prefix)
@@ -2100,12 +2102,14 @@
= =A0 =A0 =A0 =A0 =A0 ;; (match-data); otherwise it is t if a match is possib= le at point.
=A0 =A0 =A0 =A0 =A0 (match-again t)
=A0
- =A0 =A0 =A0 =A0 (message
+ =A0 =A0 =A0 =A0 (query-repla= ce-in-progress-message
=A0 =A0 =A0 =A0 =A0 =A0(if query-flag
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(apply 'propertize
=A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (substitute-command-keys
= - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"Query replacing %s with = %s: (\\<query-replace-map>\\[help] for help) ")
- =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 minibuffer-prompt-properties))))
<= div>+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(concat "Query replac= ing %s with %s: "
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0"(\\<query-replace-map>\\[help] for help) %s = "))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 minibuffer-pro= mpt-properties)))
+ =A0 =A0 =A0 =A0 (query-message-momentary &quo= t;"))
=A0
=A0 =A0 =A0;; If region is active, in Tr= ansient Mark mode, operate on region.
=A0 =A0 =A0(if backward
@@ -2251,7 +2255,7 @@
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 noedit real-match-data backward)
=A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0replace-count (1+ replace-count)))
=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(undo-boundary)
- =A0 =A0 =A0= =A0 =A0 =A0 =A0(let (done replaced key def)
+ =A0 =A0 =A0 =A0 = =A0 =A0 =A0(let (done replaced key def replacement-presentation)
= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; Loop reading commands until one of th= em sets done,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; which means i= t has finished handling this
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;= ; occurrence.=A0 Any command that sets `done' should
@@ -2266= ,17 +2270,18 @@
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 regexp-fl= ag delimited-flag case-fold-search backward)
=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0;; Bind message-log-max so we don't fill up the mess= age log
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; with a bunch of= identical messages.
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(let ((= message-log-max nil)
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0(replacement-presentation
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 (if query-replace-show-replacement
- =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (save-match-data
= - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (set-match-da= ta real-match-data)
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 (match-substitute-replacement next-replacement
-= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 nocasify literal))
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 next-replacement)))=
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(message message
<= div>+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(let ((message-log-max nil))
=
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(setq replacement-presentatio= n
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if query-= replace-show-replacement
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0(save-match-data
+ =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(set-match-data real-match-data)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(m= atch-substitute-replacement next-replacement
+ =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0nocasify literal))
+ =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0next-replacement))
+ = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(message query-replace-in-progress-m= essage
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 (query-replace-descr from-string)
- =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (query-replace-descr replacement-presentati= on)))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (= query-replace-descr replacement-presentation)
+ =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 query-message-momentary))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(setq key (read-event))
= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; Necessary in case something happe= ns during read-event
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; th= at clobbers the match data.
@@ -2404,6 +2409,51 @@
=A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (replace-dehighlight)
=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (save-excursion (r= ecursive-edit))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 (setq replaced t))
+
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0((eq def 'toggle-query-case)
+ =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq case-fold-search (not case-fold-= search))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (let (= (message-log-max nil)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 (query-message-momentary
+ =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(concat "["
<= div>+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0(if case-fold-search
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"case insensit= ive search"
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"Case Sensitive Search")
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0"]")))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 (message query-replace-in-progress-message
+= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(qu= ery-replace-descr from-string)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(query-replace-descr replacement-pre= sentation)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0query-message-momentary)
+ =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (sit-for 1)))
+
+ =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0((eq def 'toggle-replace-pre= serve-case)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (le= t ((message-log-max nil)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 (nocasify-value-reason "")
+ = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 query-message-m= omentary)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (= setq nocasify (not nocasify))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 (cond
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0((null case-fold-search)
+ =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq nocasify nil)
+ =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq nocasify-value-re= ason ", as case-fold-search is nil"))
+ =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0((null (isearch-no-upper-case-p fro= m-string regexp-flag))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 (setq nocasify nil)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq nocasify-value-reason ", as FROM-ST= RING has an upper case char."))
+ =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0((null (isearch-no-upper-case-p next-replace= ment regexp-flag))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 (setq nocasify t)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 (setq nocasify-value-reason ", as REPLACEMENT = has an upper case char.")))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 (setq query-message-momentary
+ =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (concat "[Repl= aced text case will "
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (if nocasify "NOT " &= quot;")
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "be preserved"
+ =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= nocasify-value-reason
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "]"))
+ =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (message query-replace-in-prog= ress-message
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0(query-replace-descr from-string)
+ =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(query-r= eplace-descr replacement-presentation)
+ =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0query-message-momentary)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (sit-for 1.5))= )
+
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(d= ef (call-interactively def)) ; User-defined key, invoke it.
+
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; Note: we do no= t need to treat `exit-prefix'
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0;; specially here, since we reread
=A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; any unrecognized character.


<= div dir=3D"ltr">On Tue, Jun 2, 2015 at 6:51 PM Drew Adams <drew.adams@oracle.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">> > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 ;; Show whether `case-fold-search' is `t' or `nil'
> > +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (if case-fold-search "[= case] " "[CaSe] ")
>
> Maybe we should use the same message about case-folding like in
> isearch?

The msg should somehow indicate that what is involved here is (only)
case-sensitivity wrt FROM (i.e., wrt search, not replacement).=A0 Not
sure what the best way to do that would be.

IOW, there is more than one use of case sensitivity here, unlike
the case for search.=A0 There is what `case-fold-search' controls (the<= br> search), and there is what `case-replace' controls (the replacement). And then there is what happens for the replacement according to the
case of FROM.

---

BTW, we might consider binding a key to toggle case sensitivity for
search as part of this bug fix (i.e., not just fixing `perform-replace'=
so it respects keys that user might bind).=A0 In that case, maybe the
same key we use in Isearch (`M-c') would be a good choice.

---

BTW2, I think that Emacs manual node `Replacement and Case' is confusin= g.
The first three paragraphs (2/3 of the node), for instance:

=A0If the first argument of a replace command is all lower case, the
=A0command ignores case while searching for occurrences to
=A0replace--provided `case-fold-search' is non-`nil'.=A0 If
=A0`case-fold-search' is set to `nil', case is always significant i= n all
=A0searches.

=A0 An upper-case letter anywhere in the incremental search string makes =A0 the search case-sensitive.=A0 Thus, searching for `Foo' does not fi= nd
=A0 `foo' or `FOO'.=A0 This applies to regular expression search as= well as
=A0 to string search.=A0 The effect ceases if you delete the upper-case
=A0 letter from the search string.

=A0 If you set the variable `case-fold-search' to `nil', then all =A0 letters must match exactly, including case.=A0 This is a per-buffer
=A0 variable; altering the variable normally affects only the current
=A0 buffer, unless you change its default value.=A0 *Note Locals::.=A0 This=
=A0 variable applies to nonincremental searches also, including those
=A0 performed by the replace commands (*note Replace::) and the minibuffer<= br> =A0 history matching commands (*note Minibuffer History::).

These paragraphs really say only that the search part of replace commands acts normally: `case-fold-search' governs.=A0 They should be removed or=
changed to say just that.=A0 Leaving them as they are just confuses readers= , IMO.
--089e01160574f3de36051794bf35-- From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jun 2015 04:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Kaushal , Juri Linkov Cc: 20687@debbugs.gnu.org Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.143330638213035 (code B ref 20687); Wed, 03 Jun 2015 04:40:03 +0000 Received: (at 20687) by debbugs.gnu.org; 3 Jun 2015 04:39:42 +0000 Received: from localhost ([127.0.0.1]:38115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z00Sr-0003OB-Pa for submit@debbugs.gnu.org; Wed, 03 Jun 2015 00:39:42 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:17294) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z00Sp-0003Nu-JC for 20687@debbugs.gnu.org; Wed, 03 Jun 2015 00:39:40 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t534dXjM012468 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Jun 2015 04:39:33 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t534dXGV024204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 3 Jun 2015 04:39:33 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t534dX2L008484; Wed, 3 Jun 2015 04:39:33 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 2 Jun 2015 21:39:32 -0700 (PDT) From: Drew Adams References: <890ac68c-1c71-49c7-9e60-45afba90d74a@default> <87zj4hsr90.fsf_-_@mail.linkov.net> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (--) > I tested this out and the M-c and M-r bindings work great. It now > also gives clear info on what the user should expect after that > binding is used. Please give it a try. I have still kept this line >=20 > =A0(def (call-interactively def)) ; User-defined key, invoke it. >=20 > as it could be useful to bind any other function from outside > that does not need internal variables. 1. I'm OK with whatever you guys come up with. Thanks for working on this. 2. I tried it only a little. When I tried `M-r': * If the replacement string had uppercase chars then I always got the same message, which was very long - too long to read in the short time it was displayed. Could we shorten that message, please? And could we maybe have it logged to *Messages*, so that if someone doesn't have time to read it s?he can look it up? * If the replacement string had no uppercase chars then I always got the same message (about case-fold-search being nil). What is `M-r' really supposed to do? I don't see how it is a toggle, if repeating it always gives the same message, given the same replacement string. Can you describe what the toggling or cycling among states is supposed to do/mean? 3. Wrt this:=20 I have still kept this line (def (call-interactively def)) ; User-defined key, invoke it. as it could be useful to bind any other function from outside that does not need internal variables. I think Juri is right, that it should be the following, because `lookup-key' can return a number if the key is too long: ((commandp def t) ; User-defined key, invoke it. (call-interactively def)) 4. If one of you could replace the paragraphs of the doc that I mentioned by just a statement that search is controlled by `case-fold-search', that would be good. You could then add that you can toggle this using `M-c' etc. IOW, (1) those paragraphs are useless, and (2) now we have something more to say about case sensitivity. From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Kaushal Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jun 2015 05:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams , Juri Linkov Cc: 20687@debbugs.gnu.org Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.143330825516020 (code B ref 20687); Wed, 03 Jun 2015 05:11:02 +0000 Received: (at 20687) by debbugs.gnu.org; 3 Jun 2015 05:10:55 +0000 Received: from localhost ([127.0.0.1]:38120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z00x2-0004AH-Rn for submit@debbugs.gnu.org; Wed, 03 Jun 2015 01:10:55 -0400 Received: from mail-yh0-f50.google.com ([209.85.213.50]:34569) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z00wy-0004A2-IB for 20687@debbugs.gnu.org; Wed, 03 Jun 2015 01:10:50 -0400 Received: by yhom41 with SMTP id m41so47090889yho.1 for <20687@debbugs.gnu.org>; Tue, 02 Jun 2015 22:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=R3MdpKR3Q6APY6SFWdkfX8WiQBJw444z0wJ89Y3g+Ds=; b=xcEOQ6ypYe4lc0XyX1cyc5SkmSfp4JhaBz6Oszietj5sW+VFTOA8iVe83Igy++hGRx FyZwWK89Sbd4hk1YqvLXwat+QGCCNhJnsjgx4EN1CgQgpcKEY+Z3rMgfw4gB5pFG/6gx ms/SQs0QOvXYF+Qgi+q5p8ohjnPFNz/DlqUnse/qHywIsdNvDUAJiBuKnGM6QKk9f2w2 3v7X6ihKCnUfwXSVpG9Vq862Lv2m8DpELQcuzhUp/1Rfsgasmrl8jSwuwcVaiPve0s4V t8k1rHwHxFQqLVII5CM1zs/EHR6loSEVyLGiY+ZkLHFQAjThreu9vr49gZiK1P3Za7NU HPFQ== X-Received: by 10.236.43.207 with SMTP id l55mr32309970yhb.53.1433308243173; Tue, 02 Jun 2015 22:10:43 -0700 (PDT) MIME-Version: 1.0 References: <890ac68c-1c71-49c7-9e60-45afba90d74a@default> <87zj4hsr90.fsf_-_@mail.linkov.net> In-Reply-To: From: Kaushal Date: Wed, 03 Jun 2015 05:10:32 +0000 Message-ID: Content-Type: multipart/alternative; boundary=089e0158bd92b0266705179614e5 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) --089e0158bd92b0266705179614e5 Content-Type: text/plain; charset=ISO-8859-1 > If the replacement string had uppercase chars then I always got the same message, which was very long - too long to read in the short time it was displayed. Could we shorten that message, please? Yes, I am looking for more ideas to get a better, shorter message. > And could we maybe have it logged to *Messages*, so that if someone doesn't have time to read it s?he can look it up? Only for the messages where toggling is not possible, the message can be logged to *Messages*. Sounds good? > If the replacement string had no uppercase chars then I always got the same message (about case-fold-search being nil). The toggling is not unconditional. Toggling case-replace/nocasify is very picky! So I had to put that (cond ..) statement there to handle the picky scenarios where toggling cannot happen even if the user wanted to. For the above case, nocasify will stay t regardless of the value of case-replace IF the user has set case-fold-search to nil. So the user will first need to do M-c (toggle case-fold-search to t) and then do M-r. That too will not work IF the user has used upper case letter in the search/regexp string or the replacement string. This is the ideal case for M-r to always toggle nocasify 1. case-fold-search is t 2. all lower case in search/regexp string 3. all lower case in replacement string > What is `M-r' really supposed to do? I don't see how it is a toggle, if repeating it always gives the same message, given the same replacement string. Can you describe what the toggling or cycling among states is supposed to do/mean? As described above, we cannot unconditionally toggle nocasify.. it depends on a bunch of conditions to be right. > I think Juri is right, that it should be the following, because `lookup-key' can return a number if the key is too long: ((commandp def t) ; User-defined key, invoke it. (call-interactively def)) I agree. Will make the change. > If one of you could replace the paragraphs of the doc that I mentioned by just a statement that search is controlled by `case-fold-search', that would be good. You could then add that you can toggle this using `M-c' etc. IOW, (1) those paragraphs are useless, and (2) now we have something more to say about case sensitivity. Case fold toggling is also a bit picky but the results are obvious, and M-c can force toggle case-fold-search. But default, search-upper-case is t. So if the user has a string with an upper case in the search field of query-replace, case-fold-search will be set to nil automatically (even if it is `t` by default). Then M-r will not work in the beginning. User can, though, use M-c to toggle case-fold-search first and then M-r if they wish. I found the current documentation useful while working on this patch and testing it out. But I will give it a one more read to try to improve it. On Wed, Jun 3, 2015 at 12:39 AM Drew Adams wrote: > > I tested this out and the M-c and M-r bindings work great. It now > > also gives clear info on what the user should expect after that > > binding is used. Please give it a try. I have still kept this line > > > > (def (call-interactively def)) ; User-defined key, invoke it. > > > > as it could be useful to bind any other function from outside > > that does not need internal variables. > > 1. I'm OK with whatever you guys come up with. Thanks for working > on this. > > 2. I tried it only a little. When I tried `M-r': > > * If the replacement string had uppercase chars then I always > got the same message, which was very long - too long to read > in the short time it was displayed. Could we shorten that > message, please? And could we maybe have it logged to > *Messages*, so that if someone doesn't have time to read it > s?he can look it up? > > * If the replacement string had no uppercase chars then I always > got the same message (about case-fold-search being nil). > > What is `M-r' really supposed to do? I don't see how it is a > toggle, if repeating it always gives the same message, given > the same replacement string. Can you describe what the toggling > or cycling among states is supposed to do/mean? > > 3. Wrt this: > > I have still kept this line > (def (call-interactively def)) ; User-defined key, invoke it. > as it could be useful to bind any other function from outside > that does not need internal variables. > > I think Juri is right, that it should be the following, because > `lookup-key' can return a number if the key is too long: > > ((commandp def t) ; User-defined key, invoke it. > (call-interactively def)) > > 4. If one of you could replace the paragraphs of the doc that I > mentioned by just a statement that search is controlled by > `case-fold-search', that would be good. You could then add > that you can toggle this using `M-c' etc. IOW, (1) those > paragraphs are useless, and (2) now we have something more > to say about case sensitivity. > --089e0158bd92b0266705179614e5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
> If the replacem= ent string had uppercase chars then I always
=A0 =A0 =A0got the same mes= sage, which was very long - too long to read
=A0 =A0 =A0in the short tim= e it was displayed.=A0 Could we shorten that
=A0 =A0 =A0message, please?= =A0
Yes, I am looking for more ideas to get a bet= ter, shorter message.

> =A0And could we maybe have it logged to
=A0 =A0 =A0*Messages*, = so that if someone doesn't have time to read it
=A0 =A0 =A0s?he can = look it up?
Only for the messages where toggling is not possible, the me= ssage can be logged to *Messages*. Sounds good?

> If the replacem= ent string had no uppercase chars then I always
=A0 =A0 =A0got the same = message (about case-fold-search being nil).
The toggling is not uncondit= ional. Toggling case-replace/nocasify is very picky!
So I had to put that (cond ..) statement there to handle the picky scen= arios where toggling cannot happen even if the user wanted to.

For the above case, nocasify w= ill stay t regardless of the value of case-replace IF the user has set case= -fold-search to nil.
So the user will first need = to do M-c (toggle case-fold-search to t) and then do M-r. That too will not= work IF the user has used upper case letter in the search/regexp string or= the replacement string.

This is the ideal case for M-r to always toggle nocasify
1. case-fold-search is t
2. all lo= wer case in search/regexp string
3. all lower cas= e in replacement string

> =A0 What is `M-r= ' really supposed to do?=A0 I don't see how it is a
=A0 =A0toggl= e, if repeating it always gives the same message, given
=A0 =A0the same = replacement string.=A0 Can you describe what the toggling
=A0 =A0or cycl= ing among states is supposed to do/mean?

As described above, we cann= ot unconditionally toggle nocasify.. it depends on a bunch of conditions to= be right.

> =A0 I think Juri is right, t= hat it should be the following, because
=A0 =A0`lookup-key' can return a number if the= key is too long:

=A0 =A0((commandp def t)=A0 =A0 =A0 =A0 =A0 ; User= -defined key, invoke it.
=A0 =A0 (call-interactively def))

I agre= e. Will make the change.

> If one of you c= ould replace the paragraphs of the doc that I
=A0 =A0mentioned by just a= statement that search is controlled by
=A0 =A0`case-fold-search', t= hat would be good. You could then add
=A0 =A0that you can toggle this us= ing `M-c' etc. IOW, (1) those
=A0 =A0paragraphs are useless, and (2)= now we have something more
=A0 =A0to say about case sensitivity.
<= div class=3D"F3hlO">
Case fold toggling is al= so a bit picky but the results are obvious, and M-c can force toggle case-f= old-search.

But de= fault, search-upper-case is t. So if the user has a string with an upper ca= se in the search field of query-replace, case-fold-search will be set to ni= l automatically (even if it is `t` by default). Then M-r will not work in t= he beginning. User can, though, use M-c to toggle case-fold-search first an= d then M-r if they wish.

I found the current documentation useful while working on this patch= and testing it out. But I will give it a one more read to try to improve i= t.

On Wed,= Jun 3, 2015 at 12:39 AM Drew Adams <drew.adams@oracle.com> wrote:
> I tested this out and the M-c and M-r bindings work great. It = now
> also gives clear info on what the user should expect after that
> binding is used. Please give it a try. I have still kept this line
>
> =A0(def (call-interactively def)) ; User-defined key, invoke it.
>
> as it could be useful to bind any other function from outside
> that does not need internal variables.

1. I'm OK with whatever you guys come up with.=A0 Thanks for working =A0 =A0on this.

2. I tried it only a little.=A0 When I tried `M-r':

=A0 =A0* If the replacement string had uppercase chars then I always
=A0 =A0 =A0got the same message, which was very long - too long to read
=A0 =A0 =A0in the short time it was displayed.=A0 Could we shorten that
=A0 =A0 =A0message, please?=A0 And could we maybe have it logged to
=A0 =A0 =A0*Messages*, so that if someone doesn't have time to read it<= br> =A0 =A0 =A0s?he can look it up?

=A0 =A0* If the replacement string had no uppercase chars then I always
=A0 =A0 =A0got the same message (about case-fold-search being nil).

=A0 =A0What is `M-r' really supposed to do?=A0 I don't see how it i= s a
=A0 =A0toggle, if repeating it always gives the same message, given
=A0 =A0the same replacement string.=A0 Can you describe what the toggling =A0 =A0or cycling among states is supposed to do/mean?

3. Wrt this:

=A0 =A0 =A0 I have still kept this line
=A0 =A0 =A0 (def (call-interactively def)) ; User-defined key, invoke it. =A0 =A0 =A0 as it could be useful to bind any other function from outside =A0 =A0 =A0 that does not need internal variables.

=A0 =A0I think Juri is right, that it should be the following, because
=A0 =A0`lookup-key' can return a number if the key is too long:

=A0 =A0((commandp def t)=A0 =A0 =A0 =A0 =A0 ; User-defined key, invoke it.<= br> =A0 =A0 (call-interactively def))

4. If one of you could replace the paragraphs of the doc that I
=A0 =A0mentioned by just a statement that search is controlled by
=A0 =A0`case-fold-search', that would be good. You could then add
=A0 =A0that you can toggle this using `M-c' etc. IOW, (1) those
=A0 =A0paragraphs are useless, and (2) now we have something more
=A0 =A0to say about case sensitivity.
--089e0158bd92b0266705179614e5-- From unknown Mon Jun 23 18:33:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 18:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 20687@debbugs.gnu.org, Drew Adams , Kaushal Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.160036629616909 (code B ref 20687); Thu, 17 Sep 2020 18:12:02 +0000 Received: (at 20687) by debbugs.gnu.org; 17 Sep 2020 18:11:36 +0000 Received: from localhost ([127.0.0.1]:38992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyNb-0004Oe-Pc for submit@debbugs.gnu.org; Thu, 17 Sep 2020 14:11:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyNZ-0004OK-GL for 20687@debbugs.gnu.org; Thu, 17 Sep 2020 14:11:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nAh18Opbj/cvwawL2aNXyHEzzGMFm0LsRh5x2hXqOew=; b=T2vRarNMR0qNTKrOFlCEHuSzal XQwEEROtIHsO4Usx02i7CSUeN4r3N/AnrfbIUL73cmMgJ3sTWKgfBkShkTBTrrZYxFUcZLUzhOtfR VPzH0W4a8r77rYzN/f5DW0R0ChS3A/T3Bp4Rm1Cc9cZztDNi3lEoUQb1DayGcUpSCCZs=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIyNP-0003RO-Ls; Thu, 17 Sep 2020 20:11:26 +0200 From: Lars Ingebrigtsen References: <87pp5fb172.fsf@mail.linkov.net> <890ac68c-1c71-49c7-9e60-45afba90d74a@default> <873829u5vg.fsf@mail.linkov.net> X-Now-Playing: Scritti Politti's _Provision_: "Best thing ever" Date: Thu, 17 Sep 2020 20:11:22 +0200 In-Reply-To: <873829u5vg.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 03 Jun 2015 01:01:39 +0300") Message-ID: <87imccmfxx.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > I see there are already commands (as opposed to special internal > values such as `act' and `skip') in query-replace-map: > > (define-key map "\C-v" 'scroll-up) > (define-key map "\M-v" 'scroll-down [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) Juri Linkov writes: > I see there are already commands (as opposed to special internal > values such as `act' and `skip') in query-replace-map: > > (define-key map "\C-v" 'scroll-up) > (define-key map "\M-v" 'scroll-down) > (define-key map [next] 'scroll-up) > (define-key map [prior] 'scroll-down) > (define-key map [?\C-\M-v] 'scroll-other-window) > (define-key map [M-next] 'scroll-other-window) > (define-key map [?\C-\M-\S-v] 'scroll-other-window-down) > (define-key map [M-prior] 'scroll-other-window-down) > > These bindings look like real commands intended to be called > interactively, so after enabling this feature in query-replace > they will start doing their job which is good. [...] > + ((commandp def t) > + (call-interactively def)) I'm not sure I quite understand Kaushal's proposed patch here, and how it relates to the problem Drew describes, but Juri's patch here seems like the right thing, at least? As far as I can tell, it was never applied. So I've applied it to Emacs 28, and I'm closing this bug report. If there are other related things to be done in this area, it might be better to open a separate bug report and restate what the requested feature is. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 17 14:11:42 2020 Received: (at control) by debbugs.gnu.org; 17 Sep 2020 18:11:42 +0000 Received: from localhost ([127.0.0.1]:38995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyNi-0004P0-21 for submit@debbugs.gnu.org; Thu, 17 Sep 2020 14:11:42 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyNg-0004Od-26 for control@debbugs.gnu.org; Thu, 17 Sep 2020 14:11:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MGWXl+6oGGl/OqPFFe50dIEpnZzBFUZBxNUGrMtq82g=; b=fhxcAk48mM+QD/jE6osuQxXHYA QmqxecnplBYbr9+s48xldUt2eUtvh/5DL7Mdl17CXSOQMw1LkAFv0bCWUcx3W0uh5JsofhCSd3ajR ymVPE/4WBj6OlPuZfNrL7YH65/mkx9upbmrI646gklJypXvJYYlP5SaLqjfRHzAlEWC4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIyNY-0003RW-CF for control@debbugs.gnu.org; Thu, 17 Sep 2020 20:11:34 +0200 Date: Thu, 17 Sep 2020 20:11:31 +0200 Message-Id: <87h7rwmfxo.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #20687 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 20687 fixed close 20687 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) tags 20687 fixed close 20687 28.1 quit