[Top][All Lists]

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

Minibuffer Execute + Repeat

From: Gabriel do Nascimento Ribeiro
Subject: Minibuffer Execute + Repeat
Date: Sat, 16 Jan 2021 19:33:41 -0300

In Emacs, some commands asks for user input by using a minibuffer
prompt. If you want to run that command again with the same or similar
input, you should run the command again (using the original keybinding
or 'C-x z') and type 'M-p' to get the last history element or type the
whole input again if history variable is absent. There are many use
cases where executing the command without leaving the minibuffer prompt
could be useful. A similar behavior exists today with 'M-e' on
isearch-mode, which is much more convenient that quitting the current
search and repeating the search command to modify the last input.

I know some packages exists that implements that feature, but doesn't
make sense to install a big package that will modify everything related
to minibuffer and completions. AFAIK, currently Emacs doesn't offer this
feature OOB and I failed to implement on my own using ELisp without too
much dirty hacks. The way 'exit-minibuffer' works and how commands and
args are stored ('last-command', 'real-last-command',
'current-minibuffer-command' and so on) makes it difficult to implement,
at least for me.

So I would like to know if there is any easy way to get this behavior
without installing big packages that re-implements the whole
minibuffer. Is this feature a thing we want to ship in Emacs, or at
least provide more functions/variables to make it feasible to be
implemented by users without too much hacking ?

Any guidance is appreciated, thanks!

reply via email to

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