all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* strange keymap bugs
@ 2002-05-19  5:49 Colin Walters
  2002-05-19 23:28 ` Stefan Monnier
  2002-05-20 14:48 ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Colin Walters @ 2002-05-19  5:49 UTC (permalink / raw)


Hi,

I'm hoping a keymap guru can track this one down for me:

emacs -q --no-site-file 
M-x ibuffer

Then go to the "Operate" menu.  On my system, the option which should be
labeled "Kill" (`ibuffer-do-delete') is instead labeled "Apply Patch".

This has actually been happening for quite a while (like months), but I
kept thinking it was some weirdness on my system or a bug in ibuffer. 
I'm now pretty sure it's not either of those.

And, even stranger, move point up to the "[ Default ]" filter group
name, and pull down the "Operate" menu again.  On my system, the
toplevel "Operate", "View", and "Mark" menus now each contain themselves
as two submenus!

The "[ Default ]" filter group name *does* have a `keymap' property; but
this is just supposed to override those specific entries in the buffer's
local map, correct?

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

* Re: strange keymap bugs
  2002-05-19  5:49 strange keymap bugs Colin Walters
@ 2002-05-19 23:28 ` Stefan Monnier
  2002-05-20 14:48 ` Richard Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2002-05-19 23:28 UTC (permalink / raw)
  Cc: emacs-devel

> I'm hoping a keymap guru can track this one down for me:
> 
> emacs -q --no-site-file 
> M-x ibuffer
> 
> Then go to the "Operate" menu.  On my system, the option which should be
> labeled "Kill" (`ibuffer-do-delete') is instead labeled "Apply Patch".

I cannot reproduce this here.

> And, even stranger, move point up to the "[ Default ]" filter group
> name, and pull down the "Operate" menu again.  On my system, the
> toplevel "Operate", "View", and "Mark" menus now each contain themselves
> as two submenus!
> 
> The "[ Default ]" filter group name *does* have a `keymap' property; but
> this is just supposed to override those specific entries in the buffer's
> local map, correct?

Emacs does not really know how to merge two menus that way.
What you have to do instead is have your text-local map hide the
buffer-local menu and replace it with another one (which has
the same name but another binding).
This is a limitation of the current code in keyboard.c, AFAIK.


	Stefan

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

* Re: strange keymap bugs
  2002-05-19  5:49 strange keymap bugs Colin Walters
  2002-05-19 23:28 ` Stefan Monnier
@ 2002-05-20 14:48 ` Richard Stallman
  2002-05-21 10:01   ` Colin Walters
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2002-05-20 14:48 UTC (permalink / raw)
  Cc: emacs-devel

    Then go to the "Operate" menu.  On my system, the option which should be
    labeled "Kill" (`ibuffer-do-delete') is instead labeled "Apply Patch".

That failure does not happen for me now.

    And, even stranger, move point up to the "[ Default ]" filter group
    name, and pull down the "Operate" menu again.  On my system, the
    toplevel "Operate", "View", and "Mark" menus now each contain themselves
    as two submenus!

That does happen.

    The "[ Default ]" filter group name *does* have a `keymap' property; but
    this is just supposed to override those specific entries in the buffer's
    local map, correct?

For the keyboard, it overrides some bindings, but I think that making
two submenus is normal behavior in a menu when there are multiple
bindings for the same menu item.  There is no code to merge the
different keymaps to make one menu, and I am not sure that would be
the right thing in general, even if it is what you want in this case.

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

* Re: strange keymap bugs
  2002-05-20 14:48 ` Richard Stallman
@ 2002-05-21 10:01   ` Colin Walters
  0 siblings, 0 replies; 4+ messages in thread
From: Colin Walters @ 2002-05-21 10:01 UTC (permalink / raw)


On Mon, 2002-05-20 at 10:48, Richard Stallman wrote:
>     Then go to the "Operate" menu.  On my system, the option which should be
>     labeled "Kill" (`ibuffer-do-delete') is instead labeled "Apply Patch".
> 
> That failure does not happen for me now.

Hmm.  Strange.  I will try to track this down, then.

> For the keyboard, it overrides some bindings, but I think that making
> two submenus is normal behavior in a menu when there are multiple
> bindings for the same menu item.  There is no code to merge the
> different keymaps to make one menu, and I am not sure that would be
> the right thing in general, even if it is what you want in this case.

Ah.  So the solution is just to not set the keymap parent, and then
there will be no duplicate menu keybindings.  I don't know why I did
that in the first place; I think it was because I was originally using
the `local-map' property, but that brought its own problems.

Anyways, it works now.  Thanks!

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

end of thread, other threads:[~2002-05-21 10:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-19  5:49 strange keymap bugs Colin Walters
2002-05-19 23:28 ` Stefan Monnier
2002-05-20 14:48 ` Richard Stallman
2002-05-21 10:01   ` Colin Walters

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.