all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre-Yves Luyten <py@luyten.fr>
To: 29141@debbugs.gnu.org
Subject: bug#29141: 25.3; Precise if read-key of prefix key is active
Date: Fri, 3 Nov 2017 23:30:36 +0100	[thread overview]
Message-ID: <89fdbabe-114f-0509-1993-03c15c9a8170@luyten.fr> (raw)

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





             reply	other threads:[~2017-11-03 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 22:30 Pierre-Yves Luyten [this message]
2022-05-17 22:12 ` bug#29141: 25.3; Precise if read-key of prefix key is active Lars Ingebrigtsen
2022-06-15 12:41   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89fdbabe-114f-0509-1993-03c15c9a8170@luyten.fr \
    --to=py@luyten.fr \
    --cc=29141@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.