unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* RE: Include which-key.el in the Emacs distribution
       [not found] ` <<E1kFgO6-0000cE-Dj@fencepost.gnu.org>
@ 2020-09-08 17:55   ` Drew Adams
       [not found]   ` <<83sgbskwq8.fsf@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2020-09-08 17:55 UTC (permalink / raw)
  To: Alfred M. Szmidt, Stefan Kangas; +Cc: justin, emacs-devel

>    PS. I personally think it should be enabled by default, but we would
>        probably do better to first include it as an option for people to
>        get more experience with it.
> 
> Could the output be improved though?  The current output is VERY
> verbose, and quite bare and unexplanatory.  On my terminal it takes up
> 9 lines when just hitting C-x.  It also dislikes any type of prefix
> command and hides the output from those.  E.g, C-h, M-o etc, where it
> eats the message from the original command.
> 
> Instead why not if you press C-x in the echo area a short list of
> commands could be produced that you can scroll through, similar to
> which-key but not as talkative.  It could say,
> 
>   C-x 		(f - edit file, o - other window, ...)
> 
> The prefix commands C-x 4, C-x r etc could also produces such
> messages.  Like Emacs does for M-o.  This list could be curated.
> 
> Maybe that would be a nice middle ground, not to talkative, helps the
> new user and won't annoy the old farts too much?

See also `keysee.el':

No problem with prefix keys/commands (C-h, M-o, etc.).
No problem showing available keys at top level.
No problem navigating back up the key hierarchy - up,
 down, all around.
No problem with menu-bar menus (up, down, all around).
You can match keys, commands, or both.
You can sort matches on the fly:
 * By key name alphabetically, prefix keys first
 * By key name alphabetically, local keys first
 * By command name alphabetically

It does, however, show all matches in *Completions*,
(as opposed to just a few matches in the echo area).

If you have a way of limiting the window height of
*Completions* then that would help reduce the visual
overload you complain about.

But maybe what you really want for that is something
that decides which are the most important keys to
show.  Sorting *Completions* according to such
"importance" (and showing it in a short window)
would help with that.  One easy way to automatically
define such "importance" could be to sort keys by
their recent frequency.

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

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


(FWIW: If you use Icicles then you have what
keysee.el offers plus much more, including control
over *Completions* display, sort orders etc.

https://www.emacswiki.org/emacs/Icicles_-_Key_Completion)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Include which-key.el in the Emacs distribution
       [not found]   ` <<83sgbskwq8.fsf@gnu.org>
@ 2020-09-08 18:05     ` Drew Adams
  2020-09-08 18:33       ` keysee.el (was: Re: Include which-key.el in the Emacs distribution) Alfred M. Szmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2020-09-08 18:05 UTC (permalink / raw)
  To: Eli Zaretskii, Alfred M. Szmidt; +Cc: stefan, justin, emacs-devel

> to scroll to the next page?  In particular, after typing
> "C-h" that shows the first page of Help commands?

FWIW, this is not a problem for keysee.el.  Scrolling
*Completions* is as usual (TAB), including after C-h.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* keysee.el (was: Re: Include which-key.el in the Emacs distribution)
  2020-09-08 18:05     ` Drew Adams
@ 2020-09-08 18:33       ` Alfred M. Szmidt
  0 siblings, 0 replies; 5+ messages in thread
From: Alfred M. Szmidt @ 2020-09-08 18:33 UTC (permalink / raw)
  To: Drew Adams; +Cc: eliz, stefan, justin, emacs-devel


   > to scroll to the next page?  In particular, after typing
   > "C-h" that shows the first page of Help commands?

   FWIW, this is not a problem for keysee.el.  Scrolling
   *Completions* is as usual (TAB), including after C-h.

So I like these hints, which is why I'm keen on trying them.

Using keysee, while it does provide a slightly better interface it is
still confusing me.  I loaded sortie.el and keysee.el, and turned on
kc-auto-mode.

  C-h
  ;; Very large pop up pops up taking over my whole terminal window.
  ;; I press the period key, since that seems interesting since it says
  ;; display-local-help.
  .

Nothing happens; OK ... lets try again something different.

  C-h
  ;;; Large pop-up.  Lets try an easy one, C-a for about-emacs.
  C-a

Nothing happens.  Ok, so I must be doing something wrong.  Lets try C-x.

  C-x
  ;;; Large popup.
  C-f
  ;;; Echo area says End of Buffer, and beeps at me.

Hm.  Why can't I open a file when completing?  This occurs for any key
binding I tried while the keysee popup is active.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: keysee.el (was: Re: Include which-key.el in the Emacs distribution)
       [not found]       ` <<E1kFiR6-0002dS-Ou@fencepost.gnu.org>
@ 2020-09-08 18:58         ` Drew Adams
  2020-09-08 19:35           ` Alfred M. Szmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2020-09-08 18:58 UTC (permalink / raw)
  To: Alfred M. Szmidt, Drew Adams; +Cc: eliz, stefan, justin, emacs-devel

> Using keysee, while it does provide a slightly better interface it is
> still confusing me.  I loaded sortie.el and keysee.el, and turned on
> kc-auto-mode.

<Snipped description of trying to type keys after prefix keys...>

Please read the description.  Key See is not Which-Key.

Key See shows you the available keys, and their
commands, at any point (any time).

It shows you _descriptions_ of the keys and commands.
You can complete (normally) against those descriptions.

So if you type `C-x' you're shown descriptions (names)
of all keys & commands in that prefix-key's keymap
(`ctl-x-map').  You can narrow the help by completing
against key names or command names (or both).

That means typing text to complete against the names,
not hitting keys to continue the `C-x' key sequence.

It's a different UI (it's the standard Emacs UI, with
`completing-read').  Different pros & cons.  I think
what it does is clear from the doc.  But if you don't
read the doc and just expect which-key behavior... ;-)

