all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#5481: 23.1; insert-kbd-macro: does not write key-binding code
@ 2010-01-26 17:35 Dani Moncayo
  2010-01-29 18:57 ` bug#5481: The same bug appears in another system: Ubuntu 9.10 Dani Moncayo
  2010-03-03 14:32 ` bug#5481: 23.1; insert-kbd-macro: does not write key-binding code Dani Moncayo
  0 siblings, 2 replies; 8+ messages in thread
From: Dani Moncayo @ 2010-01-26 17:35 UTC (permalink / raw)
  To: 5481

Hello, i'm trying to make persistent some user defined macros. So, I
record one macro and I give it a name and a key-binding. All works
fine to that point.

But now, i execute the command "insert-kbd-macro" with a prefix
argument (i've tried several values) and i only get the lisp code that
defines the macro, but nothing about the key binding.

The manual states clearly that the above command, when called with an
argument, should also produce code for the key-binding, so i don't
understand why i don't get it...

That's all. Thank you.

Daniel Moncayo Melgar.



In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)

 of 2009-07-30 on SOFT-MJASON

Windowing system distributor `Microsoft Corp.', version 5.1.2600

configured using `configure --with-gcc (4.4)'



Important settings:

  value of $LC_ALL: nil

  value of $LC_COLLATE: nil

  value of $LC_CTYPE: nil

  value of $LC_MESSAGES: nil

  value of $LC_MONETARY: nil

  value of $LC_NUMERIC: nil

  value of $LC_TIME: nil

  value of $LANG: ESP

  value of $XMODIFIERS: nil

  locale-coding-system: cp1252

  default-enable-multibyte-characters: t



Major mode: Lisp Interaction



Minor modes in effect:

  iswitchb-mode: t

  tooltip-mode: t

  mouse-wheel-mode: t

  file-name-shadow-mode: t

  global-font-lock-mode: t

  font-lock-mode: t

  global-auto-composition-mode: t

  auto-composition-mode: t

  auto-encryption-mode: t

  auto-compression-mode: t

  line-number-mode: t

  transient-mark-mode: t



Recent input:

e s t o SPC e s u <backspace> SPC u n a SPC p r u e

b a <return> <return> C-p C-p <f3> C-a C-SPC C-e M-w

<return> C-y C-a <f4> C-x C-k n p r u e b a - d a n

i <return> C-x C-k n p r u e b a 2 <return> C-x C-k

b 1 C-n C-n <return> <return> C-u M-x i n s e r t SPC

k SPC m SPC <return> M-p M-p M-n <return> M-x r e p

o r SPC SPC SPC <return> i n s e t <backspace> <backspace>

<backspace> C-p C-p C-n C-n <backspace> <backspace>

i n s e r t - k b d C-g <return> <return> M-x M-p M-p

C-k C-g C-y <return> <return> M-x r e p SPC o r SPC

SPC SPC SPC <return> C-x k <return> M-x M-p M-p M-n

M-p <return>



Recent messages:

Toggling menu-bar-mode off; better pass an explicit argument.

For information about GNU Emacs and the GNU system, type C-h C-a.

Defining kbd macro...

Mark set [2 times]

Keyboard macro defined

kmacro-name-last-macro: Function prueba-dani is already defined and
not a keyboard macro

Keyboard macro bound to C-x C-k 1

Quit [2 times]

Mark set

Making completion list...







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

* bug#5481: The same bug appears in another system: Ubuntu 9.10
  2010-01-26 17:35 bug#5481: 23.1; insert-kbd-macro: does not write key-binding code Dani Moncayo
@ 2010-01-29 18:57 ` Dani Moncayo
  2010-03-03 14:32 ` bug#5481: 23.1; insert-kbd-macro: does not write key-binding code Dani Moncayo
  1 sibling, 0 replies; 8+ messages in thread
From: Dani Moncayo @ 2010-01-29 18:57 UTC (permalink / raw)
  To: 5481

