GNU bug report logs - #29595
26.0.90; [macOS] menu items show incorrect shortcut keys

Previous Next

Package: emacs;

Reported by: Paul Rankin <hello <at> paulwrankin.com>

Date: Thu, 7 Dec 2017 01:36:02 UTC

Severity: minor

Found in version 26.0.90

Done: Alan Third <alan <at> idiocy.org>

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 29595 in the body.
You can then email your comments to 29595 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-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Thu, 07 Dec 2017 01:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Rankin <hello <at> paulwrankin.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 07 Dec 2017 01:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Rankin <hello <at> paulwrankin.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.90; menu items show incorrect shortcut keys
Date: Thu, 07 Dec 2017 11:35:06 +1000
[Message part 1 (text/plain, inline)]
The GUI build of Emacs 26.x shows incorrect shortcut keys in the menu: either ⇧C (shift-C) or ⇧M (shift-M). See attached screenshot or https://imgur.com/a/fQaly

These are displayed in the macOS native menu style, while the Emacs duplicated shortcuts in parentheses are still correct.

To reproduce:

1. emacs -Q
2. click a menu item

Expected results:

Menu items should show correct shortcut cut keys.

Actual results:

Menu items show combination of incorrect keys with OS native display and correct keys in Emacs's duplicates.

Configuration:

GNU Emacs 26.0.90 (build 1, x86_64-apple-darwin17.2.0, NS appkit-1561.10 Version 10.13.1 (Build 17B48)) of 2017-11-05

macOS 10.13.1 (17B1003)

-- 
https://www.paulwrankin.com
[Screen Shot 2017-12-07 at 11.26.08 am.jpg (image/jpeg, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Thu, 07 Dec 2017 21:41:01 GMT) Full text and rfc822 format available.

Message #8 received at 29595 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Paul Rankin <hello <at> paulwrankin.com>
Cc: 29595 <at> debbugs.gnu.org
Subject: Re: bug#29595: 26.0.90; menu items show incorrect shortcut keys
Date: Thu, 7 Dec 2017 21:40:02 +0000
On Thu, Dec 07, 2017 at 11:35:06AM +1000, Paul Rankin wrote:
> The GUI build of Emacs 26.x shows incorrect shortcut keys in the
> menu: either ⇧C (shift-C) or ⇧M (shift-M). See attached screenshot
> or https://imgur.com/a/fQaly
> 
> These are displayed in the macOS native menu style, while the Emacs
> duplicated shortcuts in parentheses are still correct.
> 
> To reproduce:
> 
> 1. emacs -Q
> 2. click a menu item
> 
> Expected results:
> 
> Menu items should show correct shortcut cut keys.
> 
> Actual results:
> 
> Menu items show combination of incorrect keys with OS native display
> and correct keys in Emacs's duplicates.
> 
> Configuration:
> 
> GNU Emacs 26.0.90 (build 1, x86_64-apple-darwin17.2.0, NS
> appkit-1561.10 Version 10.13.1 (Build 17B48)) of 2017-11-05
> 
> macOS 10.13.1 (17B1003)

I can’t replicate this. It looks right to me. The only difference I
can see is that I’m using macOS 10.12, so maybe that’s it. Can anyone
else confirm?

-- 
Alan Third




Changed bug title to '26.0.90; [macOS] menu items show incorrect shortcut keys' from '26.0.90; menu items show incorrect shortcut keys' Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Tue, 19 Dec 2017 15:23:01 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Tue, 19 Dec 2017 15:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Fri, 22 Dec 2017 05:17:01 GMT) Full text and rfc822 format available.

Message #15 received at 29595 <at> debbugs.gnu.org (full text, mbox):

From: Paul Rankin <hello <at> paulwrankin.com>
To: 29595 <at> debbugs.gnu.org
Subject: 26.0.90; menu items show incorrect shortcut keys
Date: Fri, 22 Dec 2017 15:16:32 +1000
I’ve now tested this with Emacs versions 24.4, 25.4, 26.0.90 and HEAD
with the same results; this hasn’t happened for me with 24.x in the
past, so it appears that something has changed with macOS High Sierra
that screws up the display of shortcut keys in the menus.

I realise there may be a dearth of macOS systems in Emacs core
development; I’m sorry to say only know Emacs Lisp, not C, so my ability
to troubleshoot this is limited, but I’m happy to apply any provided
patches and rebuild for testing.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Fri, 22 Dec 2017 07:27:02 GMT) Full text and rfc822 format available.

