GNU bug report logs - #4894
23.1; emacs ignores number characters in incremental search in keyboard macros

Previous Next

Package: emacs;

Reported by: Petr Machata <pmachata <at> gmail.com>

Date: Mon, 9 Nov 2009 18:00:07 UTC

Severity: normal

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 4894 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Petr Machata <pmachata <at> gmail.com>
Cc: 4894 <at> debbugs.gnu.org
Subject: Re: bug#4894: 23.1; emacs ignores number characters in incremental search in keyboard macros
Date: Wed, 11 Nov 2009 12:42:57 +0200
> 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 <kp-0>, 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 <S-kp-0> then
<S-kp-0> terminates Isearch instead of adding zeroes to the search string.
That's because <S-kp-0> 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/



This bug report was last modified 12 years and 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.