From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mekeor Melire Newsgroups: gmane.emacs.bugs Subject: bug#74903: [PATCH] Add function to show table of keys when describing keymap variable Date: Tue, 24 Dec 2024 23:14:31 +0000 Message-ID: <87r05wznag.fsf@host.mail-host-address-is-not-set> References: <87v7vktu7s.fsf@posteo.de> <86zfkvpqn9.fsf@gnu.org> <87bjxb5yg5.fsf@gmail.com> <37DCBABA-3D38-4FDD-8769-93E3D7F71DCE@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31204"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Robert Pluim , Eli Zaretskii , Stefan Kangas , Andrea Corallo , Stefan Monnier To: 74903@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 25 00:15:17 2024 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 1tQE7R-0007x8-Bx for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Dec 2024 00:15:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQE7G-000528-83; Tue, 24 Dec 2024 18:15:06 -0500 Original-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 1tQE7D-00051o-SM for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2024 18:15:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQE7D-0005GH-Ik; Tue, 24 Dec 2024 18:15:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=rhPP/CRS4EIcp1jOXCJOGWRuKk7QCrNgv5Fcveh20VM=; b=NwSupEKnuuUxtYZdEAg+NORn5n2XkiBx8cqTFBUGkQ3vZwOKP/eXb/zbgINMyBoDKyZCeMJyoS818uFwDuq25pGDWjZ/HMXxtH05k2Q8+IfTIABR1rh3503JDbY8FZXgr6+8vclbke0/xPzXSlhdfNmhFogp+zDwxCL6ATKkOa3CKmRJdw61Y8jgrYUaDjkyhWf4jL7Mf9+GE/gpi1/5sedPvINXJEP8L8G4jqP92T0Q3mj2OJrMgbSRl1WWeYxbuUBH1GPCvI6MkDhsp4GncCjOgqvIkNTlixDGI8PNriv+OHUX63xve1XxKW0+59V1YS0FXifmYKwbRactOqF+pg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQE7C-00053f-KO; Tue, 24 Dec 2024 18:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mekeor Melire Original-Sender: "Debbugs-submit" Resent-CC: rpluim@gmail.com, eliz@gnu.org, stefankangas@gmail.com, acorallo@gnu.org, monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Dec 2024 23:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74903 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-Xcc: Robert Pluim , Eli Zaretskii , Stefan Kangas , Andrea Corallo , Stefan Monnier Original-Received: via spool by 74903-submit@debbugs.gnu.org id=B74903.173508208419382 (code B ref 74903); Tue, 24 Dec 2024 23:15:02 +0000 Original-Received: (at 74903) by debbugs.gnu.org; 24 Dec 2024 23:14:44 +0000 Original-Received: from localhost ([127.0.0.1]:35329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQE6u-00052Y-53 for submit@debbugs.gnu.org; Tue, 24 Dec 2024 18:14:44 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:36381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQE6q-00052I-Vq for 74903@debbugs.gnu.org; Tue, 24 Dec 2024 18:14:43 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4D910240101 for <74903@debbugs.gnu.org>; Wed, 25 Dec 2024 00:14:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1735082074; bh=B2QrOnYA+Fj6pmKye5nDlBGqPUq1fKlEnXJWoIHxO8Y=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=gL0tVrVKYoGAFOjJXUrNvI3e5VDfqw8EodvkAzamTkhn55Byouk80Rq3TZDry5alw KDctgX2z/nVrZiihj8ofVp5QoeM4wzCksRQ9To7fwvh3cbtQepcqx16d48z+GQDu9Z +Lluhl65UawtfYycqn6u6ZB/vz2cYhT7EQgZlXPGyuf6+5HtEVb6aquNk9AgDXRa+D DNJXeF2fkDYMJHHoX9mVC1kx3Zj34gxU/KMZqPOZU4vggF241T61SetCHICwMrBsJb G1HorKep1kqLNXWn2/crPvlxYJAiGKV1lPTt7ig1/AUnK5KTH6pIlX2z9PGxgyz2jC FPKunZsvGNs8A== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YHrLw3yXFz9rxF for <74903@debbugs.gnu.org>; Wed, 25 Dec 2024 00:14:31 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Mon, 16 Dec 2024 22:03:22 -0500") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297705 Archived-At: Resending an email that I mistakenly had only sent to Stefan Monnier: On Mon, 16 Dec 2024 22:03:22 -0500, Stefan Monnier said: > The table is a bit redundant with the s-exp representation and > I'm not sure we want to spend all this time&space printing out a > large keymap, but maybe we could use the > `help-fns-describe-variable-functions` mechanism to add a > one-liner that can be clicked to get to the keymap-specific > description, a bit like Custom vars have a "You can customize > this variable" link. WDYT? I agree that there's redundancy. But since adding the function `help-fns-keymap-key-bindings' from my patch to `help-fns-describe-variable-functions` would be opt-in, it'd be up to the user to decide between redundancy and convenience. Nevertheless, I like your idea of a clickable button, e.g. worded "View this keymap as a table" in the *Help* buffer. Let me continue your comparison to the "You can customize this variable" button by noting that its command, `help-customize', is also bound to "c" in Help-Mode. I'd also like a key binding for "View this keymap as a table", e.g. "k". So, these key sequences would result in the same state: C-h v foo-map RET k M-x describe-keymap foo-map RET But we can build up this idea further: What if these would also result in the same state? (`ido-mode' is both a variable and a function.) C-h f ido-mode RET o C-h v ido-mode RET o C-h o ido-mode RET And also: C-h v ido-mode RET f C-h f ido-mode RET What do you think about enabling users to easily "effectively switch" between describe-* commands in this way?