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

Previous Next

Packages: ns, emacs;

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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Rob Christie <robchristie <at> gmail.com>
Subject: bug#4339 closed by Adrian Robert <adrian.b.robert <at> gmail.com> (Re:
 23.1.50; NextStep emacs port problem with key sequences in menus (with
 patch))
Date: Sat, 19 Sep 2009 00:05:20 +0000
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs,ns package:

#4339: 23.1.50; NextStep emacs port problem with key sequences in menus  (with patch)

It has been closed by Adrian Robert <adrian.b.robert <at> gmail.com>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Adrian Robert <adrian.b.robert <at> gmail.com> by
replying to this email.


-- 
4339: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4339
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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.

[Message part 3 (message/rfc822, inline)]
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 4 (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 5 (text/html, inline)]

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

Previous Next


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