all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* keyboard macro counter
@ 2004-09-09  2:14 Luc Teirlinck
  2004-09-09  7:22 ` Kim F. Storm
  0 siblings, 1 reply; 3+ messages in thread
From: Luc Teirlinck @ 2004-09-09  2:14 UTC (permalink / raw)


`(emacs)Keyboard Macro Counter' claims:

	Each keyboard macro has an associated counter

This is apparently wrong.  Each macro _that is a member of the
keyboard macro ring_ as an associated counter.  Also, the counter used
by a keyboard macro (say invoked using a keybinding or with M-x) is
not the counter associated with that macro (even if it has one) but
the counter associated with the current head of the macro ring.  That
is the actual counter that will get inserted and incremented,
regardless of the macro currently being executed.

Is this for some reason designed behavior or is this a bug?

To illustrate what I am talking about, see what happens if you do:

emacs -q
C-x ( a C-x C-k C-i RET C-x ) C-x C-k n aa RET C-x ( b M-5 C-x C-k C-i
RET C-x ) M-x aa RET C-x e

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: keyboard macro counter
  2004-09-09  2:14 keyboard macro counter Luc Teirlinck
@ 2004-09-09  7:22 ` Kim F. Storm
  2004-09-09 20:56   ` Kim F. Storm
  0 siblings, 1 reply; 3+ messages in thread
From: Kim F. Storm @ 2004-09-09  7:22 UTC (permalink / raw)
  Cc: emacs-devel

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> `(emacs)Keyboard Macro Counter' claims:
>
> 	Each keyboard macro has an associated counter
>
> This is apparently wrong.  Each macro _that is a member of the
> keyboard macro ring_ as an associated counter.  Also, the counter used
> by a keyboard macro (say invoked using a keybinding or with M-x) is
> not the counter associated with that macro (even if it has one) but
> the counter associated with the current head of the macro ring.  That
> is the actual counter that will get inserted and incremented,
> regardless of the macro currently being executed.

That's a really good catch!!
And similar for the macro counter format.

>
> Is this for some reason designed behavior or is this a bug?

It is a bug.

The question is whether it really matters (personally, I never had the
need for that aspect of the macro counter feature).  So perhaps it
would be ok to just document the current behaviour (as a warning).

Fixing it is non-trivial, but let me look at it...

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: keyboard macro counter
  2004-09-09  7:22 ` Kim F. Storm
@ 2004-09-09 20:56   ` Kim F. Storm
  0 siblings, 0 replies; 3+ messages in thread
From: Kim F. Storm @ 2004-09-09 20:56 UTC (permalink / raw)
  Cc: emacs-devel

storm@cua.dk (Kim F. Storm) writes:

> Luc Teirlinck <teirllm@dms.auburn.edu> writes:
>
>> `(emacs)Keyboard Macro Counter' claims:
>>
>> 	Each keyboard macro has an associated counter
>>
>> This is apparently wrong.  Each macro _that is a member of the
>> keyboard macro ring_ as an associated counter.  Also, the counter used
>> by a keyboard macro (say invoked using a keybinding or with M-x) is
>> not the counter associated with that macro (even if it has one) but
>> the counter associated with the current head of the macro ring.  That
>> is the actual counter that will get inserted and incremented,
>> regardless of the macro currently being executed.
>
> It is a bug.

I just installed a fix for bindings created with C-x C-k b and
C-x C-k n, so now the behaviour should correspond to the documentation.

Thanks again for spotting this.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-09 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-09  2:14 keyboard macro counter Luc Teirlinck
2004-09-09  7:22 ` Kim F. Storm
2004-09-09 20:56   ` Kim F. Storm

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.