From unknown Thu Aug 14 21:51:52 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4339 <4339@debbugs.gnu.org> To: bug#4339 <4339@debbugs.gnu.org> Subject: Status: 23.1.50; NextStep emacs port problem with key sequences in menus (with patch) Reply-To: bug#4339 <4339@debbugs.gnu.org> Date: Fri, 15 Aug 2025 04:51:52 +0000 retitle 4339 23.1.50; NextStep emacs port problem with key sequences in men= us (with patch) reassign 4339 emacs,ns submitter 4339 Rob Christie severity 4339 normal thanks From robchristie@gmail.com Fri Sep 4 07:32:55 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2009 14:32:55 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: *** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=3.2 required=4.0 tests=FOURLA,GMAIL,IMPRONONCABLE_2, MULTALT,MURPHY_DRUGS_REL8,MURPHY_SEX_L2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n84EWrI9022302 for ; Fri, 4 Sep 2009 07:32:54 -0700 Received: from mail.gnu.org ([199.232.76.166]:46979 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MjZqP-0005vd-2X for emacs-pretest-bug@gnu.org; Fri, 04 Sep 2009 10:32:53 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MjZqN-0004av-3h for emacs-pretest-bug@gnu.org; Fri, 04 Sep 2009 10:32:52 -0400 Received: from mx20.gnu.org ([199.232.41.8]:45504) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MjZqM-0004aG-Gj for emacs-pretest-bug@gnu.org; Fri, 04 Sep 2009 10:32:50 -0400 Received: from mail-bw0-f220.google.com ([209.85.218.220]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjZqK-000558-5U for emacs-pretest-bug@gnu.org; Fri, 04 Sep 2009 10:32:48 -0400 Received: by bwz20 with SMTP id 20so767298bwz.42 for ; Fri, 04 Sep 2009 07:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=E8navPUJE3RKFUMY75UBri6kFlmTE4mjz4X/GRQ/eK0=; b=ITFmGz0FgB4ZtUrR5pUV7JK0QU2sOBYGQcAYPBvzWUU/xoAH+5i4zPYbviWsD9yuYV XPCPNl2xAtGUVgQ3R+ZjveAqHBzT6vH3NYDe085ERve2Qb8aLXY6g+T3ksp/8MNaEEWZ Vlr4qMfMFmYs299mQ2MJEjO4I4W4vGx9D1Cdk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=wwYYYGfW7/n8W5UKRkwcAt7qe9shHekkIJwJ4NWr8/SYTLVKmCAWK2IdR6VdOgaEOJ GGkh7Pwb9TOII7qhfi+YYrj+oyp/GnInt8+n7nYINXc0qXSyyttpjxQbepAV1pmzt8ps zqm+NarPKxZ8kqYGiDdBDzLTCZv82ODIMPGfQ= MIME-Version: 1.0 Received: by 10.223.132.207 with SMTP id c15mr4724102fat.56.1252074765729; Fri, 04 Sep 2009 07:32:45 -0700 (PDT) Date: Fri, 4 Sep 2009 10:32:45 -0400 Message-ID: <73143cf0909040732n26982298w6d5d5b10df238a9c@mail.gmail.com> Subject: 23.1.50; NextStep emacs port problem with key sequences in menus (with patch) From: Rob Christie To: emacs-pretest-bug@gnu.org Content-Type: multipart/alternative; boundary=0023545bd494a4c1ec0472c15f31 X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --0023545bd494a4c1ec0472c15f31 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 expands to "should belong to". In previous versions of emacs the menu item for this would show should_belong_to ... (shbt =3D>) In the next step version of emacs it shows should_belong_to ... =E2=8C=98B 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 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 suppose= d 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 =3D=3D ' ' || *tpos =3D=3D '(') - tpos++; - if (*tpos !=3D 's') { - keyEquivModMask =3D 0; /* signal */ - return [NSString stringWithUTF8String: tpos]; - } - return [NSString stringWithFormat: @"%c", tpos[2]]; + tpos++; + if ((*tpos =3D=3D 's') && (*(tpos+1) =3D=3D '-')) + { + return [NSString stringWithFormat: @"%c", tpos[2]]; + } + keyEquivModMask =3D 0; /* signal */ + return [NSString stringWithUTF8String: tpos]; } --=20 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 u b SPC b u SPC SPC g SPC C-g C-h i m E m a c s m B u g SPC s M-x r e p o r t SPC e m SPC SPC SPC 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 --0023545bd494a4c1ec0472c15f31 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Please write in English if possible, because the Emacs maintainer= s
usually do not have translators to read other languages for the= m.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing= list.

