From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#45502: [PATCH] Prettier key bindings in NS menu entries Date: Tue, 29 Dec 2020 21:24:37 +0000 Message-ID: References: <02937096-EAF5-4B74-A1C7-CCE6E64C67E3@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26900"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45502@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 29 22:25:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kuMUQ-0006so-S6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 22:25:10 +0100 Original-Received: from localhost ([::1]:44002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuMUP-0007fM-U7 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 16:25:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuMUI-0007fD-CS for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 16:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kuMUI-00056m-4x for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 16:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kuMUI-0005UF-0M for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 16:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Dec 2020 21:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45502 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45502-submit@debbugs.gnu.org id=B45502.160927709221072 (code B ref 45502); Tue, 29 Dec 2020 21:25:01 +0000 Original-Received: (at 45502) by debbugs.gnu.org; 29 Dec 2020 21:24:52 +0000 Original-Received: from localhost ([127.0.0.1]:40379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuMU7-0005To-PX for submit@debbugs.gnu.org; Tue, 29 Dec 2020 16:24:52 -0500 Original-Received: from outbound.soverin.net ([116.202.65.218]:36719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuMU3-0005TX-7Z for 45502@debbugs.gnu.org; Tue, 29 Dec 2020 16:24:50 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id EE70E6008F; Tue, 29 Dec 2020 21:24:40 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1609277080; bh=poUSjkLaGNqPiP7ov6dCUgPtiKdoWIXaSvUF/LKROrQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HGDzDm+Pb/Zw0ZVLUWdJfRG/k+YH5PZSXe/IgbZKusazVpTpufT4nNWmZRDbjzH7E TkHgOJyCq1pVS+VsPDH0fJDPfimK6UfljzwwkLZDJI5iO0TM1gBZPKGJSjcLl2cFjZ UFHqhaGgGYOJpqLbtqaXWjFW8cpqaAz9oJI16ZYWsov1qcYvNs8iB5meIwhz4jXEV/ rZk3ifYJU1RniAzqvV16yxAF4rn2Tg6iAgJvzruRucQIonogZbLIlIhrkrqlObeqGy emuHsVLF9hEKlaUA7fN8KzPAcTHiaOpzoy5Jy9OpKVbbUeaGRwq87vXo+3VbxnFhb1 TsWAxuYYx5VVg== Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 2D28D2029516CD; Tue, 29 Dec 2020 21:24:37 +0000 (GMT) Mail-Followup-To: Alan Third , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 45502@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= Content-Disposition: inline In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196978 Archived-At: On Tue, Dec 29, 2020 at 06:34:20PM +0100, Mattias Engdegård wrote: > 29 dec. 2020 kl. 16.50 skrev Alan Third : > > > As far as I'm aware GNUstep is able to display the bindings correctly > > no matter how many characters they have, so we don't need the > > work-around. And I'm hoping that we'll be able to get GNUstep menus > > working again in the future. > > All right, I've done what I think you meant and pushed to master; > please tell me if I'm on the wrong track. 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. > Here is a proof-of-concept patch for using fancy symbols instead of > etc. > > Not production quality because (1) it's obviously ugly code, (2) I'm > unsure about the PgUp/PgDn/Home/End symbols and (3) it only works > with modifiers if the patch in bug#45536 is applied (which of course > I think it should), but at least it gives a feeling for whether it's > a good thing to do or not. I have no opinion on this, really. Although that is some ugly code! ;) I have no ideas for how to improve it, though. > There is also the question whether to follow the platform convention > of always using upper case letters, with an explicit Shift modifier > if necessary. 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. -- Alan Third