Hope it's clear now.  It's different from which-key.

I pointed also to its big brother, Icicles key
completion, which offers more.  The idea is the same.
The description in the Icicles doc is more elaborate,
with screenshots etc.

https://www.emacswiki.org/emacs/Icicles_-_Key_Completion



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: keysee.el (was: Re: Include which-key.el in the Emacs distribution)
  2020-09-08 18:58         ` Drew Adams
@ 2020-09-08 19:35           ` Alfred M. Szmidt
  0 siblings, 0 replies; 5+ messages in thread
From: Alfred M. Szmidt @ 2020-09-08 19:35 UTC (permalink / raw)
  To: Drew Adams; +Cc: eliz, stefan, justin, drew.adams, emacs-devel


   > Using keysee, while it does provide a slightly better interface it is
   > still confusing me.  I loaded sortie.el and keysee.el, and turned on
   > kc-auto-mode.

   <Snipped description of trying to type keys after prefix keys...>

   Please read the description.  Key See is not Which-Key.

That is sorta the point -- one shouldn't need to read a description to
open a file for a mode that tries to add completion.  The pop up shows
keys that one would think are possible to just input so it is easy to
expect that those will just work.

If I press C-x and go for a coffee in the middle of opening a file, it
also becomes confusing since the behaviour of Emacs will magically
change.  

This is specially important when inputting keyboard macros. if you
start a keyboard macro, wait for a bit ... then you're now recording
the input to keysee.  Very confusing, since if you're quick on the
fingers you'll get the expected behaviour but if you pause you get
something totally different.

I tried recording a simple macro, mark the whole buffer, and
upcase-region on it.  

  C-x h			;; mark-whole-buffer
  C-x C-u		;; upcase-region

with kc-auto-mode, it is just very very confundled:

  C-x (
  C-x h
  C-x <wait until popup) C-u
  ;; Nothing happens, so you start typing upcase-region you get
  uuuupcase-region
  ;; you amend that using backspace, and retype
  16*DEL upcase-region RET
  C-x )
  ;; Echo line now complains that parenthesis cannot be found and
  ;; inserts a closing paren in the buffer.
  C-x )

The recorded macro is something like:

  C-x h			;; mark-whole-buffer
  C-x C-u		;; upcase-region
  upcase-region		;; self-insert-command * 13
  16*DEL		;; delete-backward-char
  upcase-region		;; self-insert-command * 13
  RET			;; newline
  C-x )			;; kmacro-end-macro

That isn't exactly what was entered -- yes, I get why it becomes that
-- but consider it from a random user.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-08 19:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <<CADwFkmmvVRqnQGA_d8bMA66SXbpjis+j-1UiceY7Lk7eY6iugA@mail.gmail.com>
     [not found] ` <<E1kFgO6-0000cE-Dj@fencepost.gnu.org>
2020-09-08 17:55   ` Include which-key.el in the Emacs distribution Drew Adams
     [not found]   ` <<83sgbskwq8.fsf@gnu.org>
2020-09-08 18:05     ` Drew Adams
2020-09-08 18:33       ` keysee.el (was: Re: Include which-key.el in the Emacs distribution) Alfred M. Szmidt
     [not found] <<<CADwFkmmvVRqnQGA_d8bMA66SXbpjis+j-1UiceY7Lk7eY6iugA@mail.gmail.com>
     [not found] ` <<<E1kFgO6-0000cE-Dj@fencepost.gnu.org>
     [not found]   ` <<<83sgbskwq8.fsf@gnu.org>
     [not found]     ` <<3b2bc5ac-0469-4c95-86e8-74806a06d3eb@default>
     [not found]       ` <<E1kFiR6-0002dS-Ou@fencepost.gnu.org>
2020-09-08 18:58         ` Drew Adams
2020-09-08 19:35           ` Alfred M. Szmidt

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).