Please describe exactly what actions triggered the bug<= /div>
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 wit= h
s end up showing up as just the Command key with a single lette= r. In
previous versions of emacs for the Mac (Carbon Emacs), the = key sequence
would show up correctly. =C2=A0For
packages such as YaSnippe= t this becomes a problem because the key
sequence that is shown i= s 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 =3D>)

In the next step version of emacs it shows

should_= belong_to ... =C2=A0 =C2=A0 =E2=8C=98B

The followi= ng patch makes does a bit more of a check in parseKeyEquiv in
nsm= enu.m to fix the issue.


From f00edeb61d82aaed792f8615f7cd529bd4a= 8b4f7 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 s= upposed to be intermpreted as meta.

---
=C2=A0src/nsmenu.m | =C2=A0 13 +++++++------
=C2=A01 files change= d, 7 insertions(+), 6 deletions(-)

diff --git a/sr= c/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)
=C2=A0=C2=A0 =C2=A0 return @"";
=C2=A0= =C2=A0=C2=A0
=C2=A0=C2=A0 while (*tpos =3D=3D ' ' || *tpo= s =3D=3D '(')
- =C2=A0 =C2=A0tpos++;
- =C2=A0if (*tpos !=3D 's') {
- =C2=A0 =C2=A0keyEqui= vModMask =3D 0; /* signal */
- =C2=A0 =C2=A0return [NSString stri= ngWithUTF8String: tpos];
- =C2=A0}
- =C2=A0return [NSSt= ring stringWithFormat: @"%c", tpos[2]];
+ =C2=A0 =C2=A0 =C2=A0tpos++;
+ =C2=A0if ((*tpos =3D=3D '= ;s') && (*(tpos+1) =3D=3D '-'))=C2=A0
+ =C2= =A0 =C2=A0{
+ =C2=A0 =C2=A0 =C2=A0return [NSString stringWithForm= at: @"%c", tpos[2]];
+ =C2=A0 =C2=A0}
+ =C2=A0keyEquivModMask =3D 0; /* signal */
+ =C2=A0return [NSStr= ing stringWithUTF8String: tpos];
=C2=A0}
=C2=A0
=C2=A0
--=C2=A0

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


In GNU Emacs 23.1.50.1 (i386-apple-darwi= n9.8.0, NS apple-appkit-949.54)
=C2=A0of 2009-08-28 on black.loca= l
Windowing system distributor `Apple', version 10.3.949
configured using `configure =C2=A0'--with-ns''
<= br>
Important settings:
=C2=A0=C2=A0value of $LC_ALL: n= il
=C2=A0=C2=A0value of $LC_COLLATE: nil
=C2=A0=C2=A0va= lue of $LC_CTYPE: nil
=C2=A0=C2=A0value of $LC_MESSAGES: nil
=C2=A0=C2=A0value of $LC_M= ONETARY: nil
=C2=A0=C2=A0value of $LC_NUMERIC: nil
=C2= =A0=C2=A0value of $LC_TIME: nil
=C2=A0=C2=A0value of $LANG: nil
=C2=A0=C2=A0value of $XMODIFIERS: nil
=C2=A0=C2=A0locale-coding-system: nil
=C2=A0=C2=A0default-enable-= multibyte-characters: t

Major mode: Info

Minor modes in effect:
=C2=A0=C2=A0yas/global-mod= e: t
=C2=A0=C2=A0yas/minor-mode: t
=C2=A0=C2=A0shell-dirtrack-mode: t
=C2=A0=C2=A0flyspell-mode= : t
=C2=A0=C2=A0diff-auto-refine-mode: t
=C2=A0=C2=A0gl= obal-hl-line-mode: t
=C2=A0=C2=A0delete-selection-mode: t
=C2=A0=C2=A0pc-selection-mode: t
=C2=A0=C2=A0icomplete-mode: t=
=C2=A0=C2=A0show-paren-mode: t
=C2=A0=C2=A0which-function-mo= de: t
=C2=A0=C2=A0tooltip-mode: t
=C2=A0=C2=A0mouse-whe= el-mode: t
=C2=A0=C2=A0menu-bar-mode: t
=C2=A0=C2=A0fil= e-name-shadow-mode: t
=C2=A0=C2=A0global-font-lock-mode: t
=C2=A0=C2=A0font-lock-mode: t
=C2=A0=C2=A0blink-cursor-mode:= t
=C2=A0=C2=A0global-auto-composition-mode: t
=C2=A0= =C2=A0auto-composition-mode: t
=C2=A0=C2=A0auto-encryption-mode: = t
=C2=A0=C2=A0auto-compression-mode: t
=C2=A0=C2=A0column-number-mode: t
=C2=A0=C2=A0line-number-mode: t=
=C2=A0=C2=A0transient-mark-mode: t

