From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#45502: [PATCH] Prettier key bindings in NS menu entries Date: Tue, 29 Dec 2020 18:34:20 +0100 Message-ID: References: <02937096-EAF5-4B74-A1C7-CCE6E64C67E3@acm.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_5BB2F133-3F2C-4C43-83F7-9BB278486381" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8745"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45502@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 29 18:35:26 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 1kuIu5-0002AR-NM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 18:35:25 +0100 Original-Received: from localhost ([::1]:41556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuIu4-0001WN-Oe for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 12:35:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuIti-0001WB-G1 for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 12:35:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kuIti-0001ys-8X for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 12:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kuIti-0003IK-5U for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 12:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Dec 2020 17:35: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.160926327312615 (code B ref 45502); Tue, 29 Dec 2020 17:35:02 +0000 Original-Received: (at 45502) by debbugs.gnu.org; 29 Dec 2020 17:34:33 +0000 Original-Received: from localhost ([127.0.0.1]:40107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuItF-0003HO-Ep for submit@debbugs.gnu.org; Tue, 29 Dec 2020 12:34:33 -0500 Original-Received: from mail1434c50.megamailservers.eu ([91.136.14.34]:53850 helo=mail263c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuItC-0003H6-FN for 45502@debbugs.gnu.org; Tue, 29 Dec 2020 12:34:31 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1609263263; bh=eu4qf2iZLDucudkR1aQ5yw5GEKV1x+iSZR7xI//uwos=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=lGsN1eO9vsGJK31KPSm0fR18/H2WCgdBXtxK0QNIla0K950WUF2k9OAS3xjvXhLcY lZx9HFTx/nEAJ7z0fk4t44yyKCmjfneLxf6qYSZFU46Gxy1pivqIXtDr//JbLi13fZ mMAfZRN67IJvauDzedcXF102N7rJjw3rTO9s5NHk= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 0BTHYLfE000971; Tue, 29 Dec 2020 17:34:22 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A742F17.5FEB689F.0064, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=foiim2wf c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=hIj89exaAAAA:8 a=tGnDvL-RPit1lrgWpAIA:9 a=CjuIK1q_8ugA:10 a=bU5L3tv5xMtoJJm-FKoA:9 a=De_Ol2h6w80A:10 a=lS9wXHQM5UdnNJ4u63Ry:22 X-Origin-Country: SE 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:196956 Archived-At: --Apple-Mail=_5BB2F133-3F2C-4C43-83F7-9BB278486381 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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. 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. There is also the question whether to follow the platform convention of = always using upper case letters, with an explicit Shift modifier if = necessary. --Apple-Mail=_5BB2F133-3F2C-4C43-83F7-9BB278486381 Content-Disposition: attachment; filename=key-symbols.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="key-symbols.diff" Content-Transfer-Encoding: quoted-printable diff=20--git=20a/src/nsmenu.m=20b/src/nsmenu.m=0Aindex=20= d5321dcdc6..36566e9a11=20100644=0A---=20a/src/nsmenu.m=0A+++=20= b/src/nsmenu.m=0A@@=20-552,9=20+552,76=20@@=20-=20= (void)fillWithWidgetValue:=20(void=20*)wvptr=0A=20=20=20=20=20=20=20=20=20= maxNameWidth=20=3D=20MAX(maxNameWidth,=20nameSize.width);=0A=20=20=20=20=20= =20=20=20=20if=20(wv->key)=0A=20=20=20=20=20=20=20=20=20=20=20{=0A-=20=20= =20=20=20=20=20=20=20=20=20=20NSString=20*key=20=3D=20[NSString=20= stringWithUTF8String:=20skipspc=20(wv->key)];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20NSMutableString=20*key=20=3D=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20[NSMutableString=20stringWithUTF8String:=20skipspc=20= (wv->key)];=0A+=20=20=20=20=20=20=20=20=20=20=20=20[key=20= replaceOccurrencesOfString:=20@""=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= withString:=20@"=E2=8C=AB"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20options:=20= NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20range:=20= NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20=20=20=20= =20[key=20replaceOccurrencesOfString:=20@"DEL"=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= withString:=20@"=E2=8C=AB"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20options:=20= NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20range:=20= NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20=20=20=20= =20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20withString:=20@"=E2=8C=A6"=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20withString:=20@"=E2=86=A9"=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@"RET"=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20withString:=20@"=E2=86=A9"=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20withString:=20@"=E2=86=90"=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20withString:=20@"=E2=86=92"=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20withString:=20@"=E2=86=91"=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20withString:=20@"=E2=86=93"=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20withString:=20@"=E2=87=9E"=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20withString:=20@"=E2=87=9F"=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20withString:=20@"=E2=86=96"=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20withString:=20@"=E2=86=98"=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20withString:=20@"=E2=87=A5"=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@"TAB"=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20withString:=20@"=E2=87=A5"=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A+=20=20=20=20=20=20=20=20= =20=20=20=20[key=20replaceOccurrencesOfString:=20@""=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20withString:=20@"=E2=87=A4"=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20options:=20NSLiteralSearch=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= range:=20NSMakeRange=20(0,=20[key=20length])];=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20NSSize=20keySize=20=3D=20[key=20sizeWithAttributes:=20= font_attribs];=0A=20=20=20=20=20=20=20=20=20=20=20=20=20maxKeyWidth=20=3D=20= MAX(maxKeyWidth,=20keySize.width);=0A+=20=20=20=20=20=20=20=20=20=20=20=20= Lisp_Object=20newkey=20=3D=20build_string=20([key=20UTF8String]);=0A+=20=20= =20=20=20=20=20=20=20=20=20=20wv->key=20=3D=20SSDATA=20(newkey);=0A=20=20= =20=20=20=20=20=20=20=20=20}=0A=20=20=20=20=20=20=20}=0A=20=0A= --Apple-Mail=_5BB2F133-3F2C-4C43-83F7-9BB278486381--