all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: Ergus <spacibba@aol.com>
Cc: emacs-devel@gnu.org
Subject: Re: minibuffer keybinding cheatsheet and launcher
Date: Thu, 1 Oct 2020 10:27:30 -0400	[thread overview]
Message-ID: <20201001142730.yzmja5xi5j3ltndr@E15-2016.optimum.net> (raw)
In-Reply-To: <20201001125818.nnaqoeorkp4liavz@Ergus>

On 2020-10-01 14:58, Ergus wrote:
> Hi Boruch:
>
> I am trying to test the package (because I don't really understand what
> it does)

Then I guess the description wasn't clear enough. Have you ever used
magit, or some package using hydra or transient? You included my
original email, so can you point to the exact part that isn't clear
enough?

> but I can't make it work

Let's see what's going on..

> I evaluated the code and then M-x key-assist and I got a prompt

There are two prompts: A first prompt, beginning with the word
'optional', and a second one with the word 'select'. At what point are
you asking?

If you responded to the first prompt ('optional') by pressing RET, the
result list will be composed by searching for commands based upon the
first word of variable 'major-mode', so if you performed M-x key-assist
from the same buffer that had the lisp code, that would probably mean a
major-mode of emacs-lisp-mode, which wouldn't be too helpful. For me,
the result is a set of help functions (ie. C-h ...).

   So, an initial question I have is: if you pressed RET to the first
   prompt, what was the 'major-mode' of the current-buffer?

*USING A VANILLA EMACS*, at the second prompt ("select"), you should be
able to use all the standard 'completing-read' features:
double-TAB for a list of option, up/down keys to scroll through them,
type characters and use tab completion - all the usual standard features
of completing-read.

If you are using a supplemental minibuffer completion program (eg. ido,
icicles, ivy, avy) the experience should be similar to the standard
features of those packages.

   So are you using a true vanilla emacs, or one with an additional
   minibuffer completion package? That might make a subtle difference,
   but it shouldn't be significant.

> but after that what should I do?

After responding to the 'Optional' prompt or the 'Select' prompt?

> Tab just inserts a tab (no autocompletion), RET says "No choices
> found", inserting a pattern and TAB shows the commands and the
> bindings but I can't select anything.

Here's an idea. Open an 'ibuffer' (C-x C-b), switch to it so it's your
current buffer, run M-x key-assist and respond to the first prompt with
RET, and to the second with TAB. What happens? What happens if you then
use the up or down arrow keys, or partially type some text from any of
the options, and then RET?

> BTW: Emacs 28 already has a new variable 'suggest-key-bindings'

Not a new variable at all. It's default has been set 't' for several
versions now.

> Does this functionality overlap somehow with your package?

Eh. Let's say 'not at all', but superficially I can see someone thinking
that it might.

>
> On Thu, Oct 01, 2020 at 08:23:22AM -0400, Boruch Baum wrote:
> > Two days ago, I posted to the emacs bug list (#43709) a proposed code
> > contribution that hasn't gotten much feedback, so here's a summary and link:
> >
> >   bug#43709: minibuffer keybinding cheatsheet and launcher
> >   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43709
> >
> >   If you've ever used packages such as `ivy' or `magit', you've
> >   probably benefited from each's custom combination keybinding
> >   cheatsheet and launcher: `hydra' in the case of `ivy', and
> >   `transient' for `magit'. The current package `key-assist'
> >   attempts to offer a generic and very simple alternative requiring
> >   only the `completing-read' function commonly used in core vanilla
> >   emacs. `key-assist' is trivial to implement "on-the-fly"
> >   interactively for any buffer, and programmatically much simpler
> >   to customize that either `hydra' or `transient'. And did I
> >   mention that it only requires `completing-read'?
> >

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0



  reply	other threads:[~2020-10-01 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 12:23 minibuffer keybinding cheatsheet and launcher Boruch Baum
2020-10-01 12:58 ` Ergus
2020-10-01 14:27   ` Boruch Baum [this message]
2020-10-01 14:41   ` Caio Henrique
2020-10-01 15:39     ` Boruch Baum
2020-10-01 16:16       ` Caio Henrique

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=20201001142730.yzmja5xi5j3ltndr@E15-2016.optimum.net \
    --to=boruch_baum@gmx.com \
    --cc=emacs-devel@gnu.org \
    --cc=spacibba@aol.com \
    /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.