Message #18 received at 29595 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Rankin <hello <at> paulwrankin.com>, Alan Third <alan <at> idiocy.org>
Cc: 29595 <at> debbugs.gnu.org
Subject: Re: bug#29595: 26.0.90; menu items show incorrect shortcut keys
Date: Fri, 22 Dec 2017 09:26:18 +0200
> From: Paul Rankin <hello <at> paulwrankin.com>
> Date: Fri, 22 Dec 2017 15:16:32 +1000
> 
> I’ve now tested this with Emacs versions 24.4, 25.4, 26.0.90 and HEAD
> with the same results; this hasn’t happened for me with 24.x in the
> past, so it appears that something has changed with macOS High Sierra
> that screws up the display of shortcut keys in the menus.

You are probably right.

> I realise there may be a dearth of macOS systems in Emacs core
> development; I’m sorry to say only know Emacs Lisp, not C, so my ability
> to troubleshoot this is limited, but I’m happy to apply any provided
> patches and rebuild for testing.

I hope Alan (CC'ed) will be able to look into this.  I myself don't
have access to any macOS systems.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Fri, 22 Dec 2017 12:35:01 GMT) Full text and rfc822 format available.

Message #21 received at 29595 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29595 <at> debbugs.gnu.org, Paul Rankin <hello <at> paulwrankin.com>
Subject: Re: bug#29595: 26.0.90; menu items show incorrect shortcut keys
Date: Fri, 22 Dec 2017 12:34:33 +0000
[Message part 1 (text/plain, inline)]
On Fri, Dec 22, 2017 at 09:26:18AM +0200, Eli Zaretskii wrote:
> > From: Paul Rankin <hello <at> paulwrankin.com>
> > Date: Fri, 22 Dec 2017 15:16:32 +1000
> > 
> > I’ve now tested this with Emacs versions 24.4, 25.4, 26.0.90 and HEAD
> > with the same results; this hasn’t happened for me with 24.x in the
> > past, so it appears that something has changed with macOS High Sierra
> > that screws up the display of shortcut keys in the menus.
> 
> You are probably right.

It seems that older macOS versions ignored keyboard shortcuts they
didn’t understand, but High Sierra appears to use a ‘best effort’
attempt which results in it just printing out the first character
(capital C for ctrl, so shift‐C).

I’ve attached a patch that I hope fixes it.

-- 
Alan Third
[0001-Fix-menu-keyboard-shortcuts-on-macOS-Bug-29595.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Fri, 22 Dec 2017 13:10:01 GMT) Full text and rfc822 format available.

Message #24 received at 29595 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Third <alan <at> idiocy.org>
Cc: 29595 <at> debbugs.gnu.org, hello <at> paulwrankin.com
Subject: Re: bug#29595: 26.0.90; menu items show incorrect shortcut keys
Date: Fri, 22 Dec 2017 15:09:26 +0200
> Date: Fri, 22 Dec 2017 12:34:33 +0000
> From: Alan Third <alan <at> idiocy.org>
> Cc: Paul Rankin <hello <at> paulwrankin.com>, 29595 <at> debbugs.gnu.org
> 
> It seems that older macOS versions ignored keyboard shortcuts they
> didn’t understand, but High Sierra appears to use a ‘best effort’
> attempt which results in it just printing out the first character
> (capital C for ctrl, so shift‐C).
> 
> I’ve attached a patch that I hope fixes it.

Thanks.

Will this patch work on both old and new versions of macOS?  I'd like
to install this on the release branch, but I don't want to cause any
regressions as result of that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Fri, 22 Dec 2017 15:51:01 GMT) Full text and rfc822 format available.

Message #27 received at 29595 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29595 <at> debbugs.gnu.org, hello <at> paulwrankin.com
Subject: Re: bug#29595: 26.0.90; menu items show incorrect shortcut keys
Date: Fri, 22 Dec 2017 15:50:33 +0000
On Fri, Dec 22, 2017 at 03:09:26PM +0200, Eli Zaretskii wrote:
> > Date: Fri, 22 Dec 2017 12:34:33 +0000
> > From: Alan Third <alan <at> idiocy.org>
> > Cc: Paul Rankin <hello <at> paulwrankin.com>, 29595 <at> debbugs.gnu.org
> > 
> > It seems that older macOS versions ignored keyboard shortcuts they
> > didn’t understand, but High Sierra appears to use a ‘best effort’
> > attempt which results in it just printing out the first character
> > (capital C for ctrl, so shift‐C).
> > 
> > I’ve attached a patch that I hope fixes it.
> 
> Thanks.
> 
> Will this patch work on both old and new versions of macOS?  I'd like
> to install this on the release branch, but I don't want to cause any
> regressions as result of that.

