GNU bug report logs - #74903
[PATCH] Add function to show table of keys when describing keymap variable

Previous Next

Package: emacs;

Reported by: Mekeor Melire <mekeor <at> posteo.de>

Date: Sun, 15 Dec 2024 23:15:02 UTC

Severity: normal

Tags: patch

Done: Mekeor Melire <mekeor <at> posteo.de>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 74903 <at> debbugs.gnu.org (full text, mbox):

From: Mekeor Melire <mekeor <at> posteo.de>
To: 74903 <at> debbugs.gnu.org
Subject: Re: bug#74903: [PATCH] Add function to show table of keys when
 describing keymap variable
Date: Tue, 24 Dec 2024 22:55:39 +0000
I had accidentally sent following email only to Stefan Monnier 
rather than the whole list.  I'm thus sending it again.


On Mon, 16 Dec 2024 22:03:22 -0500, Stefan Monnier 
<monnier <at> iro.umontreal.ca> 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?




This bug report was last modified 146 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.