[-- Attachment #1: Type: text/plain, Size: 2288 bytes --]

Info given by "report-emacs-bug":


In GNU Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.3)
 of 2009-11-10 on crested, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure  '--build=x86_64-linux-gnu'
'--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var/lib'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim'
'--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu'
'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: es_ES.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  iswitchb-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<f3> t h i s SPC i s SPC a n SPC e x a m p l e . SPC
SPC <f4> C-x C-k n m a c r o 1 <return> C-x C-k b 1
C-x C-k 1 C-u M-x i n s e r t SPC SPC k SPC m a SPC
<return> M-p <return> M-x e <backspace> r e p o r SPC
SPC SPC <return>

Recent messages:
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el
(source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Toggling menu-bar-mode off; better pass an explicit argument.
For information about GNU Emacs and the GNU system, type C-h C-a.
Defining kbd macro...
Keyboard macro defined
Keyboard macro bound to C-x C-k 1
Making completion list...
/usr/bin/mail is not an executable.  Setting mail-interactive to t.

[-- Attachment #2: Type: text/html, Size: 2687 bytes --]

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

* bug#5481: 23.1; insert-kbd-macro: does not write key-binding code
  2010-01-26 17:35 bug#5481: 23.1; insert-kbd-macro: does not write key-binding code Dani Moncayo
  2010-01-29 18:57 ` bug#5481: The same bug appears in another system: Ubuntu 9.10 Dani Moncayo
@ 2010-03-03 14:32 ` Dani Moncayo
  2010-03-03 16:08   ` Chong Yidong
  1 sibling, 1 reply; 8+ messages in thread
From: Dani Moncayo @ 2010-03-03 14:32 UTC (permalink / raw)
  To: 5481

[-- Attachment #1: Type: text/plain, Size: 107 bytes --]

Hello, i filed this bug on January 26, and i still haven't see any answer to
it...

...has anyone seen it?

[-- Attachment #2: Type: text/html, Size: 171 bytes --]

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

* bug#5481: 23.1; insert-kbd-macro: does not write key-binding code
  2010-03-03 14:32 ` bug#5481: 23.1; insert-kbd-macro: does not write key-binding code Dani Moncayo
@ 2010-03-03 16:08   ` Chong Yidong
  2010-03-03 16:20     ` Dani Moncayo
  0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2010-03-03 16:08 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 5481

Dani Moncayo <dmoncayo@gmail.com> writes:

> Hello, i filed this bug on January 26, and i still haven't see any answer to
> it...
>
> ...has anyone seen it?

The insert-kbd-macro command was only intended to produce the code that
defines the macro, not the code that binds it.  We could change it to
generate the latter as well, but that would be a new feature, and will
have to wait till after the Emacs 23.2 release.






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

* bug#5481: 23.1; insert-kbd-macro: does not write key-binding code
  2010-03-03 16:08   ` Chong Yidong
@ 2010-03-03 16:20     ` Dani Moncayo
  2010-03-03 17:32       ` Chong Yidong
  0 siblings, 1 reply; 8+ messages in thread
From: Dani Moncayo @ 2010-03-03 16:20 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 5481

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]

Let's look at the emacs manual:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Save-Keyboard-Macro.html
.

The last paragraph says, literally:
If you give insert-kbd-macro a numeric argument, it makes additional Lisp
code to record the keys (if any) that you have bound to macroname, so that
the macro will be reassigned the same keys when you load the file.

This very feature is what I'm asking about. ¿Am i missing something?

On Wed, Mar 3, 2010 at 5:08 PM, Chong Yidong <cyd@stupidchicken.com> wrote:

> Dani Moncayo <dmoncayo@gmail.com> writes:
>
> > Hello, i filed this bug on January 26, and i still haven't see any answer
> to
> > it...
> >
> > ...has anyone seen it?
>
> The insert-kbd-macro command was only intended to produce the code that
> defines the macro, not the code that binds it.  We could change it to
> generate the latter as well, but that would be a new feature, and will
> have to wait till after the Emacs 23.2 release.
>

[-- Attachment #2: Type: text/html, Size: 1593 bytes --]

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

* bug#5481: 23.1; insert-kbd-macro: does not write key-binding code
  2010-03-03 16:20     ` Dani Moncayo
@ 2010-03-03 17:32       ` Chong Yidong
  2010-03-03 20:13         ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2010-03-03 17:32 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 5481

Dani Moncayo <dmoncayo@gmail.com> writes:

> Let's look at the emacs manual: http://www.gnu.org/software/emacs/manual/
> html_node/emacs/Save-Keyboard-Macro.html.
>
> The last paragraph says, literally:
> If you give insert-kbd-macro a numeric argument, it makes additional Lisp code
> to record the keys (if any) that you have bound to macroname, so that the macro
> will be reassigned the same keys when you load the file.
>
> This very feature is what I'm asking about. ¿Am i missing something?

I see the problem.  On further examination, there was already code in
macro.el that was supposed to handle this, but it was broken.  I've
checked in a fix.  Thanks for the bug report, and for the follow-up.






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

* bug#5481: 23.1; insert-kbd-macro: does not write key-binding code
  2010-03-03 17:32       ` Chong Yidong
@ 2010-03-03 20:13         ` Stefan Monnier
  2010-03-03 20:45           ` Chong Yidong
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2010-03-03 20:13 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 5481, Dani Moncayo

> I see the problem.  On further examination, there was already code in
> macro.el that was supposed to handle this, but it was broken.  I've
> checked in a fix.  Thanks for the bug report, and for the follow-up.
[...]
>   * src/keymap.c (Fwhere_is_internal): Use Fequal to compare
>   definitions, so that keyboard macros are correctly handled
>   (Bug#5481).

Could you explain why Fequal is necessary there?  It should only make
a difference if we're comparing one macro (ie. vector) against another
identical macro, but IIUC that shouldn't be the case here.


        Stefan






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

* bug#5481: 23.1; insert-kbd-macro: does not write key-binding code
  2010-03-03 20:13         ` Stefan Monnier
@ 2010-03-03 20:45           ` Chong Yidong
  0 siblings, 0 replies; 8+ messages in thread
From: Chong Yidong @ 2010-03-03 20:45 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5481, Dani Moncayo

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I see the problem.  On further examination, there was already code in
>> macro.el that was supposed to handle this, but it was broken.  I've
>> checked in a fix.  Thanks for the bug report, and for the follow-up.
> [...]
>>   * src/keymap.c (Fwhere_is_internal): Use Fequal to compare
>>   definitions, so that keyboard macros are correctly handled
>>   (Bug#5481).
>
> Could you explain why Fequal is necessary there?  It should only make
> a difference if we're comparing one macro (ie. vector) against another
> identical macro, but IIUC that shouldn't be the case here.

We are indeed comparing one macro against another macro.  For a macro
bound to a key, (key-binding KEY-BOUND-TO-A-MACRO) returns the lambda
form of the macro.  The function where_is_internal_1 uses Fequal
(keymap.c:3001), and it locates the correct binding if you give the
lambda form as the `definition' argument.

But the binding found by where_is_internal was tossed aside in
Fwhere_is_internal because the result of shadow_lookup was compared
using EQ---clearly an incorrect step.  That's the part I changed.






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

end of thread, other threads:[~2010-03-03 20:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-26 17:35 bug#5481: 23.1; insert-kbd-macro: does not write key-binding code Dani Moncayo
2010-01-29 18:57 ` bug#5481: The same bug appears in another system: Ubuntu 9.10 Dani Moncayo
2010-03-03 14:32 ` bug#5481: 23.1; insert-kbd-macro: does not write key-binding code Dani Moncayo
2010-03-03 16:08   ` Chong Yidong
2010-03-03 16:20     ` Dani Moncayo
2010-03-03 17:32       ` Chong Yidong
2010-03-03 20:13         ` Stefan Monnier
2010-03-03 20:45           ` Chong Yidong

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.