From pmachata@gmail.com Mon Nov 9 09:54:57 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 9 Nov 2009 17:54:58 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA9Hsu0p010772 for ; Mon, 9 Nov 2009 09:54:57 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7YS7-0001Hj-2S for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 12:54:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7YS1-0001Cr-UG for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 12:54:54 -0500 Received: from [199.232.76.173] (port=52787 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7YS1-0001CX-Oh for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 12:54:49 -0500 Received: from mail-ew0-f228.google.com ([209.85.219.228]:42539) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N7YS0-0002Sb-SM for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 12:54:49 -0500 Received: by ewy28 with SMTP id 28so4255601ewy.42 for ; Mon, 09 Nov 2009 09:54:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:message-id:from:to :subject:user-agent:mime-version:content-type; bh=o+hnSJk5aSlQq6GomyMVQKqvBOMduE3hoRSLkWZTUPY=; b=MrIRjsZhty70ahKI4SjC3u7KlBDajqZ7f9by3ObYx6WV9xxAEkhC6OK1AOIFeQznNB W1rcAS+sc6ZqngsnPwgMkZ8sRZ5bQH06YiyTbzK8kzed12TBTDRCTapD3k9+b6bvoeKe q2UhBoWV7uikKY+j6zA4rClXG53VJTo4XeWkQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:subject:user-agent:mime-version :content-type; b=PwIMNjtekPciAfVSMyxNTrmL1PmTRgnMbiEVOVfzWkqySXDQJWtsWGdFHLSldnCIJj +f8rk30hduvmahEjTUsP7rDPustCARhzS5Z5/Nt5xFnLy6+XqCM4WozXqOzTsPkNArj0 0kja5bgI1q0jbYeKvA7V6G6cjRMQ9EBdHDo/k= Received: by 10.216.87.75 with SMTP id x53mr2723210wee.13.1257789286649; Mon, 09 Nov 2009 09:54:46 -0800 (PST) Received: from dhcp-lab-130.englab.brq.redhat.com.gmail.com (nat-pool-brq-t.redhat.com [209.132.186.34]) by mx.google.com with ESMTPS id u14sm9456132gvf.18.2009.11.09.09.54.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Nov 2009 09:54:45 -0800 (PST) Date: Mon, 09 Nov 2009 18:54:12 +0100 Message-ID: From: Petr Machata To: bug-gnu-emacs@gnu.org Subject: 23.1; emacs ignores number characters in incremental search in keyboard macros User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?B?U2hpasWN?=) APEL/10.7 Emacs/23.1 (x86_64-redhat-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Do the following to record a macro involving an incremental search looking for a string "x00x": M-x kmacro-start-macro C-s x 0 0 x M-x kmacro-end-macro Observe that the macro doesn't include the 0 characters at all: M-x kmacro-view-macro On my machine, the above shows: Last macro: C-s xx M-x kmacro-en TAB ma TAB [2 times] (i.e. the macro system seems to ignore the zeroes, and take more keystrokes from the queue or whatever the underlying implementation is.) In GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.16.6) of 2009-09-29 on x86-6.fedora.phx.redhat.com Windowing system distributor `The X.Org Foundation', version 11.0.10603901 configured using `configure '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ru_RU.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: C++/l Minor modes in effect: flyspell-mode: t shell-dirtrack-mode: t show-paren-mode: t iswitchb-mode: t global-hl-line-mode: t desktop-save-mode: t delete-selection-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: C-x e C-z C-z M-x k e y a m a k b M-x m a c - m a c C-a C-k k m v i m M-e M-r M-r M-e C-z C-z C-z C-z C-x ( C-SPC C-r x C-x ) C-x e C-z M-x C-x ( C-g C-z C-z C-z C-x ( C-s x C-x ) C-x e e e e C-x ( C-s C-x ) M-x C-x e e e e e e SPC C-x C-x C-x C-x ( C-s C-x ) C-x e e e C-x e M-x C-g C-x C-s M-x r e p o r E m a c s SPC i g n o r e s SPC C-g SPC SPC SPC x x C-x ( C-s x C-x ) C-x e M-x C-x ( x C-z C-x ( C-x C-g C-g C-x ( C-s x x C-x ) C-x e C-x C-x M-x M-x Recent messages: Undo! Already defining keyboard macro. Quit Defining kbd macro... Mark saved where search started Keyboard macro defined Mark saved where search started After 0 kbd macro iterations: isearch-search: Keyboard macro terminated by a command ringing the bell Last macro: C-s xx Auto-saving... From juri@jurta.org Wed Nov 11 02:55:33 2009 Received: (at 4894) by emacsbugs.donarmstrong.com; 11 Nov 2009 10:55:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nABAtVFc018982 for <4894@emacsbugs.donarmstrong.com>; Wed, 11 Nov 2009 02:55:32 -0800 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.28.110.cable.starman.ee [82.131.28.110]) by mx1.starman.ee (Postfix) with ESMTP id 7BA2C3F41C6; Wed, 11 Nov 2009 12:55:24 +0200 (EET) From: Juri Linkov To: Petr Machata Cc: 4894@debbugs.gnu.org Subject: Re: bug#4894: 23.1; emacs ignores number characters in incremental search in keyboard macros Organization: JURTA References: Date: Wed, 11 Nov 2009 12:42:57 +0200 In-Reply-To: (Petr Machata's message of "Mon, 09 Nov 2009 18:54:12 +0100") Message-ID: <87y6mdo6bi.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Do the following to record a macro involving an incremental search > looking for a string "x00x": > > M-x kmacro-start-macro C-s x 0 0 x M-x kmacro-end-macro > > Observe that the macro doesn't include the 0 characters at all: > > M-x kmacro-view-macro > > On my machine, the above shows: > > Last macro: C-s xx M-x kmacro-en TAB ma TAB [2 times] > > (i.e. the macro system seems to ignore the zeroes, and take more > keystrokes from the queue or whatever the underlying implementation > is.) Do you type these zeroes with a numpad? I can reproduce this bug when zeroes are typed with , so the last macro doesn't contain zeroes. The reason is an intentional call to `cancel-kbd-macro-events' in the first branch of `cond' in `isearch-other-meta-char'. I don't know why this is needed. CVS logs show that this line was added at 1995-08-10. Also I noticed a related bug: when zeroes are typed with then terminates Isearch instead of adding zeroes to the search string. That's because is processed in the 6-th branch of `cond' in `isearch-other-meta-char' (with `search-exit-option') where unprocessed control characters terminate Isearch. -- Juri Linkov http://www.jurta.org/emacs/ From pmachata@gmail.com Wed Nov 11 06:23:50 2009 Received: (at 4894) by emacsbugs.donarmstrong.com; 11 Nov 2009 14:23:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nABENmpq009919 for <4894@emacsbugs.donarmstrong.com>; Wed, 11 Nov 2009 06:23:50 -0800 Received: by bwz27 with SMTP id 27so1134990bwz.1 for <4894@emacsbugs.donarmstrong.com>; Wed, 11 Nov 2009 06:23:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=e5pZJmJeW+7zsOYNJgpwz7jJ8PkVwusl8kS4NKfBHMw=; b=s0uxfv9TTRq95r4miS8SsDlDnTizJYSE3inK7Fe++E7zxxQsfMmxW1Jq7aBhXJId7A iitLQWoe1mB4TWWoVguaOpdV73byKX6NbG/nOpFIeuuOqJ7EXMqkyraMhXwqnSKQHpNC iomlkrMOH9sjV/vNYYpMFCPTqX+nE0jQyAukY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=PQEdzhED+6FDw18afuuttvmEHFxbNI6+8L2zro0ztZfA/S6+1YEwBJp8Wfb2+j6SBQ 7+W6bi1DQgm1AgLOvRfSgWOmoDQOgWkTcsyw0zLgQMQo6l+EuLZehDjjXKM/vo3qF07r I3v60xpwEq5gL5GWEtKsnYpHWb98Ypy8VlJyE= MIME-Version: 1.0 Received: by 10.204.153.197 with SMTP id l5mr1045854bkw.109.1257949422987; Wed, 11 Nov 2009 06:23:42 -0800 (PST) In-Reply-To: <87y6mdo6bi.fsf@mail.jurta.org> References: <87y6mdo6bi.fsf@mail.jurta.org> Date: Wed, 11 Nov 2009 15:23:42 +0100 Message-ID: <526254360911110623l3e01aa6fw18da8dc15c0da662@mail.gmail.com> Subject: Re: bug#4894: 23.1; emacs ignores number characters in incremental search in keyboard macros From: Petr Machata To: 4894@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Nov 11, 2009 at 11:42 AM, Juri Linkov wrote: > Do you type these zeroes with a numpad? =C2=A0I can reproduce this bug wh= en > zeroes are typed with , so the last macro doesn't contain zeroes. Indeed I do. Other characters entered using a numeric keypad are ignored too, just as you say. > The reason is an intentional call to `cancel-kbd-macro-events' I thought it might be intentional, but couldn't google anything relevant. I would still consider it very unintuitive, if not a bug. PM From monnier@iro.umontreal.ca Wed Nov 11 10:32:13 2009 Received: (at 4894) by emacsbugs.donarmstrong.com; 11 Nov 2009 18:32:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nABIWBNc008848 for <4894@emacsbugs.donarmstrong.com>; Wed, 11 Nov 2009 10:32:12 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAO+R+kpMCpsp/2dsb2JhbACBT9xGhDwEiSM X-IronPort-AV: E=Sophos;i="4.44,724,1249272000"; d="scan'208";a="49115268" Received: from 76-10-155-41.dsl.teksavvy.com (HELO pastel.home) ([76.10.155.41]) by ironport2-out.pppoe.ca with ESMTP; 11 Nov 2009 13:32:05 -0500 Received: by pastel.home (Postfix, from userid 20848) id 5784E8373; Wed, 11 Nov 2009 13:32:05 -0500 (EST) From: Stefan Monnier To: Kenichi Handa Cc: 4894@debbugs.gnu.org, Petr Machata Subject: Re: bug#4894: 23.1; emacs ignores number characters in incremental search in keyboard macros Message-ID: References: <87y6mdo6bi.fsf@mail.jurta.org> Date: Wed, 11 Nov 2009 13:32:05 -0500 In-Reply-To: <87y6mdo6bi.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 11 Nov 2009 12:42:57 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> Do the following to record a macro involving an incremental search >> looking for a string "x00x": >> >> M-x kmacro-start-macro C-s x 0 0 x M-x kmacro-end-macro >> >> Observe that the macro doesn't include the 0 characters at all: > Do you type these zeroes with a numpad? I can reproduce this bug when > zeroes are typed with , so the last macro doesn't contain zeroes. > The reason is an intentional call to `cancel-kbd-macro-events' in the > first branch of `cond' in `isearch-other-meta-char'. I don't know why > this is needed. CVS logs show that this line was added at 1995-08-10. Actually, the need for cancel-kbd-macro-events is explained in the comment. The problem is that after cancelling the we should add the ?0 replacement. That should normally be done by isearch-unread, but for printing char, we don't call that function any more. I.e. the problem was introduced by the change below. Handa, can you explain why we need this? Maybe it was needed at the time but not any more? Stefan committer: handa branch nick: HEAD timestamp: Thu 2000-06-01 12:22:31 +0000 message: (isearch-update): Set disable-point-adjustment to t to prevent the point moving to the end of a composition when a part of a composition is searched. (isearch-other-meta-char): If the key invoking this command can be mapped by function-key-map to a printing char, call isearch-process-search-char directly. ------------------------------------------------------------ === modified file 'lisp/isearch.el' --- lisp/isearch.el 2000-05-31 09:49:22 +0000 +++ lisp/isearch.el 2000-06-01 12:22:31 +0000 @@ -619,7 +619,10 @@ (setq ;; quit-flag nil not for isearch-mode isearch-adjusted nil isearch-yank-flag nil) - (isearch-lazy-highlight-new-loop)) + (isearch-lazy-highlight-new-loop) + ;; We must prevent the point moving to the end of composition when a + ;; part of the composition has just been searched. + (setq disable-point-adjustment t)) (defun isearch-done (&optional nopush edit) (remove-hook 'mouse-leave-buffer-hook 'isearch-done) @@ -1150,8 +1153,22 @@ (progn (isearch-done) (apply 'isearch-unread keylist)) - (apply 'isearch-unread - (listify-key-sequence (lookup-key function-key-map key))))) + (setq keylist + (listify-key-sequence (lookup-key function-key-map key))) + (while keylist + (setq key (car keylist)) + ;; 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 ?\ ) (< key 256)) + (progn + (isearch-process-search-char key) + (setq keylist (cdr keylist))) + ;; As the remaining keys in KEYLIST can't be handled + ;; here, we must reread them. + (apply 'isearch-unread keylist) + (setq keylist nil))))) ( ;; Handle an undefined shifted control character ;; by downshifting it if that makes it defined. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 26 17:35:35 2010 Received: (at 4894) by debbugs.gnu.org; 26 Aug 2010 21:35:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ook6g-0007Lq-SI for submit@debbugs.gnu.org; Thu, 26 Aug 2010 17:35:35 -0400 Received: from ppsw-31.csi.cam.ac.uk ([131.111.8.131]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ook6e-0007Ll-0V for 4894@emacsbugs.donarmstrong.com; Thu, 26 Aug 2010 17:35:33 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com ([86.9.122.85]:65454 helo=Victoria.local) by ppsw-31.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:587) with esmtpsa (PLAIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128) id 1Ook7z-0001Z9-LK (Exim 4.72) (return-path ); Thu, 26 Aug 2010 22:36:55 +0100 From: Leo To: Stefan Monnier Subject: Re: bug#4894: 23.1; emacs ignores number characters in incremental search in keyboard macros References: <87y6mdo6bi.fsf@mail.jurta.org> Date: Thu, 26 Aug 2010 22:36:54 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 11 Nov 2009 13:32:05 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (Mac OS X 10.6.4) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 4894 Cc: Kenichi Handa , Petr Machata , 4894@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) On 2009-11-11 18:32 +0000, Stefan Monnier wrote: > Actually, the need for cancel-kbd-macro-events is explained in > the comment. The problem is that after cancelling the we should > add the ?0 replacement. That should normally be done by isearch-unread, > but for printing char, we don't call that function any more. > > I.e. the problem was introduced by the change below. Handa, can you > explain why we need this? Maybe it was needed at the time but not > any more? > > I run into an error After 0 kbd macro iterations: isearch-search: Keyboard macro terminated by a command ringing the bell almost every time isearch-forward-regexp is used in a macro, for example: C-x ( ESC C-s [ - + ] ? [ 0 - 9 ] + C-x ) I wonder if someone can take a look at the problem. Thanks. Leo > > Stefan > > > committer: handa > branch nick: HEAD > timestamp: Thu 2000-06-01 12:22:31 +0000 > message: > (isearch-update): Set disable-point-adjustment to t > to prevent the point moving to the end of a composition when a > part of a composition is searched. > (isearch-other-meta-char): If the key invoking this command can be > mapped by function-key-map to a printing char, call > isearch-process-search-char directly. > ------------------------------------------------------------ > > > === modified file 'lisp/isearch.el' > --- lisp/isearch.el 2000-05-31 09:49:22 +0000 > +++ lisp/isearch.el 2000-06-01 12:22:31 +0000 > @@ -619,7 +619,10 @@ > (setq ;; quit-flag nil not for isearch-mode > isearch-adjusted nil > isearch-yank-flag nil) > - (isearch-lazy-highlight-new-loop)) > + (isearch-lazy-highlight-new-loop) > + ;; We must prevent the point moving to the end of composition when a > + ;; part of the composition has just been searched. > + (setq disable-point-adjustment t)) > > (defun isearch-done (&optional nopush edit) > (remove-hook 'mouse-leave-buffer-hook 'isearch-done) > @@ -1150,8 +1153,22 @@ > (progn > (isearch-done) > (apply 'isearch-unread keylist)) > - (apply 'isearch-unread > - (listify-key-sequence (lookup-key function-key-map key))))) > + (setq keylist > + (listify-key-sequence (lookup-key function-key-map key))) > + (while keylist > + (setq key (car keylist)) > + ;; 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 ?\ ) (< key 256)) > + (progn > + (isearch-process-search-char key) > + (setq keylist (cdr keylist))) > + ;; As the remaining keys in KEYLIST can't be handled > + ;; here, we must reread them. > + (apply 'isearch-unread keylist) > + (setq keylist nil))))) > ( > ;; Handle an undefined shifted control character > ;; by downshifting it if that makes it defined. -- Any Emacs contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 19:08:07 2012 Received: (at control) by debbugs.gnu.org; 29 Oct 2012 23:08:07 +0000 Received: from localhost ([127.0.0.1]:38621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSyRD-0000ML-FH for submit@debbugs.gnu.org; Mon, 29 Oct 2012 19:08:07 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:40711) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSyRB-0000ME-HM for control@debbugs.gnu.org; Mon, 29 Oct 2012 19:08:06 -0400 Received: by mail-pa0-f44.google.com with SMTP id fb11so3635573pad.3 for ; Mon, 29 Oct 2012 16:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=jUhzuBjEh8hxBu0Egw5THnHVR2UVSY9DgEzN722ruDU=; b=oVTYSkRH8kW17FB9FgRKxPkaORzsZi1CidoxxvUG+AlBOVU+0ERg8PzXYdtXmN8dAh ysOI4JP0yt4a+fdQIo8pecIQpjpeMMuXmmYnx7tycfbmTSX6OJ/MRggN2Cujuamt+IqO NRsmp8zPEzsfXHXen1axP8TewE7p/opWbgUiMJAIdKlb50REvIikTGXtni1giSaYxy+w +MFC6yIfGBgrXyvqxF+liE4Qyg4nL0nwRhqCnnWZF4Mu0pwfhclBFjJ8m2j59opN2ncf nYrxg1DV1GXb9A+vEMXjRgaLILbdCrUsSGFzV/OjYmN2HCuRXxk/NfWQI1SY8Swjohlu QuVA== Received: by 10.68.229.201 with SMTP id ss9mr96644575pbc.80.1351551936668; Mon, 29 Oct 2012 16:05:36 -0700 (PDT) Received: from ulysses ([155.69.187.103]) by mx.google.com with ESMTPS id o10sm6618781paz.37.2012.10.29.16.05.34 (version=SSLv3 cipher=OTHER); Mon, 29 Oct 2012 16:05:35 -0700 (PDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 4894 Date: Tue, 30 Oct 2012 07:05:32 +0800 Message-ID: <87vcds6fr7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) close 4894 thanks From unknown Wed Sep 10 10:35:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Mon, 29 Oct 2012 23:10:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 19:24:34 2012 Received: (at 4894) by debbugs.gnu.org; 29 Oct 2012 23:24:34 +0000 Received: from localhost ([127.0.0.1]:38647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSyh8-0001cc-Ed for submit@debbugs.gnu.org; Mon, 29 Oct 2012 19:24:34 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:39225) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSyh7-0001cW-2p for 4894@debbugs.gnu.org; Mon, 29 Oct 2012 19:24:33 -0400 Received: by mail-pa0-f44.google.com with SMTP id fb11so3643445pad.3 for <4894@debbugs.gnu.org>; Mon, 29 Oct 2012 16:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=RRFVmmTZzI0ApqL0Fz8HJpKH+oQBLLhbmsRKaklfow4=; b=UcfyGYDMI2NFdHMEYcakkz9W+By9fq5WaDePMRF02uLp0YVd5itGNrqpV0m7YzJk2v B6FKJDXzaocA0eYoLjwt2yMvRuJkKSOrayYcOEe97gA7Nvwmvteff3O3UFzneW61mvf1 4Coz32poQ33LEkQlvr1CvZXu/v6K9surWrEf+rPPA2+cZR1zEjKUp3scaIqrb/PbNy8h 8SCrex2n5NAqqhpgNmmqiQVhzzkjrL8I1qTr0guTHOp/7CAuD60YZTjwP8DDrK/tMZC7 hYDGJ3NyIoo0CWp/wqb4TpFeftD0ThcPvKJMFq+/bv4Bix9vjgshJm/UMPpc/bdCkBTm 9upA== Received: by 10.66.75.162 with SMTP id d2mr87094717paw.27.1351552924107; Mon, 29 Oct 2012 16:22:04 -0700 (PDT) Received: from ulysses ([155.69.187.103]) by mx.google.com with ESMTPS id ho7sm6681170pbc.3.2012.10.29.16.22.00 (version=SSLv3 cipher=OTHER); Mon, 29 Oct 2012 16:22:02 -0700 (PDT) From: Chong Yidong To: Stefan Monnier Subject: Re: bug#4894: 23.1; emacs ignores number characters in incremental search in keyboard macros References: <87y6mdo6bi.fsf@mail.jurta.org> Date: Tue, 30 Oct 2012 07:21:58 +0800 In-Reply-To: (Stefan Monnier's message of "Wed, 11 Nov 2009 13:32:05 -0500") Message-ID: <874nlcdfu1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 4894 Cc: Petr Machata , 4894@debbugs.gnu.org, Kenichi Handa X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) Stefan Monnier writes: > Actually, the need for cancel-kbd-macro-events is explained in > the comment. The problem is that after cancelling the we should > add the ?0 replacement. That should normally be done by isearch-unread, > but for printing char, we don't call that function any more. > > I.e. the problem was introduced by the change below. Handa, can you > explain why we need this? Maybe it was needed at the time but not > any more? Since there has been no follow up in a long time, I went ahead and committed a fix that involves calling store-kbd-macro-event in the affected function. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 19:24:43 2012 Received: (at control) by debbugs.gnu.org; 29 Oct 2012 23:24:44 +0000 Received: from localhost ([127.0.0.1]:38650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSyhH-0001cx-NY for submit@debbugs.gnu.org; Mon, 29 Oct 2012 19:24:43 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:53204) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSyhF-0001cq-P9 for control@debbugs.gnu.org; Mon, 29 Oct 2012 19:24:42 -0400 Received: by mail-pb0-f44.google.com with SMTP id ro8so4448749pbb.3 for ; Mon, 29 Oct 2012 16:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=jUhzuBjEh8hxBu0Egw5THnHVR2UVSY9DgEzN722ruDU=; b=n9zhD5c4D0oVr65w9L3IKPSFNV/Y9dsynvLw8Y/eYptiRlxMKU040XOXXx1J1KNeV6 wCuzzyyzKvtChT1KxdiUC7cAEcsEqE8LOG1bawr7GdrOcOwgMbGfmZxRfJ/8YM8ORwU9 kz+uQnY+ue76oHLVceDe82BZ9rvIF19I5SLfVtUgd8iKoL96pgh5jHnL17CZOVLL4u7K 2f6k+FiSNoJLqj0f9crfpQTs4mAuxRYk99LY1t+xZTzFEPuxMwu7pjilgigbsBOKYFWF 0rgJMpmDXIJau9Qm2+1GPmfAZDZNBYZu1ZAP3I/SOmUpMrnk9yZiyRNan8Z2X4wlk8aB iS/w== Received: by 10.68.245.37 with SMTP id xl5mr16015676pbc.120.1351552932977; Mon, 29 Oct 2012 16:22:12 -0700 (PDT) Received: from ulysses ([155.69.187.103]) by mx.google.com with ESMTPS id hs1sm511918pbc.33.2012.10.29.16.22.10 (version=SSLv3 cipher=OTHER); Mon, 29 Oct 2012 16:22:11 -0700 (PDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 4894 Date: Tue, 30 Oct 2012 07:22:08 +0800 Message-ID: <87mwz43lun.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) close 4894 thanks From unknown Wed Sep 10 10:35:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Nov 2012 12:24:04 +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