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 13:53:55 +0000 Message-ID: References: <02937096-EAF5-4B74-A1C7-CCE6E64C67E3@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7257"; 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 14:55:29 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 1kuFTC-0001h9-1J for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 14:55:28 +0100 Original-Received: from localhost ([::1]:49970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuFTB-0002h0-11 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 08:55:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuFSo-0002gk-Lc for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 08:55:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kuFSo-0003or-E3 for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 08:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kuFSo-0004Oo-CZ for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 08:55: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 13:55:02 +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.160925005016841 (code B ref 45502); Tue, 29 Dec 2020 13:55:02 +0000 Original-Received: (at 45502) by debbugs.gnu.org; 29 Dec 2020 13:54:10 +0000 Original-Received: from localhost ([127.0.0.1]:38042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuFRx-0004NZ-Mg for submit@debbugs.gnu.org; Tue, 29 Dec 2020 08:54:09 -0500 Original-Received: from outbound.soverin.net ([116.202.65.218]:54863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuFRu-0004N1-L2 for 45502@debbugs.gnu.org; Tue, 29 Dec 2020 08:54:07 -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 37AA86008F; Tue, 29 Dec 2020 13:54:00 +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=1609250039; bh=pbJRHmWtHSzAmxjRWgzhmGwjeO5TEGHA9RQWvVJG4BU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HRXhWC0Z1JOXOepHjDxZxdwQT/UiUc9l1R27hA8y/vVTJtVnn/0KOA2KuE77IxVsc udmN/pkAabylY/p8ZUpMVYbDpa3f7V3S243L8p88u6jBfF19DP8Mf5KufBAYcruwFG HXXLE/vpvVuv+o5JvbN13GbopNTZ2TYi2H+/mbFUHP1cajp/GTFGUhLNiGekHkpu0s sG8Hi1OvTyl6LFhQOan04+A/3GmfVIa73YYcKHpg+DR9Ag1A2Qp3VAkhIUFO9yhQOA LetLz7JBlIn/pRQGKCN/uBpPjXw7RzwaOPg4vBs3ZeGXjQj1cpfv+gD7w9rtqzRDgo +BxkRaJzK86Rw== Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id BD2CD20294EC08; Tue, 29 Dec 2020 13:53:55 +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: <02937096-EAF5-4B74-A1C7-CCE6E64C67E3@acm.org> 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:196928 Archived-At: On Tue, Dec 29, 2020 at 01:02:21PM +0100, Mattias Engdegård wrote: > 28 dec. 2020 kl. 19.36 skrev Alan Third : > > > I'm not sure either, but I guess the tabstop thing would look > > something like: [...] > > Actually seems to work! (In your place I would feign a complete lack > of surprise.) No feigning required. 😉 > Resulting patch attached. Looks good. As I understand it GNUstep doesn't need this fix, so please make it Cocoa only. > 28 dec. 2020 kl. 23.46 skrev Daniel Martín : > > > Thanks for the patch! It crashed Emacs when I tried to open the Gnus > > menu bar (the Gnus menu bar is an extreme case with lots of bindings). > > Confirmed, but that is unrelated to my patch. Alan, will you have a look? There was a work-around for some problem related to waiting_for_input in the old menu code that was lost when I copied the code from xmenu.c, so I've put it back in and pushed to master. It looks like it fixes the crash here. > > I'm not sure if left-alignment or right-alignment would be better. To > > improve visuals, Apple seems to align with respect to the ⌘ symbol, but > > that doesn't fit Emacs well because there's no single modifier that is > > used in almost every keybinding (some use Control, some Meta). Also, > > it's not uncommon in Emacs to have keybindings that are a couple of > > keymaps deep. > > Right; it's easy to use either left or right alignment for the > bindings. (I think we all agree that they should be kept in a > separate column to the right of the menu strings in either case.) > I'm going to experiment with translating modifiers and keys to the > standard symbols. Not sure how to deal with modifiers that are > unavailable, such as s-k when no Super modifier is available. There's also the problem that we allow setting the left and right modifiers separately, so option or command may not match both keys. -- Alan Third