From unknown Fri Jun 20 07:09:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15200 <15200@debbugs.gnu.org> To: bug#15200 <15200@debbugs.gnu.org> Subject: Status: isearch-other-meta-char and shift Reply-To: bug#15200 <15200@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:09:41 +0000 retitle 15200 isearch-other-meta-char and shift reassign 15200 emacs submitter 15200 Juri Linkov severity 15200 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 27 12:29:39 2013 Received: (at submit) by debbugs.gnu.org; 27 Aug 2013 16:29:39 +0000 Received: from localhost ([127.0.0.1]:59440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEM9C-0002St-N7 for submit@debbugs.gnu.org; Tue, 27 Aug 2013 12:29:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34210) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEM99-0002Sj-55 for submit@debbugs.gnu.org; Tue, 27 Aug 2013 12:29:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEM90-000668-7M for submit@debbugs.gnu.org; Tue, 27 Aug 2013 12:29:34 -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]:48138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEM90-000664-4H for submit@debbugs.gnu.org; Tue, 27 Aug 2013 12:29:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEM8u-0007oj-2y for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2013 12:29:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEM8o-00064V-3Q for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2013 12:29:19 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:46153 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEM8n-00064J-Tj for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2013 12:29:14 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id A53E6258B9E935 for ; Tue, 27 Aug 2013 09:29:11 -0700 (PDT) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: isearch-other-meta-char and shift Organization: JURTA Date: Tue, 27 Aug 2013 19:28:22 +0300 Message-ID: <8761urkssh.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [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: -3.4 (---) X-Debbugs-Envelope-To: submit 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: -3.4 (---) There is a problem in `isearch-other-meta-char' with shifted characters. Typing exits Isearch instead of adding 0 to the search string. A possible fix is to handle shifted kp-numbers like shifted control characters are handled in the second `cond' branch of `isearch-other-meta-char': === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-07-05 20:15:32 +0000 +++ lisp/isearch.el 2013-08-27 16:27:45 +0000 @@ -2550,6 +2606,16 @@ (defun isearch-other-meta-char (&optiona (lookup-key local-function-key-map key))) (while keylist (setq key (car keylist)) + ;; Handle an undefined shifted printing character + ;; by downshifting it if that makes it printing. + ;; (As read-key-sequence would normally do, + ;; if we didn't have a default definition.) + (if (and (integerp key) + (memq 'shift (event-modifiers key)) + (>= key (+ ?\s (- ?\S-a ?a))) + (/= key (+ 127 (- ?\S-a ?a))) + (< key (+ 256 (- ?\S-a ?a)))) + (setq key (- key (- ?\S-a ?a)))) ;; If KEY is a printing char, we handle it here ;; directly to avoid the input method and keyboard ;; coding system translating it. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 27 12:48:56 2013 Received: (at 15200) by debbugs.gnu.org; 27 Aug 2013 16:48:56 +0000 Received: from localhost ([127.0.0.1]:59511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEMRs-00030D-12 for submit@debbugs.gnu.org; Tue, 27 Aug 2013 12:48:56 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:52202 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEMRp-000304-6j for 15200@debbugs.gnu.org; Tue, 27 Aug 2013 12:48:53 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 77A95258B9E935 for <15200@debbugs.gnu.org>; Tue, 27 Aug 2013 09:48:51 -0700 (PDT) From: Juri Linkov To: 15200@debbugs.gnu.org Subject: Re: bug#15200: isearch-other-meta-char and shift Organization: JURTA References: <8761urkssh.fsf@mail.jurta.org> Date: Tue, 27 Aug 2013 19:45:51 +0300 In-Reply-To: <8761urkssh.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 27 Aug 2013 19:28:22 +0300") Message-ID: <87fvtvgk00.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15200 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 (/) Another problem is that shifted cursor motion keys don't activate the region. Test case: `C-s S-right' exits isearch (OK), moves cursor to the right (OK), but doesn't activate the region (BUG). The same bug is for other shift-selection keys: `C-s S-C-right', `C-s S-C-f', `C-s S-M-f' don't activate the region like they do outside of isearch. I see that the shift key is swallowed by `read-key-sequence' in `isearch-reread-key-sequence-naturally' called from `isearch-other-meta-char'. However, when the argument DONT-DOWNCASE-LAST of `read-key-sequence' is non-nil, it doesn't translate shifted keys and leaves shift-modifiers with them in `unread-command-events': === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-07-05 20:15:32 +0000 +++ lisp/isearch.el 2013-08-27 16:38:41 +0000 @@ -2502,7 +2556,9 @@ (defun isearch-reread-key-sequence-natur Return the key sequence as a string/vector." (isearch-unread-key-sequence keylist) (let (overriding-terminal-local-map) - (read-key-sequence nil))) ; This will go through function-key-map, if nec. + ;; This will go through function-key-map, if nec. + ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation. + (read-key-sequence nil nil t))) (defalias 'isearch-other-control-char 'isearch-other-meta-char) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 27 20:27:23 2013 Received: (at 15200) by debbugs.gnu.org; 28 Aug 2013 00:27:23 +0000 Received: from localhost ([127.0.0.1]:60165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VETbW-0006Ea-Mk for submit@debbugs.gnu.org; Tue, 27 Aug 2013 20:27:22 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:65174) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VETbU-0006EP-1l for 15200@debbugs.gnu.org; Tue, 27 Aug 2013 20:27:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0KABK/CFHO+KK6/2dsb2JhbABEvg0EAnsXc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA6R6gV6DE4FKJA X-IPAS-Result: At0KABK/CFHO+KK6/2dsb2JhbABEvg0EAnsXc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA6R6gV6DE4FKJA X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="25083970" Received: from 206-248-162-186.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 27 Aug 2013 20:24:38 -0400 Received: by pastel.home (Postfix, from userid 20848) id CFF6B62D20; Tue, 27 Aug 2013 20:27:18 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#15200: isearch-other-meta-char and shift Message-ID: References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> Date: Tue, 27 Aug 2013 20:27:18 -0400 In-Reply-To: <87fvtvgk00.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 27 Aug 2013 19:45:51 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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.3 (/) > Another problem is that shifted cursor motion keys > don't activate the region. Test case: These are all the kinds of problems one gets into when one reads events and then want to re-read them in a different context. My hope is that these kinds of problems would all disappear if we re-implemented isearch using set-temporary-overlay-map, which would save us from having to re-read events. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 12:43:22 2013 Received: (at 15200) by debbugs.gnu.org; 28 Aug 2013 16:43:22 +0000 Received: from localhost ([127.0.0.1]:33674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEiq2-0007B5-AM for submit@debbugs.gnu.org; Wed, 28 Aug 2013 12:43:22 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:47449 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEipz-0007Aw-KV for 15200@debbugs.gnu.org; Wed, 28 Aug 2013 12:43:20 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 61CB2258B9E935; Wed, 28 Aug 2013 09:43:17 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#15200: isearch-other-meta-char and shift Organization: JURTA References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> Date: Wed, 28 Aug 2013 19:42:28 +0300 In-Reply-To: (Stefan Monnier's message of "Tue, 27 Aug 2013 20:27:18 -0400") Message-ID: <877gf5rcoz.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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 (/) > My hope is that these kinds of problems would all disappear if we > re-implemented isearch using set-temporary-overlay-map, which would save > us from having to re-read events. After installing small fixes I'm not closing this report while trying to re-implement it using set-temporary-overlay-map. IIUC, the biggest challenge is to add a new argument to set-temporary-overlay-map that will define a predicate to decide whether this-command-keys should be applied to key bindings of the overriding temporary map or passed through to other less specific keymaps. This predicate is necessary when the decision to select a keymap to apply keys depends on a property put on a bound command's symbol like isearch-scroll properties. Such a predicate could be implemented as a hook-like variable or with the help of add-function like is used now for isearch-filter-predicate. Then additional predicates could be added to the almost empty default function isearch-other-control-char. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 14:33:33 2013 Received: (at 15200) by debbugs.gnu.org; 28 Aug 2013 18:33:33 +0000 Received: from localhost ([127.0.0.1]:33937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEkYe-0002W9-DA for submit@debbugs.gnu.org; Wed, 28 Aug 2013 14:33:32 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:48266) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEkYc-0002W0-E6 for 15200@debbugs.gnu.org; Wed, 28 Aug 2013 14:33:30 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r7SIXTeZ014234; Wed, 28 Aug 2013 14:33:29 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 9966FB432E; Wed, 28 Aug 2013 14:33:29 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#15200: isearch-other-meta-char and shift Message-ID: References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> Date: Wed, 28 Aug 2013 14:33:29 -0400 In-Reply-To: <877gf5rcoz.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 28 Aug 2013 19:42:28 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4684=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4684> : streams <1027449> : uri <1520371> X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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: -3.8 (---) > while trying to re-implement it using set-temporary-overlay-map. That sounds great. Keep us informed of your progress. > IIUC, the biggest challenge is to add a new argument > to set-temporary-overlay-map that will define a predicate > to decide whether this-command-keys should be applied to > key bindings of the overriding temporary map or passed through > to other less specific keymaps. Not sure I understand. Why do we need to look at this-command-keys? Are you keeping the default [t] binding in isearch-mode-map, maybe? That would defeat the purpose of using set-temporary-overlay-map, I think. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 02:55:27 2013 Received: (at 15200) by debbugs.gnu.org; 29 Aug 2013 06:55:27 +0000 Received: from localhost ([127.0.0.1]:34967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEw8b-0004sq-QH for submit@debbugs.gnu.org; Thu, 29 Aug 2013 02:55:26 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:41204 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VEw8V-0004sY-GE for 15200@debbugs.gnu.org; Thu, 29 Aug 2013 02:55:20 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 5838F258B9E935; Wed, 28 Aug 2013 23:55:16 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#15200: isearch-other-meta-char and shift Organization: JURTA References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> Date: Thu, 29 Aug 2013 09:49:47 +0300 In-Reply-To: (Stefan Monnier's message of "Wed, 28 Aug 2013 14:33:29 -0400") Message-ID: <87wqn53sac.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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 (/) >> IIUC, the biggest challenge is to add a new argument >> to set-temporary-overlay-map that will define a predicate >> to decide whether this-command-keys should be applied to >> key bindings of the overriding temporary map or passed through >> to other less specific keymaps. > > Not sure I understand. Why do we need to look at this-command-keys? > Are you keeping the default [t] binding in isearch-mode-map, maybe? > That would defeat the purpose of using set-temporary-overlay-map, > I think. Hmm, I can't imagine how to keep the isearch-allow-scroll feature and other conditional exiting features like search-exit-option without keeping the default [t] binding in isearch-mode-map to the function like the current isearch-other-meta-char where these conditions can be checked. Maybe the arg KEEP-PRED set-temporary-overlay-map can be used to decide whether to exit Isearch and apply the key sequence to global keymaps? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 08:31:00 2013 Received: (at 15200) by debbugs.gnu.org; 29 Aug 2013 12:31:00 +0000 Received: from localhost ([127.0.0.1]:35553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VF1NL-00076T-JN for submit@debbugs.gnu.org; Thu, 29 Aug 2013 08:30:59 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:11455) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VF1NJ-00076J-DX for 15200@debbugs.gnu.org; Thu, 29 Aug 2013 08:30:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxOBSiQ X-IPAS-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxOBSiQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="25790525" Received: from 206-248-162-186.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Aug 2013 08:28:08 -0400 Received: by pastel.home (Postfix, from userid 20848) id 5B7E662D08; Thu, 29 Aug 2013 08:30:52 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#15200: isearch-other-meta-char and shift Message-ID: References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> Date: Thu, 29 Aug 2013 08:30:52 -0400 In-Reply-To: <87wqn53sac.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 29 Aug 2013 09:49:47 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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.3 (/) > Maybe the arg KEEP-PRED set-temporary-overlay-map > can be used to decide whether to exit Isearch and > apply the key sequence to global keymaps? Of course: KEEP-PRED can also be a function of no arguments: if it returns non-nil then MAP stays active. KEEP-PRED is run in pre-command-hook, so it can check this-command. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 01 14:50:25 2013 Received: (at 15200) by debbugs.gnu.org; 1 Sep 2013 18:50:25 +0000 Received: from localhost ([127.0.0.1]:35229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGCj9-0008UP-Ud for submit@debbugs.gnu.org; Sun, 01 Sep 2013 14:50:24 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:33956 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGCj5-0008U9-F5 for 15200@debbugs.gnu.org; Sun, 01 Sep 2013 14:50:21 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 097D5258B9E935; Sun, 1 Sep 2013 11:50:11 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#15200: isearch-other-meta-char and shift Organization: JURTA References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> Date: Sun, 01 Sep 2013 21:45:09 +0300 In-Reply-To: (Stefan Monnier's message of "Thu, 29 Aug 2013 08:30:52 -0400") Message-ID: <87vc2k7556.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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 (/) >> Maybe the arg KEEP-PRED set-temporary-overlay-map >> can be used to decide whether to exit Isearch and >> apply the key sequence to global keymaps? > > Of course: > > KEEP-PRED can also be a function of no arguments: if it returns > non-nil then MAP stays active. > > KEEP-PRED is run in pre-command-hook, so it can check this-command. Surprisingly, I see no problems with this approach. First I tried to implement the logic of KEEP-PRED without using set-temporary-overlay-map, i.e. by adding a new function isearch-mode-keep-pred to pre-command-hook. isearch-mode-keep-pred is created from isearch-other-meta-char by removing all re-reading, and adding a new condition ((lookup-key isearch-mode-map key nil)) to not exit Isearch mode for Isearch key bindings. Otherwise, Isearch mode is exited by isearch-done and this-command is executed in global context. Later isearch-mode-keep-pred could be further simplified, e.g. instead of calling command-execute for isearch-allow-scroll, it could pass execution to global key binding and add isearch post-processing of isearch-back-into-window to post-command-hook, etc. === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-08-28 16:39:51 +0000 +++ lisp/isearch.el 2013-09-01 18:42:04 +0000 @@ -349,7 +349,6 @@ (defvar lazy-highlight-face 'lazy-highli (defvar isearch-help-map (let ((map (make-sparse-keymap))) - (define-key map [t] 'isearch-other-control-char) (define-key map (char-to-string help-char) 'isearch-help-for-help) (define-key map [help] 'isearch-help-for-help) (define-key map [f1] 'isearch-help-for-help) @@ -423,9 +422,6 @@ (defvar isearch-mode-map ;; Make all multibyte characters search for themselves. (set-char-table-range (nth 1 map) (cons #x100 (max-char)) 'isearch-printing-char) - ;; Make function keys, etc, which aren't bound to a scrolling-function - ;; exit the search. - (define-key map [t] 'isearch-other-control-char) ;; Single-byte printing chars extend the search string by default. (setq i ?\s) @@ -440,8 +436,7 @@ (defvar isearch-mode-map ;; default local key binding for any key not otherwise bound. (let ((meta-map (make-sparse-keymap))) (define-key map (char-to-string meta-prefix-char) meta-map) - (define-key map [escape] meta-map) - (define-key meta-map [t] 'isearch-other-meta-char)) + (define-key map [escape] meta-map)) ;; Several non-printing chars change the searching behavior. (define-key map "\C-s" 'isearch-repeat-forward) @@ -521,9 +516,6 @@ (defvar isearch-mode-map ;; The key translations defined in the C-x 8 prefix should add ;; characters to the search string. See iso-transl.el. - (define-key map "\C-x" nil) - (define-key map [?\C-x t] 'isearch-other-control-char) - (define-key map "\C-x8" nil) (define-key map "\C-x8\r" 'isearch-char-by-name) map) @@ -920,6 +912,7 @@ (defun isearch-mode (forward &optional r (isearch-update) + (add-hook 'pre-command-hook 'isearch-mode-keep-pred) (add-hook 'mouse-leave-buffer-hook 'isearch-done) (add-hook 'kbd-macro-termination-hook 'isearch-done) @@ -998,6 +991,7 @@ (defun isearch-done (&optional nopush ed (unless (equal (car command-history) command) (setq command-history (cons command command-history))))) + (remove-hook 'pre-command-hook 'isearch-mode-keep-pred) (remove-hook 'mouse-leave-buffer-hook 'isearch-done) (remove-hook 'kbd-macro-termination-hook 'isearch-done) (setq isearch-lazy-highlight-start nil) @@ -2100,26 +2094,6 @@ (defun isearch-fallback (want-backslash (min last-other-end isearch-barrier))) (setq isearch-adjusted t))))))) -(defun isearch-unread-key-sequence (keylist) - "Unread the given key-sequence KEYLIST. -Scroll-bar or mode-line events are processed appropriately." - (cancel-kbd-macro-events) - (apply 'isearch-unread keylist) - ;; If the event was a scroll-bar or mode-line click, the event will have - ;; been prefixed by a symbol such as vertical-scroll-bar. We must remove - ;; it here, because this symbol will be attached to the event again next - ;; time it gets read by read-key-sequence. - ;; - ;; (Old comment from isearch-other-meta-char: "Note that we don't have to - ;; modify the event anymore in 21 because read_key_sequence no longer - ;; modifies events to produce fake prefix keys.") - (if (and (> (length keylist) 1) - (symbolp (car keylist)) - (listp (cadr keylist)) - (not (numberp (posn-point - (event-start (cadr keylist) ))))) - (pop unread-command-events))) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; scrolling within Isearch mode. Alan Mackenzie (acm@muc.de), 2003/2/24 ;; @@ -2244,15 +2218,6 @@ (defun isearch-back-into-window (above i (recenter 0)))) (goto-char isearch-point)) -(defun isearch-reread-key-sequence-naturally (keylist) - "Reread key sequence KEYLIST with an inactive Isearch-mode keymap. -Return the key sequence as a string/vector." - (isearch-unread-key-sequence keylist) - (let (overriding-terminal-local-map) - ;; This will go through function-key-map, if nec. - ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation. - (read-key-sequence nil nil t))) - (defun isearch-lookup-scroll-key (key-seq) "If KEY-SEQ is bound to a scrolling command, return it as a symbol. Otherwise return nil." @@ -2263,47 +2228,25 @@ (defun isearch-lookup-scroll-key (key-se (eq (get binding 'scroll-command) t)) binding))) -(defalias 'isearch-other-control-char 'isearch-other-meta-char) - -(defun isearch-other-meta-char (&optional arg) - "Process a miscellaneous key sequence in Isearch mode. - -Try to convert the current key-sequence to something usable in Isearch -mode, either by converting it with `function-key-map', downcasing a -key with C-, or finding a \"scrolling command\" bound to -it. \(In the last case, we may have to read more events.) If so, -either unread the converted sequence or execute the command. - -Otherwise, if `search-exit-option' is non-nil (the default) unread the -key-sequence and exit the search normally. If it is the symbol -`edit', the search string is edited in the minibuffer and the meta -character is unread so that it applies to editing the string. - -ARG is the prefix argument. It will be transmitted through to the -scrolling command or to the command whose key-sequence exits -Isearch mode." - (interactive "P") +(defun isearch-mode-keep-pred () (let* ((key (if current-prefix-arg ; not nec the same as ARG (substring (this-command-keys) universal-argument-num-events) (this-command-keys))) (main-event (aref key 0)) (keylist (listify-key-sequence key)) scroll-command isearch-point) - (cond ((and (= (length key) 1) + (cond ((lookup-key isearch-mode-map key nil)) + ((and (= (length key) 1) (let ((lookup (lookup-key local-function-key-map key))) (not (or (null lookup) (integerp lookup) (keymapp lookup))))) ;; Handle a function key that translates into something else. ;; If the key has a global definition too, - ;; exit and unread the key itself, so its global definition runs. - ;; Otherwise, unread the translation, - ;; so that the translated key takes effect within isearch. - (cancel-kbd-macro-events) + ;; exit, so its global definition runs. + ;; Otherwise, translated key takes effect within isearch. (if (lookup-key global-map key) (progn - (isearch-done) - (setq prefix-arg arg) - (apply 'isearch-unread keylist)) + (isearch-done)) (setq keylist (listify-key-sequence (lookup-key local-function-key-map key))) @@ -2311,8 +2254,6 @@ (defun isearch-other-meta-char (&optiona (setq key (car keylist)) ;; Handle an undefined shifted printing character ;; by downshifting it if that makes it printing. - ;; (As read-key-sequence would normally do, - ;; if we didn't have a default definition.) (if (and (integerp key) (memq 'shift (event-modifiers key)) (>= key (+ ?\s (- ?\S-a ?a))) @@ -2331,15 +2272,11 @@ (defun isearch-other-meta-char (&optiona (isearch-process-search-char key) (setq keylist (cdr keylist))) ;; As the remaining keys in KEYLIST can't be handled - ;; here, we must reread them. - (setq prefix-arg arg) - (apply 'isearch-unread keylist) - (setq keylist nil))))) + ;; here, exit. + (isearch-done))))) ( ;; Handle an undefined shifted control character ;; by downshifting it if that makes it defined. - ;; (As read-key-sequence would normally do, - ;; if we didn't have a default definition.) (let ((mods (event-modifiers main-event))) (and (integerp main-event) (memq 'shift mods) @@ -2352,20 +2289,13 @@ (defun isearch-other-meta-char (&optiona copy) nil) '(nil - isearch-other-control-char))))) + ))))) (setcar keylist (- main-event (- ?\C-\S-a ?\C-a))) - (cancel-kbd-macro-events) - (setq prefix-arg arg) - (apply 'isearch-unread keylist)) + (isearch-done)) ((eq search-exit-option 'edit) - (setq prefix-arg arg) - (apply 'isearch-unread keylist) (isearch-edit-string)) ;; Handle a scrolling function or prefix argument. ((progn - (setq key (isearch-reread-key-sequence-naturally keylist) - keylist (listify-key-sequence key) - main-event (aref key 0)) (or (and isearch-allow-scroll (setq scroll-command (isearch-lookup-scroll-key key))) (and isearch-allow-prefix @@ -2374,12 +2304,7 @@ (defun isearch-other-meta-char (&optiona (memq scroll-command '(universal-argument negative-argument digit-argument)))))) - ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a - ;; complete key sequence, possibly as modified by function-key-map, - ;; not merely the one or two event fragment which invoked - ;; isearch-other-meta-char in the first place. (setq isearch-point (point)) - (setq prefix-arg arg) (command-execute scroll-command) (let ((ab-bel (isearch-string-out-of-window isearch-point))) (if ab-bel @@ -2394,16 +2319,6 @@ (defun isearch-other-meta-char (&optiona (isearch-edit-string)) (search-exit-option (let (window) - (setq prefix-arg arg) - (isearch-unread-key-sequence keylist) - (setq main-event (car unread-command-events)) - - ;; Don't store special commands in the keyboard macro. - (let (overriding-terminal-local-map) - (when (memq (key-binding key) - '(kmacro-start-macro - kmacro-end-macro kmacro-end-and-call-macro)) - (cancel-kbd-macro-events))) ;; If we got a mouse click event, that event contains the ;; window clicked on. maybe it was read with the buffer @@ -2432,8 +2347,7 @@ (defun isearch-other-meta-char (&optiona (isearch-done) (isearch-clean-overlays)) (isearch-done) - (isearch-clean-overlays) - (setq prefix-arg arg)))) + (isearch-clean-overlays)))) (t;; otherwise nil (isearch-process-search-string key key))))) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 02 22:12:23 2013 Received: (at 15200) by debbugs.gnu.org; 3 Sep 2013 02:12:24 +0000 Received: from localhost ([127.0.0.1]:38069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGg6R-0002Gy-FH for submit@debbugs.gnu.org; Mon, 02 Sep 2013 22:12:23 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:5257) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGg6O-0002Gi-8w for 15200@debbugs.gnu.org; Mon, 02 Sep 2013 22:12:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2OLoJcA6R6gV6CaimBSiQ X-IPAS-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2OLoJcA6R6gV6CaimBSiQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="26277347" Received: from 206-248-162-186.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Sep 2013 22:09:18 -0400 Received: by pastel.home (Postfix, from userid 20848) id 4DEBD62D59; Mon, 2 Sep 2013 22:12:14 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#15200: isearch-other-meta-char and shift Message-ID: References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> <87vc2k7556.fsf@mail.jurta.org> Date: Mon, 02 Sep 2013 22:12:14 -0400 In-Reply-To: <87vc2k7556.fsf@mail.jurta.org> (Juri Linkov's message of "Sun, 01 Sep 2013 21:45:09 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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.3 (/) > Surprisingly, I see no problems with this approach. Oh, right without using set-temporary-overlay-map at all, but only relying on the new behavior of overriding-terminal-local-map. Yes, that should work fine. > + (cond ((lookup-key isearch-mode-map key nil)) > + ((and (= (length key) 1) > (let ((lookup (lookup-key local-function-key-map key))) > (not (or (null lookup) (integerp lookup) > (keymapp lookup))))) We should not need to consider local-function-key-map any more. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 02 22:22:48 2013 Received: (at 15200) by debbugs.gnu.org; 3 Sep 2013 02:22:48 +0000 Received: from localhost ([127.0.0.1]:38127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGgGV-0002Zz-V2 for submit@debbugs.gnu.org; Mon, 02 Sep 2013 22:22:48 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:33766) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGgGT-0002Za-IR for 15200@debbugs.gnu.org; Mon, 02 Sep 2013 22:22:46 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r832Mcmf023724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 3 Sep 2013 02:22:39 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r832MbGA003926 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 Sep 2013 02:22:38 GMT Received: from abhmt105.oracle.com (abhmt105.oracle.com [141.146.116.57]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r832MbvA003919; Tue, 3 Sep 2013 02:22:37 GMT MIME-Version: 1.0 Message-ID: Date: Mon, 2 Sep 2013 19:22:34 -0700 (PDT) From: Drew Adams To: Stefan Monnier , Juri Linkov Subject: RE: bug#15200: isearch-other-meta-char and shift References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> <87vc2k7556.fsf@mail.jurta.org> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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.7 (----) > > Surprisingly, I see no problems with this approach. >=20 > Oh, right without using set-temporary-overlay-map at all, but only > relying on the new behavior of overriding-terminal-local-map. > Yes, that should work fine. I hope this kind of thing will be made clear in the Elisp manual by the time Emacs 24.4 is released. It's not very clear to me yet; I look forward to learning a bit more about it. I see that there is a NEWS item about `overriding-terminal-local-map' for Emacs 24.4 (good), but the Elisp manual does not seem up-to-date about it yet. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 16 17:36:59 2013 Received: (at control) by debbugs.gnu.org; 16 Sep 2013 21:36:59 +0000 Received: from localhost ([127.0.0.1]:41949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLgTa-0003rs-Oo for submit@debbugs.gnu.org; Mon, 16 Sep 2013 17:36:59 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:39539 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLgTX-0003rc-K6 for control@debbugs.gnu.org; Mon, 16 Sep 2013 17:36:56 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 84D52258B9E935 for ; Mon, 16 Sep 2013 14:36:54 -0700 (PDT) From: Juri Linkov To: control@debbugs.gnu.org Subject: Re: bug#15383: universal-argument-num-events is void Organization: JURTA References: <87vc22mobi.fsf@mail.jurta.org> Date: Tue, 17 Sep 2013 00:23:59 +0300 In-Reply-To: (Stefan Monnier's message of "Sun, 15 Sep 2013 13:11:50 -0400") Message-ID: <87bo3ssb7c.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (/) merge 15200 15383 thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 16 18:17:13 2013 Received: (at 15200) by debbugs.gnu.org; 16 Sep 2013 22:17:14 +0000 Received: from localhost ([127.0.0.1]:42038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLh6W-0005uT-PO for submit@debbugs.gnu.org; Mon, 16 Sep 2013 18:17:13 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:41970 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLh6S-0005uF-UO for 15200@debbugs.gnu.org; Mon, 16 Sep 2013 18:17:10 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id DECBE258B9E935; Mon, 16 Sep 2013 15:17:06 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#15200: isearch-other-meta-char and shift Organization: JURTA References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> <87vc2k7556.fsf@mail.jurta.org> Date: Tue, 17 Sep 2013 01:09:36 +0300 In-Reply-To: (Stefan Monnier's message of "Mon, 02 Sep 2013 22:12:14 -0400") Message-ID: <87txhko1mb.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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 (/) >> Surprisingly, I see no problems with this approach. > > Oh, right without using set-temporary-overlay-map at all, but only > relying on the new behavior of overriding-terminal-local-map. > Yes, that should work fine. set-temporary-overlay-map could be added later too if possible. >> + (cond ((lookup-key isearch-mode-map key nil)) >> + ((and (= (length key) 1) >> (let ((lookup (lookup-key local-function-key-map key))) >> (not (or (null lookup) (integerp lookup) >> (keymapp lookup))))) > > We should not need to consider local-function-key-map any more. Maybe I'm missing something, but it seems working without local-function-key-map and without much of other legacy code. Also I removed `universal-argument-num-events' in the patch, but now typing: `C-s C-3 C-l' doubles the arg 3 in prefix-arg to 33, `C-s C-4 C-l' doubles the arg 4 in prefix-arg to 44, etc. This happens after this code: (memq scroll-command '(universal-argument negative-argument digit-argument)))))) (command-execute scroll-command) Perhaps `command-execute' should be removed here. It's not yet removed in this patch since I'm not sure because after moving its post-processing code: (let ((ab-bel (isearch-string-out-of-window isearch-point))) (if ab-bel (isearch-back-into-window (eq ab-bel 'above) isearch-point) (goto-char isearch-point))) to `post-command-hook' will make impossible to use later `set-temporary-overlay-map' (that doesn't use `post-command-hook' but maybe this is not a problem). === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-08-28 16:39:51 +0000 +++ lisp/isearch.el 2013-09-16 22:08:10 +0000 @@ -349,7 +349,6 @@ (defvar lazy-highlight-face 'lazy-highli (defvar isearch-help-map (let ((map (make-sparse-keymap))) - (define-key map [t] 'isearch-other-control-char) (define-key map (char-to-string help-char) 'isearch-help-for-help) (define-key map [help] 'isearch-help-for-help) (define-key map [f1] 'isearch-help-for-help) @@ -423,9 +422,6 @@ (defvar isearch-mode-map ;; Make all multibyte characters search for themselves. (set-char-table-range (nth 1 map) (cons #x100 (max-char)) 'isearch-printing-char) - ;; Make function keys, etc, which aren't bound to a scrolling-function - ;; exit the search. - (define-key map [t] 'isearch-other-control-char) ;; Single-byte printing chars extend the search string by default. (setq i ?\s) @@ -440,8 +436,7 @@ (defvar isearch-mode-map ;; default local key binding for any key not otherwise bound. (let ((meta-map (make-sparse-keymap))) (define-key map (char-to-string meta-prefix-char) meta-map) - (define-key map [escape] meta-map) - (define-key meta-map [t] 'isearch-other-meta-char)) + (define-key map [escape] meta-map)) ;; Several non-printing chars change the searching behavior. (define-key map "\C-s" 'isearch-repeat-forward) @@ -521,9 +516,6 @@ (defvar isearch-mode-map ;; The key translations defined in the C-x 8 prefix should add ;; characters to the search string. See iso-transl.el. - (define-key map "\C-x" nil) - (define-key map [?\C-x t] 'isearch-other-control-char) - (define-key map "\C-x8" nil) (define-key map "\C-x8\r" 'isearch-char-by-name) map) @@ -920,6 +912,7 @@ (defun isearch-mode (forward &optional r (isearch-update) + (add-hook 'pre-command-hook 'isearch-mode-keep-pred) (add-hook 'mouse-leave-buffer-hook 'isearch-done) (add-hook 'kbd-macro-termination-hook 'isearch-done) @@ -998,6 +991,7 @@ (defun isearch-done (&optional nopush ed (unless (equal (car command-history) command) (setq command-history (cons command command-history))))) + (remove-hook 'pre-command-hook 'isearch-mode-keep-pred) (remove-hook 'mouse-leave-buffer-hook 'isearch-done) (remove-hook 'kbd-macro-termination-hook 'isearch-done) (setq isearch-lazy-highlight-start nil) @@ -2100,26 +2094,6 @@ (defun isearch-fallback (want-backslash (min last-other-end isearch-barrier))) (setq isearch-adjusted t))))))) -(defun isearch-unread-key-sequence (keylist) - "Unread the given key-sequence KEYLIST. -Scroll-bar or mode-line events are processed appropriately." - (cancel-kbd-macro-events) - (apply 'isearch-unread keylist) - ;; If the event was a scroll-bar or mode-line click, the event will have - ;; been prefixed by a symbol such as vertical-scroll-bar. We must remove - ;; it here, because this symbol will be attached to the event again next - ;; time it gets read by read-key-sequence. - ;; - ;; (Old comment from isearch-other-meta-char: "Note that we don't have to - ;; modify the event anymore in 21 because read_key_sequence no longer - ;; modifies events to produce fake prefix keys.") - (if (and (> (length keylist) 1) - (symbolp (car keylist)) - (listp (cadr keylist)) - (not (numberp (posn-point - (event-start (cadr keylist) ))))) - (pop unread-command-events))) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; scrolling within Isearch mode. Alan Mackenzie (acm@muc.de), 2003/2/24 ;; @@ -2244,15 +2218,6 @@ (defun isearch-back-into-window (above i (recenter 0)))) (goto-char isearch-point)) -(defun isearch-reread-key-sequence-naturally (keylist) - "Reread key sequence KEYLIST with an inactive Isearch-mode keymap. -Return the key sequence as a string/vector." - (isearch-unread-key-sequence keylist) - (let (overriding-terminal-local-map) - ;; This will go through function-key-map, if nec. - ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation. - (read-key-sequence nil nil t))) - (defun isearch-lookup-scroll-key (key-seq) "If KEY-SEQ is bound to a scrolling command, return it as a symbol. Otherwise return nil." @@ -2263,109 +2228,16 @@ (defun isearch-lookup-scroll-key (key-se (eq (get binding 'scroll-command) t)) binding))) -(defalias 'isearch-other-control-char 'isearch-other-meta-char) - -(defun isearch-other-meta-char (&optional arg) - "Process a miscellaneous key sequence in Isearch mode. - -Try to convert the current key-sequence to something usable in Isearch -mode, either by converting it with `function-key-map', downcasing a -key with C-, or finding a \"scrolling command\" bound to -it. \(In the last case, we may have to read more events.) If so, -either unread the converted sequence or execute the command. - -Otherwise, if `search-exit-option' is non-nil (the default) unread the -key-sequence and exit the search normally. If it is the symbol -`edit', the search string is edited in the minibuffer and the meta -character is unread so that it applies to editing the string. - -ARG is the prefix argument. It will be transmitted through to the -scrolling command or to the command whose key-sequence exits -Isearch mode." - (interactive "P") - (let* ((key (if current-prefix-arg ; not nec the same as ARG - (substring (this-command-keys) universal-argument-num-events) - (this-command-keys))) +(defun isearch-mode-keep-pred () + (let* ((key (this-command-keys)) (main-event (aref key 0)) (keylist (listify-key-sequence key)) scroll-command isearch-point) - (cond ((and (= (length key) 1) - (let ((lookup (lookup-key local-function-key-map key))) - (not (or (null lookup) (integerp lookup) - (keymapp lookup))))) - ;; Handle a function key that translates into something else. - ;; If the key has a global definition too, - ;; exit and unread the key itself, so its global definition runs. - ;; Otherwise, unread the translation, - ;; so that the translated key takes effect within isearch. - (cancel-kbd-macro-events) - (if (lookup-key global-map key) - (progn - (isearch-done) - (setq prefix-arg arg) - (apply 'isearch-unread keylist)) - (setq keylist - (listify-key-sequence - (lookup-key local-function-key-map key))) - (while keylist - (setq key (car keylist)) - ;; Handle an undefined shifted printing character - ;; by downshifting it if that makes it printing. - ;; (As read-key-sequence would normally do, - ;; if we didn't have a default definition.) - (if (and (integerp key) - (memq 'shift (event-modifiers key)) - (>= key (+ ?\s (- ?\S-a ?a))) - (/= key (+ 127 (- ?\S-a ?a))) - (< key (+ 256 (- ?\S-a ?a)))) - (setq key (- key (- ?\S-a ?a)))) - ;; If KEY is a printing char, we handle it here - ;; directly to avoid the input method and keyboard - ;; coding system translating it. - (if (and (integerp key) - (>= key ?\s) (/= key 127) (< key 256)) - (progn - ;; Ensure that the processed char is recorded in - ;; the keyboard macro, if any (Bug#4894) - (store-kbd-macro-event key) - (isearch-process-search-char key) - (setq keylist (cdr keylist))) - ;; As the remaining keys in KEYLIST can't be handled - ;; here, we must reread them. - (setq prefix-arg arg) - (apply 'isearch-unread keylist) - (setq keylist nil))))) - ( - ;; Handle an undefined shifted control character - ;; by downshifting it if that makes it defined. - ;; (As read-key-sequence would normally do, - ;; if we didn't have a default definition.) - (let ((mods (event-modifiers main-event))) - (and (integerp main-event) - (memq 'shift mods) - (memq 'control mods) - (not (memq (lookup-key isearch-mode-map - (let ((copy (copy-sequence key))) - (aset copy 0 - (- main-event - (- ?\C-\S-a ?\C-a))) - copy) - nil) - '(nil - isearch-other-control-char))))) - (setcar keylist (- main-event (- ?\C-\S-a ?\C-a))) - (cancel-kbd-macro-events) - (setq prefix-arg arg) - (apply 'isearch-unread keylist)) + (cond ((lookup-key isearch-mode-map key nil)) ((eq search-exit-option 'edit) - (setq prefix-arg arg) - (apply 'isearch-unread keylist) (isearch-edit-string)) ;; Handle a scrolling function or prefix argument. ((progn - (setq key (isearch-reread-key-sequence-naturally keylist) - keylist (listify-key-sequence key) - main-event (aref key 0)) (or (and isearch-allow-scroll (setq scroll-command (isearch-lookup-scroll-key key))) (and isearch-allow-prefix @@ -2374,12 +2246,7 @@ (defun isearch-other-meta-char (&optiona (memq scroll-command '(universal-argument negative-argument digit-argument)))))) - ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a - ;; complete key sequence, possibly as modified by function-key-map, - ;; not merely the one or two event fragment which invoked - ;; isearch-other-meta-char in the first place. (setq isearch-point (point)) - (setq prefix-arg arg) (command-execute scroll-command) (let ((ab-bel (isearch-string-out-of-window isearch-point))) (if ab-bel @@ -2394,16 +2261,6 @@ (defun isearch-other-meta-char (&optiona (isearch-edit-string)) (search-exit-option (let (window) - (setq prefix-arg arg) - (isearch-unread-key-sequence keylist) - (setq main-event (car unread-command-events)) - - ;; Don't store special commands in the keyboard macro. - (let (overriding-terminal-local-map) - (when (memq (key-binding key) - '(kmacro-start-macro - kmacro-end-macro kmacro-end-and-call-macro)) - (cancel-kbd-macro-events))) ;; If we got a mouse click event, that event contains the ;; window clicked on. maybe it was read with the buffer @@ -2432,8 +2289,7 @@ (defun isearch-other-meta-char (&optiona (isearch-done) (isearch-clean-overlays)) (isearch-done) - (isearch-clean-overlays) - (setq prefix-arg arg)))) + (isearch-clean-overlays)))) (t;; otherwise nil (isearch-process-search-string key key))))) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 16 21:21:38 2013 Received: (at 15200) by debbugs.gnu.org; 17 Sep 2013 01:21:39 +0000 Received: from localhost ([127.0.0.1]:42289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLjyz-00022j-Tv for submit@debbugs.gnu.org; Mon, 16 Sep 2013 21:21:38 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:60525) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLjyy-00022W-5t for 15200@debbugs.gnu.org; Mon, 16 Sep 2013 21:21:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxOBSiQ X-IPAS-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxOBSiQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28094804" Received: from 184-175-16-104.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 16 Sep 2013 21:17:45 -0400 Received: by pastel.home (Postfix, from userid 20848) id 4080262DA7; Mon, 16 Sep 2013 21:21:30 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#15200: isearch-other-meta-char and shift Message-ID: References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> <87vc2k7556.fsf@mail.jurta.org> <87txhko1mb.fsf@mail.jurta.org> Date: Mon, 16 Sep 2013 21:21:30 -0400 In-Reply-To: <87txhko1mb.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 17 Sep 2013 01:09:36 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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.3 (/) > set-temporary-overlay-map could be added later too if possible. Why bother? > Maybe I'm missing something, but it seems working without > local-function-key-map and without much of other legacy code. That's the intention. Much of that code was trying to reproduce the normal behavior (prevented by the [t] binding), or to undo the direct effect of the [t] binding. > Also I removed `universal-argument-num-events' in the patch, > but now typing: > `C-s C-3 C-l' doubles the arg 3 in prefix-arg to 33, > `C-s C-4 C-l' doubles the arg 4 in prefix-arg to 44, etc. Aha, now it's getting more interesting: the interaction between various commands using overriding-terminal-local-map. I'll take a look at it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 16 22:19:26 2013 Received: (at 15200) by debbugs.gnu.org; 17 Sep 2013 02:19:26 +0000 Received: from localhost ([127.0.0.1]:42375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLksv-0003Sz-4W for submit@debbugs.gnu.org; Mon, 16 Sep 2013 22:19:25 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:18243) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLkss-0003Sj-OS for 15200@debbugs.gnu.org; Mon, 16 Sep 2013 22:19:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2OLoJcA6R6gV6Caik X-IPAS-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2OLoJcA6R6gV6Caik X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28100118" Received: from 184-175-16-104.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 16 Sep 2013 22:15:27 -0400 Received: by pastel.home (Postfix, from userid 20848) id 481D362DA7; Mon, 16 Sep 2013 22:19:02 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#15200: isearch-other-meta-char and shift Message-ID: References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> <87vc2k7556.fsf@mail.jurta.org> <87txhko1mb.fsf@mail.jurta.org> Date: Mon, 16 Sep 2013 22:19:02 -0400 In-Reply-To: <87txhko1mb.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 17 Sep 2013 01:09:36 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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.3 (/) > This happens after this code: > (memq scroll-command > '(universal-argument > negative-argument digit-argument)))))) > (command-execute scroll-command) This code can be simplified as follows: `scroll-command' can be removed, instead its value is immediately available as `this-command'. > Perhaps `command-execute' should be removed here. Indeed. For isearch-allow-prefix, that's all that's needed. > It's not yet removed in this patch since I'm not sure > because after moving its post-processing code: > (let ((ab-bel (isearch-string-out-of-window isearch-point))) > (if ab-bel > (isearch-back-into-window (eq ab-bel 'above) isearch-point) > (goto-char isearch-point))) Yes, this needs to be moved to post-command-hook. Another alternative is to do something like (setq this-command `(lambda () (interactive) (let ((isearch-point (point))) (command-execute ',this-command) (let ((ab-bel (isearch-string-out-of-window isearch-point))) (if ab-bel (isearch-back-into-window (eq ab-bel 'above) isearch-point) (goto-char isearch-point)))))) but this is probably going to bring us more trouble than it's worth. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 06 20:06:34 2013 Received: (at control) by debbugs.gnu.org; 7 Oct 2013 00:06:34 +0000 Received: from localhost ([127.0.0.1]:58493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VSyLJ-0003Ur-Q7 for submit@debbugs.gnu.org; Sun, 06 Oct 2013 20:06:33 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:35684 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VSyLG-0003Ud-Bp; Sun, 06 Oct 2013 20:06:31 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 7E558258B9E936; Sun, 6 Oct 2013 17:06:28 -0700 (PDT) From: Juri Linkov To: Drew Adams Subject: Re: bug#15544: 24.3.50; void variable `universal-argument-num-events' Organization: JURTA References: <89ec4476-ea4c-4cf8-9140-16ed161758ab@default> Date: Mon, 07 Oct 2013 02:54:15 +0300 In-Reply-To: <89ec4476-ea4c-4cf8-9140-16ed161758ab@default> (Drew Adams's message of "Sun, 6 Oct 2013 16:25:07 -0700 (PDT)") Message-ID: <87li26hrpc.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 15544@debbugs.gnu.org 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 (/) merge 15200 15544 thanks > emacs -Q > M-x set-variable isearch-allow-prefix t > C-s C-3 C-return > > Get error: > "Symbol's value as variable is void: universal-argument-num-events" Currently I'm testing a patch in bug#15383 that will remove the need for universal-argument-num-events. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 07 20:06:04 2013 Received: (at 15200) by debbugs.gnu.org; 8 Oct 2013 00:06:04 +0000 Received: from localhost ([127.0.0.1]:33215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTKoN-0000tH-M8 for submit@debbugs.gnu.org; Mon, 07 Oct 2013 20:06:04 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:59601 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTKoK-0000sr-ME for 15200@debbugs.gnu.org; Mon, 07 Oct 2013 20:06:02 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id B9BB9258B9E935; Mon, 7 Oct 2013 17:05:58 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#15200: isearch-other-meta-char and shift Organization: JURTA References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> <87vc2k7556.fsf@mail.jurta.org> <87txhko1mb.fsf@mail.jurta.org> Date: Tue, 08 Oct 2013 02:35:25 +0300 In-Reply-To: (Stefan Monnier's message of "Mon, 16 Sep 2013 22:19:02 -0400") Message-ID: <87txgstyw6.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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 (/) >> (memq scroll-command >> '(universal-argument >> negative-argument digit-argument)))))) >> (command-execute scroll-command) > > This code can be simplified as follows: `scroll-command' can be removed, > instead its value is immediately available as `this-command'. In the next patch I replaced `scroll-command' with just `this-command'. >> (let ((ab-bel (isearch-string-out-of-window isearch-point))) >> (if ab-bel >> (isearch-back-into-window (eq ab-bel 'above) isearch-point) >> (goto-char isearch-point))) > > Yes, this needs to be moved to post-command-hook. This is moved now to `isearch-post-command-hook'. Now everything works as it used to do before this patch, with one exception: I still can't find a replacement for universal-argument-num-events. The problem is that when isearch-allow-prefix is non-nil and isearch-allow-scroll is nil, then `C-u C-l' (where `C-l' is bound globally to `recenter-top-bottom') should exit isearch, but `C-u C-w' should not. `C-w' is just an example of an isearch command (isearch-yank-word-or-char). Some isearch commands currently don't accept a numeric prefix arg but nevertheless a prefix arg should be passed to isearch commands without exiting isearch. But this patch exits isearch and calls the isearch command with a prefix in inactive isearch. This is because (lookup-key isearch-mode-map (this-command-keys)) used to check when to exit isearch, with a prepended prefix can't decide whether a key sequence is bound to an isearch command or not, e.g.: (lookup-key isearch-mode-map (kbd "C-u C-l")) => 1 (lookup-key isearch-mode-map (kbd "C-u C-w")) => 1 both return 1. universal-argument-num-events could help to remove the prefix from this-command-keys to lookup a key without prefix, but I have no idea what to do without universal-argument-num-events. The current patch: === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-08-28 16:39:51 +0000 +++ lisp/isearch.el 2013-10-07 23:31:34 +0000 @@ -349,7 +349,6 @@ (defvar lazy-highlight-face 'lazy-highli (defvar isearch-help-map (let ((map (make-sparse-keymap))) - (define-key map [t] 'isearch-other-control-char) (define-key map (char-to-string help-char) 'isearch-help-for-help) (define-key map [help] 'isearch-help-for-help) (define-key map [f1] 'isearch-help-for-help) @@ -423,9 +422,6 @@ (defvar isearch-mode-map ;; Make all multibyte characters search for themselves. (set-char-table-range (nth 1 map) (cons #x100 (max-char)) 'isearch-printing-char) - ;; Make function keys, etc, which aren't bound to a scrolling-function - ;; exit the search. - (define-key map [t] 'isearch-other-control-char) ;; Single-byte printing chars extend the search string by default. (setq i ?\s) @@ -440,8 +436,7 @@ (defvar isearch-mode-map ;; default local key binding for any key not otherwise bound. (let ((meta-map (make-sparse-keymap))) (define-key map (char-to-string meta-prefix-char) meta-map) - (define-key map [escape] meta-map) - (define-key meta-map [t] 'isearch-other-meta-char)) + (define-key map [escape] meta-map)) ;; Several non-printing chars change the searching behavior. (define-key map "\C-s" 'isearch-repeat-forward) @@ -521,9 +516,6 @@ (defvar isearch-mode-map ;; The key translations defined in the C-x 8 prefix should add ;; characters to the search string. See iso-transl.el. - (define-key map "\C-x" nil) - (define-key map [?\C-x t] 'isearch-other-control-char) - (define-key map "\C-x8" nil) (define-key map "\C-x8\r" 'isearch-char-by-name) map) @@ -920,6 +912,8 @@ (defun isearch-mode (forward &optional r (isearch-update) + (add-hook 'pre-command-hook 'isearch-pre-command-hook) + (add-hook 'post-command-hook 'isearch-post-command-hook) (add-hook 'mouse-leave-buffer-hook 'isearch-done) (add-hook 'kbd-macro-termination-hook 'isearch-done) @@ -998,6 +992,8 @@ (defun isearch-done (&optional nopush ed (unless (equal (car command-history) command) (setq command-history (cons command command-history))))) + (remove-hook 'pre-command-hook 'isearch-pre-command-hook) + (remove-hook 'post-command-hook 'isearch-post-command-hook) (remove-hook 'mouse-leave-buffer-hook 'isearch-done) (remove-hook 'kbd-macro-termination-hook 'isearch-done) (setq isearch-lazy-highlight-start nil) @@ -2100,26 +2096,6 @@ (defun isearch-fallback (want-backslash (min last-other-end isearch-barrier))) (setq isearch-adjusted t))))))) -(defun isearch-unread-key-sequence (keylist) - "Unread the given key-sequence KEYLIST. -Scroll-bar or mode-line events are processed appropriately." - (cancel-kbd-macro-events) - (apply 'isearch-unread keylist) - ;; If the event was a scroll-bar or mode-line click, the event will have - ;; been prefixed by a symbol such as vertical-scroll-bar. We must remove - ;; it here, because this symbol will be attached to the event again next - ;; time it gets read by read-key-sequence. - ;; - ;; (Old comment from isearch-other-meta-char: "Note that we don't have to - ;; modify the event anymore in 21 because read_key_sequence no longer - ;; modifies events to produce fake prefix keys.") - (if (and (> (length keylist) 1) - (symbolp (car keylist)) - (listp (cadr keylist)) - (not (numberp (posn-point - (event-start (cadr keylist) ))))) - (pop unread-command-events))) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; scrolling within Isearch mode. Alan Mackenzie (acm@muc.de), 2003/2/24 ;; @@ -2244,198 +2220,74 @@ (defun isearch-back-into-window (above i (recenter 0)))) (goto-char isearch-point)) -(defun isearch-reread-key-sequence-naturally (keylist) - "Reread key sequence KEYLIST with an inactive Isearch-mode keymap. -Return the key sequence as a string/vector." - (isearch-unread-key-sequence keylist) - (let (overriding-terminal-local-map) - ;; This will go through function-key-map, if nec. - ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation. - (read-key-sequence nil nil t))) - -(defun isearch-lookup-scroll-key (key-seq) - "If KEY-SEQ is bound to a scrolling command, return it as a symbol. -Otherwise return nil." - (let* ((overriding-terminal-local-map nil) - (binding (key-binding key-seq))) - (and binding (symbolp binding) (commandp binding) - (or (eq (get binding 'isearch-scroll) t) - (eq (get binding 'scroll-command) t)) - binding))) - -(defalias 'isearch-other-control-char 'isearch-other-meta-char) - -(defun isearch-other-meta-char (&optional arg) - "Process a miscellaneous key sequence in Isearch mode. - -Try to convert the current key-sequence to something usable in Isearch -mode, either by converting it with `function-key-map', downcasing a -key with C-, or finding a \"scrolling command\" bound to -it. \(In the last case, we may have to read more events.) If so, -either unread the converted sequence or execute the command. - -Otherwise, if `search-exit-option' is non-nil (the default) unread the -key-sequence and exit the search normally. If it is the symbol -`edit', the search string is edited in the minibuffer and the meta -character is unread so that it applies to editing the string. - -ARG is the prefix argument. It will be transmitted through to the -scrolling command or to the command whose key-sequence exits -Isearch mode." - (interactive "P") - (let* ((key (if current-prefix-arg ; not nec the same as ARG - (substring (this-command-keys) universal-argument-num-events) - (this-command-keys))) - (main-event (aref key 0)) - (keylist (listify-key-sequence key)) - scroll-command isearch-point) - (cond ((and (= (length key) 1) - (let ((lookup (lookup-key local-function-key-map key))) - (not (or (null lookup) (integerp lookup) - (keymapp lookup))))) - ;; Handle a function key that translates into something else. - ;; If the key has a global definition too, - ;; exit and unread the key itself, so its global definition runs. - ;; Otherwise, unread the translation, - ;; so that the translated key takes effect within isearch. - (cancel-kbd-macro-events) - (if (lookup-key global-map key) - (progn - (isearch-done) - (setq prefix-arg arg) - (apply 'isearch-unread keylist)) - (setq keylist - (listify-key-sequence - (lookup-key local-function-key-map key))) - (while keylist - (setq key (car keylist)) - ;; Handle an undefined shifted printing character - ;; by downshifting it if that makes it printing. - ;; (As read-key-sequence would normally do, - ;; if we didn't have a default definition.) - (if (and (integerp key) - (memq 'shift (event-modifiers key)) - (>= key (+ ?\s (- ?\S-a ?a))) - (/= key (+ 127 (- ?\S-a ?a))) - (< key (+ 256 (- ?\S-a ?a)))) - (setq key (- key (- ?\S-a ?a)))) - ;; If KEY is a printing char, we handle it here - ;; directly to avoid the input method and keyboard - ;; coding system translating it. - (if (and (integerp key) - (>= key ?\s) (/= key 127) (< key 256)) - (progn - ;; Ensure that the processed char is recorded in - ;; the keyboard macro, if any (Bug#4894) - (store-kbd-macro-event key) - (isearch-process-search-char key) - (setq keylist (cdr keylist))) - ;; As the remaining keys in KEYLIST can't be handled - ;; here, we must reread them. - (setq prefix-arg arg) - (apply 'isearch-unread keylist) - (setq keylist nil))))) - ( - ;; Handle an undefined shifted control character - ;; by downshifting it if that makes it defined. - ;; (As read-key-sequence would normally do, - ;; if we didn't have a default definition.) - (let ((mods (event-modifiers main-event))) - (and (integerp main-event) - (memq 'shift mods) - (memq 'control mods) - (not (memq (lookup-key isearch-mode-map - (let ((copy (copy-sequence key))) - (aset copy 0 - (- main-event - (- ?\C-\S-a ?\C-a))) - copy) - nil) - '(nil - isearch-other-control-char))))) - (setcar keylist (- main-event (- ?\C-\S-a ?\C-a))) - (cancel-kbd-macro-events) - (setq prefix-arg arg) - (apply 'isearch-unread keylist)) - ((eq search-exit-option 'edit) - (setq prefix-arg arg) - (apply 'isearch-unread keylist) - (isearch-edit-string)) - ;; Handle a scrolling function or prefix argument. - ((progn - (setq key (isearch-reread-key-sequence-naturally keylist) - keylist (listify-key-sequence key) - main-event (aref key 0)) - (or (and isearch-allow-scroll - (setq scroll-command (isearch-lookup-scroll-key key))) - (and isearch-allow-prefix - (let (overriding-terminal-local-map) - (setq scroll-command (key-binding key)) - (memq scroll-command - '(universal-argument - negative-argument digit-argument)))))) - ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a - ;; complete key sequence, possibly as modified by function-key-map, - ;; not merely the one or two event fragment which invoked - ;; isearch-other-meta-char in the first place. - (setq isearch-point (point)) - (setq prefix-arg arg) - (command-execute scroll-command) - (let ((ab-bel (isearch-string-out-of-window isearch-point))) - (if ab-bel - (isearch-back-into-window (eq ab-bel 'above) isearch-point) - (goto-char isearch-point))) - (isearch-update)) - ;; A mouse click on the isearch message starts editing the search string - ((and (eq (car-safe main-event) 'down-mouse-1) - (window-minibuffer-p (posn-window (event-start main-event)))) - ;; Swallow the up-event. - (read-event) - (isearch-edit-string)) - (search-exit-option - (let (window) - (setq prefix-arg arg) - (isearch-unread-key-sequence keylist) - (setq main-event (car unread-command-events)) - - ;; Don't store special commands in the keyboard macro. - (let (overriding-terminal-local-map) - (when (memq (key-binding key) - '(kmacro-start-macro - kmacro-end-macro kmacro-end-and-call-macro)) - (cancel-kbd-macro-events))) - - ;; If we got a mouse click event, that event contains the - ;; window clicked on. maybe it was read with the buffer - ;; it was clicked on. If so, that buffer, not the current one, - ;; is in isearch mode. So end the search in that buffer. - - ;; ??? I have no idea what this if checks for, but it's - ;; obviously wrong for the case that a down-mouse event - ;; on another window invokes this function. The event - ;; will contain the window clicked on and that window's - ;; buffer is certainly not always in Isearch mode. - ;; - ;; Leave the code in, but check for current buffer not - ;; being in Isearch mode for now, until someone tells - ;; what it's really supposed to do. - ;; - ;; --gerd 2001-08-10. - - (if (and (not isearch-mode) - (listp main-event) - (setq window (posn-window (event-start main-event))) - (windowp window) - (or (> (minibuffer-depth) 0) - (not (window-minibuffer-p window)))) - (with-current-buffer (window-buffer window) - (isearch-done) - (isearch-clean-overlays)) - (isearch-done) - (isearch-clean-overlays) - (setq prefix-arg arg)))) - (t;; otherwise nil - (isearch-process-search-string key key))))) +(defvar isearch-pre-scroll-point nil) + +(defun isearch-pre-command-hook () + (let* ((key (this-command-keys)) + (main-event (aref key 0))) + (cond + ;; Don't exit isearch for isearch key bindings. + ((commandp (lookup-key isearch-mode-map key nil))) + ((eq search-exit-option 'edit) + (isearch-edit-string)) + ;; Handle a scrolling function or prefix argument. + ((or (and isearch-allow-prefix + (memq this-command '(universal-argument + negative-argument + digit-argument))) + (and isearch-allow-scroll + (or (eq (get this-command 'isearch-scroll) t) + (eq (get this-command 'scroll-command) t)))) + (when isearch-allow-scroll + (setq isearch-pre-scroll-point (point)))) + ;; A mouse click on the isearch message starts editing the search string + ((and (eq (car-safe main-event) 'down-mouse-1) + (window-minibuffer-p (posn-window (event-start main-event)))) + ;; Swallow the up-event. + (read-event) + (isearch-edit-string)) + (search-exit-option + (let (window) + (if (and (not isearch-mode) + (listp main-event) + (setq window (posn-window (event-start main-event))) + (windowp window) + (or (> (minibuffer-depth) 0) + (not (window-minibuffer-p window)))) + (with-current-buffer (window-buffer window) + (isearch-done) + (isearch-clean-overlays)) + (isearch-done) + (isearch-clean-overlays)))) + (t ;; otherwise nil + (isearch-process-search-string key key))))) + +(defun isearch-post-command-hook () + (when isearch-pre-scroll-point + (let ((ab-bel (isearch-string-out-of-window isearch-pre-scroll-point))) + (if ab-bel + (isearch-back-into-window (eq ab-bel 'above) isearch-pre-scroll-point) + (goto-char isearch-pre-scroll-point))) + (setq isearch-pre-scroll-point nil) + (isearch-update))) (defun isearch-quote-char (&optional count) "Quote special characters for incremental search. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 07 23:07:29 2013 Received: (at 15200) by debbugs.gnu.org; 8 Oct 2013 03:07:29 +0000 Received: from localhost ([127.0.0.1]:33462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTNdw-00059v-LB for submit@debbugs.gnu.org; Mon, 07 Oct 2013 23:07:29 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:3016) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTNdu-00059l-2G for 15200@debbugs.gnu.org; Mon, 07 Oct 2013 23:07:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2OLoJcA6R6gV6Caik X-IPAS-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2OLoJcA6R6gV6Caik X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="34986140" Received: from 206-248-175-45.dsl.teksavvy.com (HELO pastel.home) ([206.248.175.45]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 07 Oct 2013 23:03:45 -0400 Received: by pastel.home (Postfix, from userid 20848) id DD55C6049A; Mon, 7 Oct 2013 23:07:24 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#15200: isearch-other-meta-char and shift Message-ID: References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> <87vc2k7556.fsf@mail.jurta.org> <87txhko1mb.fsf@mail.jurta.org> <87txgstyw6.fsf@mail.jurta.org> Date: Mon, 07 Oct 2013 23:07:24 -0400 In-Reply-To: <87txgstyw6.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 08 Oct 2013 02:35:25 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15200 Cc: 15200@debbugs.gnu.org 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.3 (/) > This is because (lookup-key isearch-mode-map (this-command-keys)) > used to check when to exit isearch, with a prepended prefix can't decide > whether a key sequence is bound to an isearch command or not, e.g.: > (lookup-key isearch-mode-map (kbd "C-u C-l")) => 1 > (lookup-key isearch-mode-map (kbd "C-u C-w")) => 1 > both return 1. OK, don't worry about that: the fix needs to be elsewhere (I happen to have a work-in-progress patch which fixes that problem). So, I think you can go ahead and install your patch. And please make a bug-report for the C-u C-w problem, so we don't forget about it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 08 19:29:52 2013 Received: (at 15200-done) by debbugs.gnu.org; 8 Oct 2013 23:29:52 +0000 Received: from localhost ([127.0.0.1]:36051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTgit-0006Uh-KK for submit@debbugs.gnu.org; Tue, 08 Oct 2013 19:29:52 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:37268 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTgir-0006UX-SO for 15200-done@debbugs.gnu.org; Tue, 08 Oct 2013 19:29:50 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 2E739258B9E935; Tue, 8 Oct 2013 16:29:47 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#15200: isearch-other-meta-char and shift Organization: JURTA References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> <87vc2k7556.fsf@mail.jurta.org> <87txhko1mb.fsf@mail.jurta.org> <87txgstyw6.fsf@mail.jurta.org> Date: Wed, 09 Oct 2013 02:29:15 +0300 In-Reply-To: (Stefan Monnier's message of "Mon, 07 Oct 2013 23:07:24 -0400") Message-ID: <871u3vl4tw.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15200-done Cc: 15200-done@debbugs.gnu.org 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 (/) >> (lookup-key isearch-mode-map (kbd "C-u C-l")) => 1 >> (lookup-key isearch-mode-map (kbd "C-u C-w")) => 1 > >> both return 1. > > OK, don't worry about that: the fix needs to be elsewhere (I happen to > have a work-in-progress patch which fixes that problem). > > So, I think you can go ahead and install your patch. > And please make a bug-report for the C-u C-w problem, so we don't forget > about it. I installed the patch (with a FIXME comment) and reported a new bug#15568. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 08 22:43:35 2013 Received: (at 15200-done) by debbugs.gnu.org; 9 Oct 2013 02:43:36 +0000 Received: from localhost ([127.0.0.1]:36298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTjkN-0002di-N3 for submit@debbugs.gnu.org; Tue, 08 Oct 2013 22:43:35 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:52105) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTjkK-0002dW-VL for 15200-done@debbugs.gnu.org; Tue, 08 Oct 2013 22:43:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35076422" Received: from 206-248-175-45.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([206.248.175.45]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Oct 2013 22:39:49 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id A6C20AE215; Tue, 8 Oct 2013 22:43:31 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#15200: isearch-other-meta-char and shift Message-ID: References: <8761urkssh.fsf@mail.jurta.org> <87fvtvgk00.fsf@mail.jurta.org> <877gf5rcoz.fsf@mail.jurta.org> <87wqn53sac.fsf@mail.jurta.org> <87vc2k7556.fsf@mail.jurta.org> <87txhko1mb.fsf@mail.jurta.org> <87txgstyw6.fsf@mail.jurta.org> <871u3vl4tw.fsf@mail.jurta.org> Date: Tue, 08 Oct 2013 22:43:31 -0400 In-Reply-To: <871u3vl4tw.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 09 Oct 2013 02:29:15 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15200-done Cc: 15200-done@debbugs.gnu.org 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.3 (/) > I installed the patch (with a FIXME comment) and reported a new bug#15568. Thanks, Stefan From unknown Fri Jun 20 07:09:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 06 Nov 2013 12:24:03 +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