Rece= nt input:
M-x s i b <backspace> <backspace> u b SPC &= lt;backspace>=C2=A0
<backspace> <backspace> b u SPC SPC g SPC C-g C-h i=C2=A0
=
m E m a c s <return> m B u g SPC <backspace> s <return&= gt;=C2=A0
<down> <down> <down> <down> <= ;down> <down> <down> <down>=C2=A0
<down> <down> <down> <down> <down> <d= own> <down> <down>=C2=A0
<down> <down>= <down> <down> <down> <down> <down> <down&= gt;=C2=A0
<up> <up> <up> <down> <right> <right&= gt; <right> <right>=C2=A0
<right> <right>= <right> <right> <right> <right> <down>=C2=A0=
<left> <left> <left> <return> M-x r e p o r t = SPC e=C2=A0
m SPC SPC SPC <return>

Recent messages:
Loading /Users/rchristie/.emacs.d/rwc-c.el (sou= rce)...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 lis= t... [2 times]
Quit
Composing main Info directory...done

Load-path shadows:
/Users/rchristie/.emacs.d/vendor/gist.e= l/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/lis= p/custom
/Users/rchristie/dev/dotfiles/emacs.d/vendor/rinari/util= /ruby-mode hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/= ruby-mode

--0023545bd494a4c1ec0472c15f31-- From rgm@gnu.org Fri Sep 4 09:27:50 2009 Received: (at control) by emacsbugs.donarmstrong.com; 4 Sep 2009 16:27:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.7 required=4.0 tests=AWL,ONEWORD,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n84GRmOw011422 for ; Fri, 4 Sep 2009 09:27:50 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Mjbdb-0004Fg-R9; Fri, 04 Sep 2009 12:27:48 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19105.16387.657386.295073@fencepost.gnu.org> Date: Fri, 4 Sep 2009 12:27:47 -0400 From: Glenn Morris To: control Subject: control X-Debbugs-No-Ack: yes close 4328 reassign 4339 emacs,ns severity 4310 wishlist reassign 4329 emacs,solaris reassign 4330 emacs,solaris fixed 4330 23.1.50 reassign 4331 emacs,solaris reassign 4332 emacs,solaris fixed 4332 23.1.50 reassign 4327 spam reassign 4323 spam From adrian.b.robert@gmail.com Fri Sep 18 16:56:37 2009 Received: (at 4339-done) by emacsbugs.donarmstrong.com; 18 Sep 2009 23:56:37 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.3 required=4.0 tests=AWL,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8INuabq030908 for <4339-done@emacsbugs.donarmstrong.com>; Fri, 18 Sep 2009 16:56:37 -0700 Received: by qw-out-2122.google.com with SMTP id 3so452338qwe.13 for <4339-done@emacsbugs.donarmstrong.com>; Fri, 18 Sep 2009 16:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:content-type :message-id:cc:content-transfer-encoding:from:subject:date:to :x-mailer; bh=th6aauwF92y5tcjdbuB4cutP2BVVC7iNWToTAXT/GRU=; b=OLpxL6d9rA3oG7KxqyltxYpyx6gtkPWE1mnyF0Yb24NzAMhG11fgduotGuPKkeERaJ T0e02IEuN5YMs3qsSufXFcoJUpRCMKtHXPSW+XSuw2dbhlqvV6I4gsYrxXnOi8GmQrgU JkoqBQilNx9XXEJrH0d6c6KxbMJALS8P29Xs8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; b=ZYEDzHcy1nUSzS6BJ7e0gt7w28TWqVa1c+vv9uBd6bMJUot/tgkXDOGcE8s/wwIeiX NsfEYvxVCorgepbPzO7mCXEIG2hE5aMGs4hwobUldAViEyeibMxOS/+0wiLvMND/tVMU k5sGo2GYXyjmqHb2gP3wEz1X341qAtOfA5emo= Received: by 10.224.22.132 with SMTP id n4mr1894350qab.176.1253318195816; Fri, 18 Sep 2009 16:56:35 -0700 (PDT) Received: from ?10.0.1.3? (dpc6745214221.direcpc.com [67.45.214.221]) by mx.google.com with ESMTPS id 7sm1189063qwb.20.2009.09.18.16.56.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 18 Sep 2009 16:56:35 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <0572B966-1678-4A1B-ABF0-83EFFCE126AB@gmail.com> Cc: Rob Christie Content-Transfer-Encoding: 7bit From: Adrian Robert 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 To: 4339-done@debbugs.gnu.org X-Mailer: Apple Mail (2.753.1) http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4339 Thank you, I've installed your patch on the trunk. From unknown Thu Aug 14 21:51:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 14 Nov 2009 15:24:13 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator