From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: looking up a submenu keymap in a menu keymap, when the submenu key is a string
Date: Sun, 8 Oct 2006 18:27:36 -0700 [thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMGEMMCLAA.drew.adams@oracle.com> (raw)
In-Reply-To: <jwvejtipal5.fsf-monnier+emacs@gnu.org>
> (keymap "Variables"
> ("toto" "toto" lambda nil
> (interactive)
> (imenu--menubar-select
> '("toto" . #<marker at 37004 in foo.el>))))
> `lookup-key' doesn't seem to help here - at least I cannot just pass
> "Variables" as the key arg to it.
You can try to pass ["Variables"]. But it's really not that
simple, since
you have to distinguish between the menu name and the "pseudo-key"
associated with it. In your examples, both are strings and
they are equal,
but that's not necessarily the case.
You may want o check the easy-menu functions for that, tho they're not
always as "easy" to use as the name implies.
Right. Thanks for your reply. I did try ["Variables"] (and [menu-bar index
"Variables"]), and I did study the easy-menu stuff. The easy-menu stuff
almost seemed as if it was going to get me what I needed, but I wasn't able
to make it work. Other suggestions are welcome, from anyone.
If there is no easy (or even feasible) way to do this, I wonder if it isn't
a mistake to "allow", or at least encourage, this kind of keymap entry -
Imenu is a standard library. If Imenu used the normal convention, there
would be no problem, and I don't think there would be a problem for Imenu
either. Is this more or less a bug, in that users cannot (at least not
easily, or any way I've found) look up such a key in the keymap (that is,
retrieve the submenu keymap)?
Anyway, I'm more immediately interested in finding a solution for the
current state, than in reporting a problem here. Help appreciated. Thanks to
Stefan, I feel a little confirmed in not having found a solution.
next prev parent reply other threads:[~2006-10-09 1:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-08 18:34 looking up a submenu keymap in a menu keymap, when the submenu key is a string Drew Adams
2006-10-09 1:02 ` Stefan Monnier
2006-10-09 1:27 ` Drew Adams [this message]
2006-10-09 5:07 ` Stefan Monnier
2006-10-09 15:36 ` Drew Adams
2006-10-09 16:57 ` Stefan Monnier
2006-10-10 1:31 ` Drew Adams
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=EIENLHALHGIMHGDOLMIMGEMMCLAA.drew.adams@oracle.com \
--to=drew.adams@oracle.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.