GNU bug report logs - #4339
23.1.50; NextStep emacs port problem with key sequences in menus (with patch)

Previous Next

Packages: emacs, ns;

Reported by: Rob Christie <robchristie <at> gmail.com>

Date: Fri, 4 Sep 2009 14:40:05 UTC

Severity: normal

Done: Adrian Robert <adrian.b.robert <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4339 in the body.
You can then email your comments to 4339 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4339; Package emacs. (Fri, 04 Sep 2009 14:40:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rob Christie <robchristie <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 04 Sep 2009 14:40:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Rob Christie <robchristie <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; NextStep emacs port problem with key sequences in menus 
	(with patch)
Date: Fri, 4 Sep 2009 10:32:45 -0400
[Message part 1 (text/plain, inline)]
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug <at> gnu.org mailing
list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

In the ns/cocoa version of Emacs 23 when key sequences are added to menu
items via calls such as easy-menu-define, key sequences that start with
s end up showing up as just the Command key with a single letter. In
previous versions of emacs for the Mac (Carbon Emacs), the key sequence
would show up correctly.  For
packages such as YaSnippet this becomes a problem because the key
sequence that is shown is the snippet you must type to get an
expansion. For example, in snippets that I currently use typing
shbt <tab> expands to "should belong to". In previous versions of emacs
the menu item for this would show

should_belong_to ... (shbt =>)

In the next step version of emacs it shows

should_belong_to ...     ⌘B

The following patch makes does a bit more of a check in parseKeyEquiv in
nsmenu.m to fix the issue.


From f00edeb61d82aaed792f8615f7cd529bd4a8b4f7 Mon Sep 17 00:00:00 2001
From: Rob Christie <robchristie <at> gmail.com>
Date: Fri, 4 Sep 2009 04:02:20 -0400
Subject: [PATCH] Changed nsmenu so that parseKeyEquiv can handle when menus
are created with key combinations that start with s, but do are not supposed
to be intermpreted as meta.

---
 src/nsmenu.m |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/nsmenu.m b/src/nsmenu.m
index 0518466..2a4f9f7 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -609,12 +609,13 @@ name_is_separator (name)
     return @"";

   while (*tpos == ' ' || *tpos == '(')
-    tpos++;
-  if (*tpos != 's') {
-    keyEquivModMask = 0; /* signal */
-    return [NSString stringWithUTF8String: tpos];
-  }
-  return [NSString stringWithFormat: @"%c", tpos[2]];
+      tpos++;
+  if ((*tpos == 's') && (*(tpos+1) == '-'))
+    {
+      return [NSString stringWithFormat: @"%c", tpos[2]];
+    }
+  keyEquivModMask = 0; /* signal */
+  return [NSString stringWithUTF8String: tpos];
 }


-- 

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/Applications/Emacs.app/Contents/Resources/etc/DEBUG for instructions.


In GNU Emacs 23.1.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2009-08-28 on black.local
Windowing system distributor `Apple', version 10.3.949
configured using `configure  '--with-ns''

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: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  yas/global-mode: t
  yas/minor-mode: t
  shell-dirtrack-mode: t
  flyspell-mode: t
  diff-auto-refine-mode: t
  global-hl-line-mode: t
  delete-selection-mode: t
  pc-selection-mode: t
  icomplete-mode: t
  show-paren-mode: t
  which-function-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x s i b <backspace> <backspace> u b SPC <backspace>
<backspace> <backspace> b u SPC SPC g SPC C-g C-h i
m E m a c s <return> m B u g SPC <backspace> s <return>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<up> <up> <up> <down> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <down>
<left> <left> <left> <return> M-x r e p o r t SPC e
m SPC SPC SPC <return>

Recent messages:
Loading /Users/rchristie/.emacs.d/rwc-c.el (source)...done
Loading /Users/rchristie/.emacs.d/rwc-defuns.el (source)...
Loading /Users/rchristie/.emacs.d/elpa/package.el (source)...done
Loading /Users/rchristie/.emacs.d/rwc-defuns.el (source)...done
Loading /Users/rchristie/.emacs.d/elpa/package.el (source)...done
Starting new Ispell process [default] ...
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list... [2 times]
Quit
Composing main Info directory...done

Load-path shadows:
/Users/rchristie/.emacs.d/vendor/gist.el/gist hides ~/.emacs.d/vendor/gist
/Users/rchristie/.emacs.d/git/vc-git hides
/Applications/Emacs.app/Contents/Resources/lisp/vc-git
~/.emacs.d/custom hides
/Applications/Emacs.app/Contents/Resources/lisp/custom
/Users/rchristie/dev/dotfiles/emacs.d/vendor/rinari/util/ruby-mode hides
/Applications/Emacs.app/Contents/Resources/lisp/progmodes/ruby-mode
[Message part 2 (text/html, inline)]

bug reassigned from package 'emacs' to 'emacs,ns'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 04 Sep 2009 16:35:05 GMT) Full text and rfc822 format available.

Reply sent to Adrian Robert <adrian.b.robert <at> gmail.com>:
You have taken responsibility. (Sat, 19 Sep 2009 00:05:20 GMT) Full text and rfc822 format available.

Notification sent to Rob Christie <robchristie <at> gmail.com>:
bug acknowledged by developer. (Sat, 19 Sep 2009 00:05:20 GMT) Full text and rfc822 format available.

Message #12 received at 4339-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: 4339-done <at> debbugs.gnu.org
Cc: Rob Christie <robchristie <at> gmail.com>
Subject: Re: 23.1.50; NextStep emacs port problem with key sequences in menus (with patch)
Date: Fri, 18 Sep 2009 19:57:59 -0400
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4339

Thank you, I've installed your patch on the trunk.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Sat, 14 Nov 2009 15:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.