unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Philip Kaludercic <philipk@posteo.net>, Corwin Brust <corwin@bru.st>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: RE: [External] : Re: Include which-key.el in the Emacs distribution
Date: Mon, 14 Feb 2022 16:23:47 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488A1DE7B19A0B1E1870C51F3339@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87wnhyk72h.fsf@posteo.net>

> 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




  parent reply	other threads:[~2022-02-14 16:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 13:54 Include which-key.el in the Emacs distribution Stefan Kangas
2020-09-08 14:01 ` Ergus
2020-09-08 14:16   ` Stefan Kangas
2020-09-08 17:29   ` Yuan Fu
2020-09-08 17:40     ` Justin Burkett
2020-09-08 20:40       ` Stefan Kangas
2020-09-08 16:22 ` Alfred M. Szmidt
2020-09-08 17:24   ` Eli Zaretskii
2020-09-08 17:37     ` Amin Bandali
2020-09-08 17:51       ` Alfred M. Szmidt
2020-09-08 17:54         ` Justin Burkett
2020-09-08 18:06           ` Eli Zaretskii
2020-09-08 18:11             ` Justin Burkett
2020-09-08 20:40               ` Stefan Kangas
2020-09-08 18:10           ` Alfred M. Szmidt
2020-09-08 18:00       ` Eli Zaretskii
2020-09-08 19:12         ` Amin Bandali
2020-09-08 18:25 ` Caio Henrique
2020-09-08 19:19 ` Stefan Monnier
2020-09-08 20:14   ` Ergus
2020-09-08 20:40     ` Stefan Kangas
2022-02-11 21:31       ` Corwin Brust
2022-02-13 17:30         ` Philip Kaludercic
2022-02-14  9:04           ` Pankaj Jangid
2022-02-14 16:23           ` Drew Adams [this message]
2022-02-14 22:09           ` Tim Cross
2022-02-13 17:59         ` Stephen Leake
2022-02-13 18:17           ` Corwin Brust
2022-02-13 23:25             ` Stephen Leake
2022-02-14  2:47               ` Stefan Monnier
2022-02-14  3:09                 ` Justin Burkett
2022-02-14  3:46                   ` Corwin Brust

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=SJ0PR10MB5488A1DE7B19A0B1E1870C51F3339@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=corwin@bru.st \
    --cc=emacs-devel@gnu.org \
    --cc=philipk@posteo.net \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).