Yes. I’m still on the previous macOS version where I can’t see the bug
and it makes no difference here.

The current code relies on macOS ignoring a string it doesn’t
understand, however the documentation explicitly says to use an empty
string and the API hasn’t changed.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Sun, 31 Dec 2017 04:04:01 GMT) Full text and rfc822 format available.

Message #30 received at 29595 <at> debbugs.gnu.org (full text, mbox):

From: Paul Rankin <hello <at> paulwrankin.com>
To: Alan Third <alan <at> idiocy.org>
Cc: 29595 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#29595: 26.0.90; menu items show incorrect shortcut keys
Date: Sun, 31 Dec 2017 14:03:23 +1000
Does this fix hinge on me building and testing on High Sierra? Sorry I haven't done this yet.

-- 
https://www.paulwrankin.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Sun, 31 Dec 2017 11:41:01 GMT) Full text and rfc822 format available.

Message #33 received at 29595 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Paul Rankin <hello <at> paulwrankin.com>
Cc: 29595 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#29595: 26.0.90; menu items show incorrect shortcut keys
Date: Sun, 31 Dec 2017 11:40:44 +0000
[Message part 1 (text/plain, inline)]
Yes, if you could test it that would be very helpful.

On 31 Dec 2017 4:03 a.m., "Paul Rankin" <hello <at> paulwrankin.com> wrote:

> Does this fix hinge on me building and testing on High Sierra? Sorry I
> haven't done this yet.
>
> --
> https://www.paulwrankin.com
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29595; Package emacs. (Mon, 01 Jan 2018 10:41:01 GMT) Full text and rfc822 format available.

Message #36 received at 29595 <at> debbugs.gnu.org (full text, mbox):

From: Paul Rankin <hello <at> paulwrankin.com>
To: Alan Third <alan <at> idiocy.org>
Cc: 29595 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#29595: 26.0.90; menu items show incorrect shortcut keys
Date: Mon, 01 Jan 2018 20:40:49 +1000
[Message part 1 (text/plain, inline)]
Confirming that the previous patch fixes the issue on macOS 10.13 High
Sierra. See attached screenshot or https://imgur.com/gBp6ucn

-- 
https://www.paulwrankin.com

On Sun, 31 Dec 2017, at 9:40 PM, Alan Third wrote:
> Yes, if you could test it that would be very helpful.
> 
> On 31 Dec 2017 4:03 a.m., "Paul Rankin" <hello <at> paulwrankin.com> wrote:
> 
> > Does this fix hinge on me building and testing on High Sierra? Sorry I
> > haven't done this yet.
> >
> > --
> > https://www.paulwrankin.com
> >
[Screen Shot 2018-01-01 at 8.36.04 pm.jpg (image/jpeg, attachment)]

Reply sent to Alan Third <alan <at> idiocy.org>:
You have taken responsibility. (Mon, 01 Jan 2018 13:48:01 GMT) Full text and rfc822 format available.

Notification sent to Paul Rankin <hello <at> paulwrankin.com>:
bug acknowledged by developer. (Mon, 01 Jan 2018 13:48:03 GMT) Full text and rfc822 format available.

Message #41 received at 29595-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Paul Rankin <hello <at> paulwrankin.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29595-done <at> debbugs.gnu.org
Subject: Re: bug#29595: 26.0.90; menu items show incorrect shortcut keys
Date: Mon, 1 Jan 2018 13:47:51 +0000
On Mon, Jan 01, 2018 at 08:40:49PM +1000, Paul Rankin wrote:
> Confirming that the previous patch fixes the issue on macOS 10.13 High
> Sierra. See attached screenshot or https://imgur.com/gBp6ucn

Thanks for the confirmation.

I’ve pushed the fix to emacs-26.
-- 
Alan Third




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 30 Jan 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 135 days ago.

Previous Next


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