all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Petr Machata <pmachata@gmail.com>
Cc: 4894@emacsbugs.donarmstrong.com
Subject: bug#4894: 23.1; emacs ignores number characters in incremental search in keyboard macros
Date: Wed, 11 Nov 2009 12:42:57 +0200	[thread overview]
Message-ID: <87y6mdo6bi.fsf@mail.jurta.org> (raw)
In-Reply-To: <m3bpjbfut7.wl%pmachata@redhat.com> (Petr Machata's message of "Mon, 09 Nov 2009 18:54:12 +0100")

> 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/





  reply	other threads:[~2009-11-11 10:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-09 17:54 bug#4894: 23.1; emacs ignores number characters in incremental search in keyboard macros Petr Machata
2009-11-11 10:42 ` Juri Linkov [this message]
2009-11-11 14:23   ` Petr Machata
2009-11-11 18:32   ` Stefan Monnier
2010-08-26 21:36     ` Leo
2012-10-29 23:21     ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y6mdo6bi.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=4894@emacsbugs.donarmstrong.com \
    --cc=pmachata@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.