GNU bug report logs - #45502
[PATCH] Prettier key bindings in NS menu entries

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Mon, 28 Dec 2020 14:24:02 UTC

Severity: normal

Tags: patch

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


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

From: Mattias Engdegård <mattiase <at> acm.org>
To: Alan Third <alan <at> idiocy.org>
Cc: 45502 <at> debbugs.gnu.org, Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#45502: [PATCH] Prettier key bindings in NS menu entries
Date: Tue, 29 Dec 2020 23:53:59 +0100
29 dec. 2020 kl. 22.24 skrev Alan Third <alan <at> idiocy.org>:

> I've pushed a small change. I also set the alloc'd objects to
> autorelease. We need to do that because when they're assigned to the
> NSMenuItem it will retain them, and because we alloc'd them we already
> have them retained once.
> 
> At least I hope that's right. For some reason I've found the
> retain/release cycle really hard to understand, but I think I'm
> getting there now.

Thanks! Is this the standard way of doing it? The objects that you marked autorelease (tab and pstyle) are only used for the extent of that method; I take it you prefer autorelease to sending them 'release' at the end of the method?

Presumably 'atitle' should be sent autorelease (or release) as well?

> I have no opinion on this, really. Although that is some ugly code! ;)

Oh yes, it should at least be table-driven in some way. 

> I think that might be confusing. It doesn't matter with most macOS
> apps because they don't differentiate between shortcuts with upper and
> lower case characters, but we do, and I feel as a seasoned Emacs user
> I'd see C-A and think that was actually C-S-a when it might be C-a.

Agreed. If we were to follow the macOS conventions fully then it would make sense to use ⌘K for M-k (if Command is Meta), but otherwise it's more likely to be confusing.





This bug report was last modified 4 years and 202 days ago.

Previous Next


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