From: Leo <sdl.web@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 4894@emacsbugs.donarmstrong.com, Petr Machata <pmachata@gmail.com>
Subject: bug#4894: 23.1; emacs ignores number characters in incremental search in keyboard macros
Date: Thu, 26 Aug 2010 22:36:54 +0100 [thread overview]
Message-ID: <m1k4ndoy2x.fsf@cam.ac.uk> (raw)
In-Reply-To: <jwveio4ncil.fsf-monnier+emacsbugreports@gnu.org> (Stefan Monnier's message of "Wed, 11 Nov 2009 13:32:05 -0500")
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 <kp-0> 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.
next prev parent reply other threads:[~2010-08-26 21:36 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
2009-11-11 14:23 ` Petr Machata
2009-11-11 18:32 ` Stefan Monnier
2010-08-26 21:36 ` Leo [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1k4ndoy2x.fsf@cam.ac.uk \
--to=sdl.web@gmail.com \
--cc=4894@emacsbugs.donarmstrong.com \
--cc=monnier@iro.umontreal.ca \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).