From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel 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 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1160357296 19412 80.91.229.2 (9 Oct 2006 01:28:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Oct 2006 01:28:16 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 09 03:28:14 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GWjwC-0005IT-O5 for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2006 03:28:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GWjwC-0003fd-3X for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2006 21:28:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GWjvy-0003ei-UV for emacs-devel@gnu.org; Sun, 08 Oct 2006 21:27:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GWjvy-0003eQ-Bk for emacs-devel@gnu.org; Sun, 08 Oct 2006 21:27:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GWjvy-0003eL-4u for emacs-devel@gnu.org; Sun, 08 Oct 2006 21:27:58 -0400 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GWk3P-0005KR-PE for emacs-devel@gnu.org; Sun, 08 Oct 2006 21:35:40 -0400 Original-Received: from rgmsgw02.us.oracle.com (rgmsgw02.us.oracle.com [138.1.186.52]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id k991Rs8f012288 for ; Sun, 8 Oct 2006 20:27:55 -0500 Original-Received: from dradamslap (dhcp-amer-whq-csvpn-gw3-141-144-80-106.vpn.oracle.com [141.144.80.106]) by rgmsgw02.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with SMTP id k991Rsig012807 for ; Sun, 8 Oct 2006 19:27:54 -0600 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60536 Archived-At: > (keymap "Variables" > ("toto" "toto" lambda nil > (interactive) > (imenu--menubar-select > '("toto" . #)))) > `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.