From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matt Swift Newsgroups: gmane.emacs.bugs Subject: function keys do not appear as kbd equivs on menus Date: Sun, 02 Mar 2003 13:57:01 -0500 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1046631634 28502 80.91.224.249 (2 Mar 2003 19:00:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 2 Mar 2003 19:00:34 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18pYhC-0007P6-00 for ; Sun, 02 Mar 2003 20:00:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18pYgr-0008TK-05 for gnu-bug-gnu-emacs@m.gmane.org; Sun, 02 Mar 2003 14:00:01 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18pYge-0008SU-00 for bug-gnu-emacs@gnu.org; Sun, 02 Mar 2003 13:59:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18pYe8-0007cO-00 for bug-gnu-emacs@gnu.org; Sun, 02 Mar 2003 13:57:20 -0500 Original-Received: from pool-68-160-54-133.bos.east.verizon.net ([68.160.54.133] helo=beth.swift.xxx) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18pYe7-0007bd-00 for bug-gnu-emacs@gnu.org; Sun, 02 Mar 2003 13:57:11 -0500 Original-Received: from beth.swift.xxx (swift@localhost.swift.xxx [127.0.0.1]) h22Iv1pF027525verify=FAIL) for ; Sun, 2 Mar 2003 13:57:01 -0500 Original-Received: (from swift@localhost) by beth.swift.xxx (8.12.7/8.12.7/Debian-2) id h22Iv1lo027523; Sun, 2 Mar 2003 13:57:01 -0500 Original-To: bug-gnu-emacs@gnu.org User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (i386-debian-linux-gnu) X-Mailscanner: clean (beth.swift.xxx) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4538 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4538 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-11-06 on beth, modified by Debian configured using `configure i386-debian-linux-gnu --prefix=/usr/local --sharedstatedir=/var/lib --libexecdir=/usr/local/lib --localstatedir=/var/lib --infodir=/usr/local/share/info --mandir=/usr/local/share/man --with-pop=yes --with-x=yes --with-x-toolkit=athena --without-gif' 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: en_US.UTF-8 locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: I have been trying to define menu-bar menus for a minor mode in which keys are bound to a function key f5. After much experimentation and trying for a good while to master the labyrinth of keyboard input in general, my conclusion is that Emacs will not pick up and display keyboard equivalents on menus when the key sequence to invoke them begins with a function key. I have a vague idea that this is so because menu items are implemented as bindings for a hierarchy of pseudo-keys in the form of vectors, or function keys. But other than seeing that suspicioius connection, I cannot find any documented or clear reason why this should be so, so I am submitting this behavior as a bug. The relatively short keymap below demonstrates a few things: that Emacs will pick up and display bindings for sequences like C-f3; that Emacs will not pick up sequences beginning with f5 (or other function keys); and lastly that Emacs will not pick them up even if the precise binding is supplied with a :key-sequence keyword (in this case [f5 108] = l bound to `ox-set-subtree-level'; notice that Emacs has stored (nil) as the 5th element of that list, meaning it has not found a binding for that menu item -- you can see that all the keys not bound first of all to function keys do show up there.) The behavior is the same with 21.2 as it is with this week's 21.3.50. ox-minor-mode-map => (keymap (C-f1 . hide-sublevels) (C-f2 . ox-hide-2-sublevels) (C-f3 . ox-hide-3-sublevels) (C-f4 . ox-hide-4-sublevels) (C-f5 . ox-hide-5-sublevels) (C-f6 . ox-hide-6-sublevels) (menu-bar keymap (ox "Ox" keymap (view-surface "View Surface" keymap (MB-hide-sublevels menu-item "View top level" hide-sublevels ([C-f1] . " ()") :help "Hide all but level 1") (MB-ox-hide-2-sublevels menu-item "View top 2 levels" ox-hide-2-sublevels ([C-f2] . " ()") :help "Hide all but levels 1-2") (MB-ox-hide-3-sublevels menu-item "View top 3 levels" ox-hide-3-sublevels ([C-f3] . " ()") :help "Hide all but levels 1-3") (MB-ox-hide-4-sublevels menu-item "View top 4 levels" ox-hide-4-sublevels ([C-f4] . " ()") :help "Hide all but levels 1-4") (MB-ox-hide-5-sublevels menu-item "View top 5 levels" ox-hide-5-sublevels ([C-f5] . " ()") :help "Hide all but levels 1-5") (MB-ox-hide-6-sublevels menu-item "View top 6 levels" ox-hide-6-sublevels ([C-f6] . " ()") :help "Hide all but levels 1-6")) (adjust-levels menu-item "--") (MB-ox-inc-heading-level menu-item "Demote heading" ox-inc-heading-level (nil) :help "Increase level of this heading") (MB-ox-inc-subtree-level menu-item "Demote subtree" ox-inc-subtree-level (nil) :help "Increase the level of heading and subheadings") (MB-ox-dec-subtree-level menu-item "Promote subtree" ox-dec-subtree-level (nil) :help "Decrease the level of heading and subheadings") (MB-ox-inc-region-subtree-level menu-item "Demote region" ox-inc-region-subtree-level (nil) :help "Increase the level of headings in region") (MB-ox-dec-region-subtree-level menu-item "Promote region" ox-dec-region-subtree-level (nil) :help "Decrease the level of headings in region") (set-levels menu-item "--") (MB-ox-set-heading-level menu-item "Set level" ox-set-heading-level (nil) :help "Set level of this heading") (MB-ox-set-subtree-level menu-item "Set subtree level" ox-set-subtree-level (nil) :help "Set the level of this subtree" :key-sequence [f5 108]) (MB-ox-set-region-subtree-level menu-item "Set region subtree level" ox-set-region-subtree-level (nil) :help "Set the level of subtrees in the region") (MB-ox-normalize-heading menu-item "Normalize heading" ox-normalize-heading (nil) :help "Normalize the spacing in this header") (MB-ox-normalize-subtree menu-item "Normalize subtree" ox-normalize-subtree (nil) :help "Normalize the spacing in this subtree") (MB-ox-normalize-region menu-item "Normalize region" ox-normalize-region (nil) :help "Normalize the spacing in headings in the region") (MB-ox-normalize-buffer menu-item "Normalize buffer" ox-normalize-buffer (nil) :help "Normalize the spacing in all headings in the buffer") (easier-menu-1 menu-item "--") (MB-ox-make-line-heading menu-item "New heading" ox-make-line-heading (nil) :help "Insert a new heading at point") (MB-outline-mark-subtree menu-item "Mark subtree" outline-mark-subtree ([3 67108910 64] . " (C-c C-. @)") :help "Put point at the beginning and the mark at the end of the current subtree"))) (f5 keymap (62 . ox-inc-heading-level) (46 . ox-inc-heading-level) (60 . ox-inc-heading-level) (44 . ox-inc-heading-level) (9 . ox-inc-subtree-level) (backtab . ox-dec-subtree-level) (82 . ox-inc-region-subtree-level) (114 . ox-dec-region-subtree-level) (108 . ox-set-heading-level) (76 . ox-set-subtree-level) (12 . ox-set-region-subtree-level) (normalize) (110 . ox-normalize-heading) (78 . ox-normalize-subtree) (14 . ox-normalize-region) (27 keymap (110 . ox-normalize-buffer)) (99 . ox-make-line-heading) (64 . outline-mark-subtree))) Recent input: t . e m c s a c s - d e C-n B q B r q s q g n M-1 q M-x r e p o r t - e m a c x - s - b u g Recent messages: 1 -> require: sort 1 <- require: sort Auto-saving...done 1 -> require: nnml 1 <- require: nnml Loading emacsbug... 1 -> require: sendmail 1 <- require: sendmail Loading emacsbug...done