emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Re: Include which-key.el in the Emacs distribution


From: Drew Adams
Subject: RE: [External] : Re: Include which-key.el in the Emacs distribution
Date: Mon, 14 Feb 2022 16:23:47 +0000

> What I would be more interested in is to add optional
> support for C-h to continue a command prefix, so that
> if I want to know what keys a keymap provides, I can
> request it immediately without waiting for the idle
> timer to trigger a often too small popup window,
> without loosing the partial input.

I know that you know that `C-h' after a prefix
key shows you the possible continuations.  I
think your request is to not "lose" what you've
typed so far.

Library `keysee.el' can help with this.  It can
either show you possible continuations after a
delay, automatically, or show you them only on
demand, when you hit key `S-TAB' (by default).

You can also use `S-TAB' at top level, to see
all possible keys available in the current
context.

You can also complete menu-bar menus.

Completion candidates are pairs: key name,
followed by a (configurable) separator,
followed by the associated command name.

Completion is normal, so you can use keys to
edit minibuffer content.  This is a difference
from `which-key', where the keys you type just
continue the prefix key directly.  With Key See,
keys you type act normally in the minibuffer.

This means you can match against the key name
or the command name, or against both.

If you do want to have a key you type continue
the key sequence instead of editing minibuffer
content, precede it with `M-q'.  That inserts
its name, for completion.

You can also sort the completion candidates in
these ways (by default - you can add sorts):

 * By key name alphabetically, prefix keys first
 * By key name alphabetically, local keys first
 * By command name alphabetically

Sorting applies to both display and cycling (per
option `completion-cycle-threshold ').  You can
change the current sort order on the fly anytime,
using `C-,' (by default).  A prefix arg (e.g.
`C-u C-,') reverses the current sort order.

The completion styles used are those defined by
option `kc-completion-styles', so they can be
different from what you prefer for general use
(option `completion-styles').

Key See essentially extracts some of what
Icicles key completion provides, as a separate
library.  `keysee.el' requires `sortie.el',
which is what provides for completion sorting. 

If you complete to another prefix key (e.g.
you complete `C-x' to `C-x 4'), the candidates
are changed to those of that key (e.g. `C-x 4').

Whenever you are not at top level (candidates
are those of a prefix key), `..' is available
as a special candidate.  It takes you up a
level, essentially undoing the use of a prefix
key.

This means you can use Key See to navigate up
and down the complete current key hierarchy -
all possible keys (including menu-bar menus).

The on-demand completion behavior is provided
by minor mode `kc-mode'.  The automatic,
timer-based completion is provided by minor
mode `kc-auto-mode'.  It includes on-demand
behavior, so you can still use `S-TAB' at top
level.  To complete only menu-bar menus, you
can use command `kc-complete-menu-bar'.
___

Key See description:

https://www.emacswiki.org/emacs/KeySee

Key See code:

https://www.emacswiki.org/emacs/download/keysee.el

Sortie description:

https://www.emacswiki.org/emacs/Sortie

Sortie code:

https://www.emacswiki.org/emacs/download/sortie.el




reply via email to

[Prev in Thread] Current Thread [Next in Thread]