GNU bug report logs - #25860
25.1; Double macro execution

Previous Next

Package: emacs;

Reported by: Marek Twardochlib <wasserwerk.studio <at> googlemail.com>

Date: Fri, 24 Feb 2017 13:13:01 UTC

Severity: normal

Tags: confirmed

Found in version 25.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 25860 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25860 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>,
 Tino Calancha <tino.calancha <at> gmail.com>, John Wiegley <jwiegley <at> gmail.com>,
 wasserwerk.studio <at> googlemail.com, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#25860: 25.1; Double macro execution
Date: Mon, 27 Feb 2017 12:18:45 -0500
On Mon, Feb 27, 2017 at 10:57 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> Yes, but that's not the scenario I had in mind.  What I had in mind is
> a macro that, when run, will call start-kbd-macro etc.  It's clear
> that such a macro cannot be easily defined using F3 and F4, but
> perhaps some ingenious method with using some Lisp data in the
> macro...

C-x ( is bound to kmacro-start-macro which refuses to define a macro
while a macro is executing:

(defun kmacro-start-macro (arg)
...
  (if (or defining-kbd-macro executing-kbd-macro)
      (message "Already defining keyboard macro.")
...)

I tried making a macro to call M-x start-kbd-macro directly:

<<start-kbd-macro>>    ;; start-kbd-macro
zzz            ;; self-insert-command * 3
<<end-kbd-macro>>    ;; end-kbd-macro

Executing that macro seems to define an empty macro though (i.e., the
"zzz" only gets inserted while running the outer defining macro, but
hitting C-x e after is a nop (apart from the (Type e to repeat macro)
message appearing)). Probably start-kbd-macro should also refuse to
run if a macro is executing as it fails to do anything useful in this
case.




This bug report was last modified 7 years and 237 days ago.

Previous Next


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