From: Juri Linkov <juri@jurta.org>
To: Simon Katz <nomiskatz@gmail.com>
Cc: 15126@debbugs.gnu.org
Subject: bug#15126: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward
Date: Sat, 24 Aug 2013 12:45:01 +0300 [thread overview]
Message-ID: <87mwo7juj6.fsf@mail.jurta.org> (raw)
In-Reply-To: <CAPXG949xVmqC+VO4zyRf99e=7seoZUQ1v3dXjBoE-yPJD+YxZA@mail.gmail.com> (Simon Katz's message of "Sun, 18 Aug 2013 22:39:41 +0100")
> In Emacs 24.2.1 and all previous versions I've used,
> kmacro-end-and-call-macro calls the macro once more, and I can go
> through the file making changes one at a time, and I can stop when I
> want.
>
> In Emacs 24.3.1, kmacro-end-and-call-macro calls the macro repeatedly
> making changes to all the repeated text up to the end of the file.
Actually this is an old bug uncovered by another unrelated change.
Emacs 24.2.1 stored the key `C-x' in the keyboard macro.
Emacs 24.3.1 now stores the whole key sequence `C-x e'.
Storing `C-x' had no effect, but also made no sense.
It's clear that neither `C-x' nor `C-x e' should be stored.
So not storing `C-x e' will not execute the same macro repeatedly.
Currently I see only one way to fix this properly:
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2013-08-08 23:59:14 +0000
+++ lisp/isearch.el 2013-08-24 09:27:30 +0000
@@ -2386,6 +2386,13 @@ (defun isearch-other-meta-char (&optiona
(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,
next prev parent reply other threads:[~2013-08-24 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-18 21:39 bug#15126: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward Simon Katz
2013-08-19 2:26 ` Drew Adams
2013-08-19 8:04 ` Simon Katz
2013-08-19 23:50 ` Juri Linkov
2013-08-24 9:45 ` Juri Linkov [this message]
2013-08-27 16:06 ` Juri Linkov
2013-09-01 13:10 ` Simon Katz
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=87mwo7juj6.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=15126@debbugs.gnu.org \
--cc=nomiskatz@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.