From unknown Tue Jun 17 01:44:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#74829: [PATCH] Show the keybinding next to command in calc's x Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Dec 2024 13:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74829 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 74829@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17340103373385 (code B ref -1); Thu, 12 Dec 2024 13:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Dec 2024 13:32:17 +0000 Received: from localhost ([127.0.0.1]:38196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLjIf-0000sW-69 for submit@debbugs.gnu.org; Thu, 12 Dec 2024 08:32:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:47988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLjIa-0000sJ-TB for submit@debbugs.gnu.org; Thu, 12 Dec 2024 08:32:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLjGQ-0007Pp-R9 for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 08:29:58 -0500 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLjGJ-0006fm-OL for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 08:29:55 -0500 Received: by mail-pj1-x1043.google.com with SMTP id 98e67ed59e1d1-2ee8e8e29f6so463115a91.0 for ; Thu, 12 Dec 2024 05:29:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734010189; x=1734614989; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=Z6C+ZqI+gOBPZ8fypu8S/xxPYyflQ7j3R5cLeJYF2jk=; b=lyjv/glJb55PaiNwuDvv28PStL131jSCXYBvN5NnroCfqEcfMXnFBFVHFl7rJtRZ/Y X+XIvEftUQftoik+dhC5pBB28HShQzXQU45Cj+VsMTYzcurjH08P2OvpqLHycm25JhaA wipSpZ6JxyRcGfn3ek53lJ+8zFxJYJ/wRtJQFbxcAPw5TdiJHGhBh6QVn6+r01YR67Vv x9WWiZuSuLoubHvIfTEnB0UaeHfdN9ioEluy9zJQpl/FWXV7/Los1BZdMlxS5pJSWdnr 9xbWMJZyAcYIiK0Z4iQHEp2V0jADL2A0PITI5IjKpGRjPtInahzCkJeRkkb30D0InnA0 95sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734010189; x=1734614989; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z6C+ZqI+gOBPZ8fypu8S/xxPYyflQ7j3R5cLeJYF2jk=; b=CyblU7+HlSYh7UnuPmPyOulMIcH/LOYUuNXN/VsXSUxLI0tq01Dleqe3/m+x0gDt/P QkHhsNZGxLAvB9h3BvDZJG/1096il1SIsZK8wPTZ0A+zxcgRrz7LbtAeARguc1AGmMft gdzkUEuLCnn4rNdGxh19jy+uJUOhj4VkbEl3Zp7CEwxokHnT2pvc7NvXXDJw4RGHKlVA Enpi1/R3hYRYim6xTZBhLdiRB0FxCHPsfgqOdStSOWh00gNdRW0f1FAo2jDBw6obs2Am ZMqMP3KuTAvWStRRQ+rck0zsF7i3T+wfVqNgywv1JC96+utMdjRbolp1YBjA3YjLM4qV /OhA== X-Gm-Message-State: AOJu0Yzlj5bGM5/HGbuuR1jZC2orQCdVNBAtDBxLnGmF4JcC5VXu9mdp QJTrg4Xixhbv8Ff/AJ1ctcg/9l3QhZx1hDQ+bF4zplDOadCaJc55eOPL4DR+ X-Gm-Gg: ASbGncutxC2iSs2m8a95dC3LpAJt865ThqwdohO6y7kEIngrr5/7YqwZWN3VvcVeswt t20BAa23WTEuOyzRVcWdSZjkNp5DxwTqgaaZU8VomZw1S9ozmVdcujx3F73f4rOmlro5LFejspF fylldTfivUkkOSSLfuZgCKK2fXLAuydlLo5zMK41bxpS6Rh5qDCbHh9gORV1TBRggUJpLywzmcv EVFG0GSm/nRit8JFxBku7d61CXuQ6rZsvKJxsXAOx6lwBLMuOA3TA== X-Google-Smtp-Source: AGHT+IEFdV8QnmjYsbfdq1GqOTgvk9pMHIAx4LJoEY2idh5PQiN5c7BihuRrLdwDWIuNKYUM4AQ63A== X-Received: by 2002:a17:90b:224c:b0:2ee:a6f0:f54 with SMTP id 98e67ed59e1d1-2f127fb5d43mr9937105a91.13.1734010189297; Thu, 12 Dec 2024 05:29:49 -0800 (PST) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f142d91a01sm1237712a91.8.2024.12.12.05.29.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 05:29:48 -0800 (PST) From: Visuwesh Date: Thu, 12 Dec 2024 18:59:44 +0530 Message-ID: <8734itjagn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::1043; envelope-from=visuweshm@gmail.com; helo=mail-pj1-x1043.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Attached patch uses M-x's :affixation-function to show the keybinding next to the command's name in calc's x command. In GNU Emacs 31.0.50 (build 27, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.2, Xaw scroll bars) of 2024-12-07 built on astatine Repository revision: 9ddec89e422d0dd6e9069731b8f2dd2c90aa5607 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101014 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-sound=alsa --with-x-toolkit=lucid --without-xaw3d --without-gconf --without-libsystemd --with-cairo CFLAGS=-g3' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Show-the-keybinding-next-to-command-in-calc-s-x.patch >From 42d5d91d9fa31ad0f42ece300a869a0e22343e46 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Thu, 12 Dec 2024 18:58:37 +0530 Subject: [PATCH] Show the keybinding next to command in calc's x * lisp/calc/calc-ext.el (calc-execute-extended-command): Use M-x's :affixation-function to show the keybinding of the calc command next to its name. --- lisp/calc/calc-ext.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 25d2492b277..0cbd02be657 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1728,8 +1728,11 @@ calc-execute-extended-command (interactive "P") (let* ((prompt (concat (calc-num-prefix-name n) "M-x ")) (cmd (intern - (completing-read prompt obarray 'commandp t "calc-" - 'calc-extended-command-history)))) + (let ((completion-extra-properties + (list :affixation-function + #'read-extended-command--affixation))) + (completing-read prompt obarray 'commandp t "calc-" + 'calc-extended-command-history))))) (setq prefix-arg n) (command-execute cmd))) -- 2.45.2 --=-=-=-- From unknown Tue Jun 17 01:44:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#74829: [PATCH] Show the keybinding next to command in calc's x Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2024 09:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74829 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Visuwesh Cc: 74829@debbugs.gnu.org Received: via spool by 74829-submit@debbugs.gnu.org id=B74829.173477393229638 (code B ref 74829); Sat, 21 Dec 2024 09:39:02 +0000 Received: (at 74829) by debbugs.gnu.org; 21 Dec 2024 09:38:52 +0000 Received: from localhost ([127.0.0.1]:45294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOvwh-0007hy-OR for submit@debbugs.gnu.org; Sat, 21 Dec 2024 04:38:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOvwf-0007hY-Rp for 74829@debbugs.gnu.org; Sat, 21 Dec 2024 04:38:50 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOvwa-0007Mh-J6; Sat, 21 Dec 2024 04:38:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=XHkh8vRZ1GqffMaywLelUGs1IodVkm5tTRBgtd/Fiwo=; b=fArxQT25/wMo s3t2ncZPaq/rUq4+KJSUBPK6TVhF6Jos27ATlOmd8JrGc2ZN/cb37/0rB7bLIqHeo23P9DUwPCFl/ Zh8jtz3Xl1rqZPyJCvhsLfh1UADf4G2jJW2L/zAC5y+BG3RCadS0KtizpqtaCM7Iwpep9uYkwu/iX LRCzxztfHSYOm9U4uLH+0LpDRlF13fVsCqoREkQZjuBRBYssYKlLZ3jSEltqkyZDMCBcoHf7NNVOX vR5rgX6IlH8jtkUkusWUivgZ0roGfMBsaEYdIVUZMOR/X2pS22vJ6PTGQH8km4p0Q9RmYBuv1BZ+5 VLLKI5rskwWGkwxtU/+wMg==; Date: Sat, 21 Dec 2024 11:38:41 +0200 Message-Id: <86bjx58jfi.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <8734itjagn.fsf@gmail.com> (message from Visuwesh on Thu, 12 Dec 2024 18:59:44 +0530) References: <8734itjagn.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Date: Thu, 12 Dec 2024 18:59:44 +0530 > > Attached patch uses M-x's :affixation-function to show the keybinding > next to the command's name in calc's x command. Thanks. Can you describe the effect of this change in Calc usage? That is, what will users see after the change that they didn't see before it? From unknown Tue Jun 17 01:44:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#74829: [PATCH] Show the keybinding next to command in calc's x Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2024 09:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74829 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 74829@debbugs.gnu.org Received: via spool by 74829-submit@debbugs.gnu.org id=B74829.173477477332374 (code B ref 74829); Sat, 21 Dec 2024 09:53:01 +0000 Received: (at 74829) by debbugs.gnu.org; 21 Dec 2024 09:52:53 +0000 Received: from localhost ([127.0.0.1]:45338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOwAH-0008Q5-Bt for submit@debbugs.gnu.org; Sat, 21 Dec 2024 04:52:53 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:57723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOwAF-0008Px-Kt for 74829@debbugs.gnu.org; Sat, 21 Dec 2024 04:52:52 -0500 Received: by mail-pl1-f195.google.com with SMTP id d9443c01a7336-21628b3fe7dso24133565ad.3 for <74829@debbugs.gnu.org>; Sat, 21 Dec 2024 01:52:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734774711; x=1735379511; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UOlIdCsxkhW4VWZQenRKfUmPI+NZ4moGUULd51TEtEE=; b=BooVStiDj4GGYmVeqo3Ky9JxtQw0Nt0IsJ/NyzQuW/aAf7kDxPoH8zA+NUr7LdFXGt U5Y12W98R3yk7dh7ziT+x8ojKTr0qbFAiphiy31QVKpgZ0iaIM6Ny7WqsLnCMudCOaYP VJiNEWxHtQVT/8r5tpagFxPBtHzysL0I36h71j6Y6VU84wEZtyfm/oaSX0Rz5VUVT8o1 aLEBNLw6yAIldEM71b/fxpzjCUoi+EG1mxAhmeblbtegcUw3CWB7kTZayJycEDgJVyGn IlzA4+t6knjKp0YjqQbtNF+PpihmIN6XbYv823/zvbeQBL3Vdrs6JAN0i/MhBu0LV1cN rMUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734774711; x=1735379511; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UOlIdCsxkhW4VWZQenRKfUmPI+NZ4moGUULd51TEtEE=; b=sp1ZF+DXh43p7FUW8GutqiyMoMD4AhG49n9wpiJtjUacssg6I6M/h5Jl0MthqrPK3j PnOyHZUfzh/ToNeQ9dj+J4cnUy3jBoGCrgOm2Djq+qxK45yFtPZySGQFkDXVQhnb/P7s 0V/FE7yvFC0tPu47WVE7jSLHoALipKVw9f6WJ7O3aQ8jcD2GfFOOUooU2A/8KORb7qv4 sLYcRnX5qnuVNlfitrKCBz843+5OeuGckMwhJXpCMWyTFVJAeDtBNc61YwHYkR2f73Lx EyOMCC37fQ4C5bjzpZh8utok14bTqrfSK9lirDD4x32OuLXpPG2iilqyumF89AMD4s/a YAbQ== X-Gm-Message-State: AOJu0YwLzTPeJy2wJ11YXyjjwnMU8DFRWPbRI8ZLvDXKY1Br7h1HXt1u PlO/MUH1lqNlJj6yifB+d3hdB658TJyR9+2++wWVwtppYJ2UYnGT X-Gm-Gg: ASbGncsBiRvz27OJkKecE4/Dg6uGv153VnrdgxiOCJi5aN7s5sFk/Bgc7mLa2z4vzbv wicyWUV3OMT9ZVKuzlnwACHMgbEPmm+Hk1K/NaW5nOZxCBuI1bOYBVAbyvp+UxlGe8+ipaulZ+D G3OGR0FqGwbRIeCFnCvP1Mec9vpUICTP4j64Nnec4yeHaJgklNunHLs+Ayw0vJ3ZJbgx/AW3tud /hSon7IqRU0o8uP9POMF1rDhPGEJoEKVadRZK0ak4aK49JNrnf7 X-Google-Smtp-Source: AGHT+IEgMsc2PojYpHFnxX2rm0fvwr4ZOD+nye/TLRKwV1Bt1SI1IyT5elQpoVsnssaHiwq/Fule5g== X-Received: by 2002:a17:90b:54cb:b0:2ee:d7d3:3019 with SMTP id 98e67ed59e1d1-2f452e22555mr11070137a91.12.1734774710735; Sat, 21 Dec 2024 01:51:50 -0800 (PST) Received: from localhost ([49.205.83.252]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f4633df7c0sm650738a91.18.2024.12.21.01.51.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 01:51:50 -0800 (PST) From: Visuwesh In-Reply-To: <86bjx58jfi.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Dec 2024 11:38:41 +0200") References: <8734itjagn.fsf@gmail.com> <86bjx58jfi.fsf@gnu.org> Date: Sat, 21 Dec 2024 15:21:47 +0530 Message-ID: <878qs9cqj0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=9F=E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D= =E0=AE=AA=E0=AE=B0=E0=AF=8D 21, 2024] Eli Zaretskii wrote: >> From: Visuwesh >> Date: Thu, 12 Dec 2024 18:59:44 +0530 >>=20 >> Attached patch uses M-x's :affixation-function to show the keybinding >> next to the command's name in calc's x command. > > Thanks. Can you describe the effect of this change in Calc usage? > That is, what will users see after the change that they didn't see > before it? Without the patch, x TAB in the Calc buffer shows in the *Completions* buffer: calc-abs calc-abssqr etc. But with this patch, it instead shows calc-abs (A) calc-abssqr (fA) as calc-abs is bound to the key 'A' (C-h w calc-abs RET confirms this). This is similar to how M-x displays the keybinding next to the command name in the *Completions* buffer. From unknown Tue Jun 17 01:44:27 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Visuwesh Subject: bug#74829: closed (Re: bug#74829: [PATCH] Show the keybinding next to command in calc's x) Message-ID: References: <86bjwyzwb9.fsf@gnu.org> <8734itjagn.fsf@gmail.com> X-Gnu-PR-Message: they-closed 74829 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 74829@debbugs.gnu.org Date: Thu, 26 Dec 2024 08:25:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1735201502-1473-1" This is a multi-part message in MIME format... ------------=_1735201502-1473-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #74829: [PATCH] Show the keybinding next to command in calc's x which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 74829@debbugs.gnu.org. --=20 74829: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D74829 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1735201502-1473-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 74829-done) by debbugs.gnu.org; 26 Dec 2024 08:24:35 +0000 Received: from localhost ([127.0.0.1]:39998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQjAZ-0000N1-FS for submit@debbugs.gnu.org; Thu, 26 Dec 2024 03:24:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQjAY-0000Mm-9D for 74829-done@debbugs.gnu.org; Thu, 26 Dec 2024 03:24:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQjAT-0000eE-2g; Thu, 26 Dec 2024 03:24:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ZxM38Gjt1BKB/fUUSH/W/3c26Z2OqIzNtUyJ9KR4oho=; b=nu0YWet1VDkqe8xv3Pzs E6/zhw9i5/Hfl1NxadPNlN/KrNSwJhm14FrynvplxE21QEefkr0dUehC8BebSWl024ZOkMO8EPNKg HbeWBrGUQE+h7MEV4yGzHeff5HX9SW6nHhD4TQ+Zpgt4wcKB9bcxUTPzBPO8aDmY2gkuwsO8w9Cxh PGs1k/+8FF3wDRixTDSN3jzEgKIyMJdUnjI4fAL0h8Yx49KTsPquakPTfMxGNXHXjzlRh4KVfU9h7 gd0iUtNRbBKIK4VQoK/Tic4WaXtllcTvGazgneLhkjHShMWO/mn7Mq4tSzgb8oXHnkjRvqBkmZOAr E79nXMiZEac96Q==; Date: Thu, 26 Dec 2024 10:24:10 +0200 Message-Id: <86bjwyzwb9.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <878qs9cqj0.fsf@gmail.com> (message from Visuwesh on Sat, 21 Dec 2024 15:21:47 +0530) Subject: Re: bug#74829: [PATCH] Show the keybinding next to command in calc's x References: <8734itjagn.fsf@gmail.com> <86bjx58jfi.fsf@gnu.org> <878qs9cqj0.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74829-done Cc: 74829-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: 74829@debbugs.gnu.org > Date: Sat, 21 Dec 2024 15:21:47 +0530 > > [சனி டிசம்பர் 21, 2024] Eli Zaretskii wrote: > > >> From: Visuwesh > >> Date: Thu, 12 Dec 2024 18:59:44 +0530 > >> > >> Attached patch uses M-x's :affixation-function to show the keybinding > >> next to the command's name in calc's x command. > > > > Thanks. Can you describe the effect of this change in Calc usage? > > That is, what will users see after the change that they didn't see > > before it? > > Without the patch, x TAB in the Calc buffer shows in the *Completions* > buffer: > > calc-abs > calc-abssqr > > etc. But with this patch, it instead shows > > calc-abs (A) > calc-abssqr (fA) > > as calc-abs is bound to the key 'A' (C-h w calc-abs RET confirms this). > This is similar to how M-x displays the keybinding next to the command > name in the *Completions* buffer. Thanks, installed on the master branch, and closing the bug. ------------=_1735201502-1473-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Dec 2024 13:32:17 +0000 Received: from localhost ([127.0.0.1]:38196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLjIf-0000sW-69 for submit@debbugs.gnu.org; Thu, 12 Dec 2024 08:32:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:47988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLjIa-0000sJ-TB for submit@debbugs.gnu.org; Thu, 12 Dec 2024 08:32:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLjGQ-0007Pp-R9 for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 08:29:58 -0500 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLjGJ-0006fm-OL for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 08:29:55 -0500 Received: by mail-pj1-x1043.google.com with SMTP id 98e67ed59e1d1-2ee8e8e29f6so463115a91.0 for ; Thu, 12 Dec 2024 05:29:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734010189; x=1734614989; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=Z6C+ZqI+gOBPZ8fypu8S/xxPYyflQ7j3R5cLeJYF2jk=; b=lyjv/glJb55PaiNwuDvv28PStL131jSCXYBvN5NnroCfqEcfMXnFBFVHFl7rJtRZ/Y X+XIvEftUQftoik+dhC5pBB28HShQzXQU45Cj+VsMTYzcurjH08P2OvpqLHycm25JhaA wipSpZ6JxyRcGfn3ek53lJ+8zFxJYJ/wRtJQFbxcAPw5TdiJHGhBh6QVn6+r01YR67Vv x9WWiZuSuLoubHvIfTEnB0UaeHfdN9ioEluy9zJQpl/FWXV7/Los1BZdMlxS5pJSWdnr 9xbWMJZyAcYIiK0Z4iQHEp2V0jADL2A0PITI5IjKpGRjPtInahzCkJeRkkb30D0InnA0 95sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734010189; x=1734614989; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z6C+ZqI+gOBPZ8fypu8S/xxPYyflQ7j3R5cLeJYF2jk=; b=CyblU7+HlSYh7UnuPmPyOulMIcH/LOYUuNXN/VsXSUxLI0tq01Dleqe3/m+x0gDt/P QkHhsNZGxLAvB9h3BvDZJG/1096il1SIsZK8wPTZ0A+zxcgRrz7LbtAeARguc1AGmMft gdzkUEuLCnn4rNdGxh19jy+uJUOhj4VkbEl3Zp7CEwxokHnT2pvc7NvXXDJw4RGHKlVA Enpi1/R3hYRYim6xTZBhLdiRB0FxCHPsfgqOdStSOWh00gNdRW0f1FAo2jDBw6obs2Am ZMqMP3KuTAvWStRRQ+rck0zsF7i3T+wfVqNgywv1JC96+utMdjRbolp1YBjA3YjLM4qV /OhA== X-Gm-Message-State: AOJu0Yzlj5bGM5/HGbuuR1jZC2orQCdVNBAtDBxLnGmF4JcC5VXu9mdp QJTrg4Xixhbv8Ff/AJ1ctcg/9l3QhZx1hDQ+bF4zplDOadCaJc55eOPL4DR+ X-Gm-Gg: ASbGncutxC2iSs2m8a95dC3LpAJt865ThqwdohO6y7kEIngrr5/7YqwZWN3VvcVeswt t20BAa23WTEuOyzRVcWdSZjkNp5DxwTqgaaZU8VomZw1S9ozmVdcujx3F73f4rOmlro5LFejspF fylldTfivUkkOSSLfuZgCKK2fXLAuydlLo5zMK41bxpS6Rh5qDCbHh9gORV1TBRggUJpLywzmcv EVFG0GSm/nRit8JFxBku7d61CXuQ6rZsvKJxsXAOx6lwBLMuOA3TA== X-Google-Smtp-Source: AGHT+IEFdV8QnmjYsbfdq1GqOTgvk9pMHIAx4LJoEY2idh5PQiN5c7BihuRrLdwDWIuNKYUM4AQ63A== X-Received: by 2002:a17:90b:224c:b0:2ee:a6f0:f54 with SMTP id 98e67ed59e1d1-2f127fb5d43mr9937105a91.13.1734010189297; Thu, 12 Dec 2024 05:29:49 -0800 (PST) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f142d91a01sm1237712a91.8.2024.12.12.05.29.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 05:29:48 -0800 (PST) From: Visuwesh To: bug-gnu-emacs@gnu.org Subject: [PATCH] Show the keybinding next to command in calc's x X-Debbugs-Cc: Date: Thu, 12 Dec 2024 18:59:44 +0530 Message-ID: <8734itjagn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::1043; envelope-from=visuweshm@gmail.com; helo=mail-pj1-x1043.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Attached patch uses M-x's :affixation-function to show the keybinding next to the command's name in calc's x command. In GNU Emacs 31.0.50 (build 27, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.2, Xaw scroll bars) of 2024-12-07 built on astatine Repository revision: 9ddec89e422d0dd6e9069731b8f2dd2c90aa5607 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101014 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-sound=alsa --with-x-toolkit=lucid --without-xaw3d --without-gconf --without-libsystemd --with-cairo CFLAGS=-g3' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Show-the-keybinding-next-to-command-in-calc-s-x.patch >From 42d5d91d9fa31ad0f42ece300a869a0e22343e46 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Thu, 12 Dec 2024 18:58:37 +0530 Subject: [PATCH] Show the keybinding next to command in calc's x * lisp/calc/calc-ext.el (calc-execute-extended-command): Use M-x's :affixation-function to show the keybinding of the calc command next to its name. --- lisp/calc/calc-ext.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 25d2492b277..0cbd02be657 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1728,8 +1728,11 @@ calc-execute-extended-command (interactive "P") (let* ((prompt (concat (calc-num-prefix-name n) "M-x ")) (cmd (intern - (completing-read prompt obarray 'commandp t "calc-" - 'calc-extended-command-history)))) + (let ((completion-extra-properties + (list :affixation-function + #'read-extended-command--affixation))) + (completing-read prompt obarray 'commandp t "calc-" + 'calc-extended-command-history))))) (setq prefix-arg n) (command-execute cmd))) -- 2.45.2 --=-=-=-- ------------=_1735201502-1473-1--