GNU bug report logs - #29141
25.3; Precise if read-key of prefix key is active

Previous Next

Package: emacs;

Reported by: Pierre-Yves Luyten <py <at> luyten.fr>

Date: Fri, 3 Nov 2017 22:31:02 UTC

Severity: wishlist

Tags: moreinfo

Found in version 25.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29141 in the body.
You can then email your comments to 29141 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29141; Package emacs. (Fri, 03 Nov 2017 22:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre-Yves Luyten <py <at> luyten.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 03 Nov 2017 22:31:02 GMT) Full text and rfc822 format available.

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

From: Pierre-Yves Luyten <py <at> luyten.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3; Precise if read-key of prefix key is active
Date: Fri, 3 Nov 2017 23:30:36 +0100
Hello

Context
i am working on convenience packages to help the user with available 
shortcuts. One thing i am using is "which-key". This package allows
to display visualy the existing shortcuts for a given prefix key.
Actually it might work for any keymap, so it is an efficient way
for the user to discover a keymap.

Expected behavior
Since the user needs to learn the core of Emacs, it is necessary to be 
able to present to the user, not only available shortuts, but also the 
name of the current keymap

Behavior
As far as i know, there is no way to say if a prefix key is active.
One could parse which shortcuts are active, then deduce which prefix key
is active, but this would not be very reliable.

Enhancement Request
So, is it possible to add a func to tell if there is a prefix key?
obviously i think the func might be more general, for example checking 
if there is a read-key active, else a terminal keymap, else a minor mode 
overriding map, and so on from highest to lowest priority, and checking 
if a prefix key is active -> leading to another keymap being active.
I confess i have no clue about "virtual" keymaps like "C-c".
This is a prefix key but i think different shortcuts in different keymaps.

The opened bug against which-key is : 
https://github.com/justbur/emacs-which-key/issues/176

Please tell me if this enhancement seems fair to you, in which case
do you have a clue so i can evenutally contribute.

Regards
Pierre-Yves




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29141; Package emacs. (Tue, 17 May 2022 22:13:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Pierre-Yves Luyten <py <at> luyten.fr>
Cc: 29141 <at> debbugs.gnu.org
Subject: Re: bug#29141: 25.3; Precise if read-key of prefix key is active
Date: Wed, 18 May 2022 00:12:27 +0200
Pierre-Yves Luyten <py <at> luyten.fr> writes:

> Expected behavior
> Since the user needs to learn the core of Emacs, it is necessary to be
> able to present to the user, not only available shortuts, but also the
> name of the current keymap
>
> Behavior
> As far as i know, there is no way to say if a prefix key is active.
> One could parse which shortcuts are active, then deduce which prefix key
> is active, but this would not be very reliable.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I'm not sure I understand what is being requested here.  For instance:

(key-binding "\C-c")
=> (keymap (keymap (67108896 . erc-track-switch-buffer) (0 . erc-track-switch-buffer)) mode-specific-command-prefix)

If a key sequence is a prefix key, key-binding will return a keymap, so
you can check that.

As for "the name of the current keymap" -- I'm not sure I understand
that, either.  current-local-map will return that, but perhaps something
else is means?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 17 May 2022 22:13:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29141; Package emacs. (Wed, 15 Jun 2022 12:42:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Pierre-Yves Luyten <py <at> luyten.fr>
Cc: 29141 <at> debbugs.gnu.org
Subject: Re: bug#29141: 25.3; Precise if read-key of prefix key is active
Date: Wed, 15 Jun 2022 14:41:48 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> As for "the name of the current keymap" -- I'm not sure I understand
> that, either.  current-local-map will return that, but perhaps something
> else is means?

More information was requested, but no response was given within a
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 29141 <at> debbugs.gnu.org and Pierre-Yves Luyten <py <at> luyten.fr> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 15 Jun 2022 12:42:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Jul 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 287 days ago.

Previous Next


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