unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4339: 23.1.50; NextStep emacs port problem with key sequences in menus (with patch)
@ 2009-09-04 14:32 ` Rob Christie
  2009-09-19  0:05   ` bug#4339: marked as done (23.1.50; NextStep emacs port problem with key sequences in menus (with patch)) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Christie @ 2009-09-04 14:32 UTC (permalink / raw)
  To: emacs-pretest-bug

[-- Attachment #1: Type: text/plain, Size: 5261 bytes --]

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@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@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

[-- Attachment #2: Type: text/html, Size: 7417 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#4339: marked as done (23.1.50; NextStep emacs port problem with key sequences in menus  (with patch))
  2009-09-04 14:32 ` bug#4339: 23.1.50; NextStep emacs port problem with key sequences in menus (with patch) Rob Christie
@ 2009-09-19  0:05   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2009-09-19  0:05 UTC (permalink / raw)
  To: Adrian Robert

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

Your message dated Fri, 18 Sep 2009 19:57:59 -0400
with message-id <0572B966-1678-4A1B-ABF0-83EFFCE126AB@gmail.com>
and subject line Re: 23.1.50; NextStep emacs port problem with key sequences in menus (with patch)
has caused the Emacs bug report #4339,
regarding 23.1.50; NextStep emacs port problem with key sequences in menus  (with patch)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
4339: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4339
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 16710 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 5261 bytes --]

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@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@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

[-- Attachment #2.1.2: Type: text/html, Size: 7417 bytes --]

[-- Attachment #3: Type: message/rfc822, Size: 2687 bytes --]

From: Adrian Robert <adrian.b.robert@gmail.com>
To: 4339-done@emacsbugs.donarmstrong.com
Cc: Rob Christie <robchristie@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
Message-ID: <0572B966-1678-4A1B-ABF0-83EFFCE126AB@gmail.com>

http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4339

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-19  0:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <0572B966-1678-4A1B-ABF0-83EFFCE126AB@gmail.com>
2009-09-04 14:32 ` bug#4339: 23.1.50; NextStep emacs port problem with key sequences in menus (with patch) Rob Christie
2009-09-19  0:05   ` bug#4339: marked as done (23.1.50; NextStep emacs port problem with key sequences in menus (with patch)) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).