unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Minibuffer Execute + Repeat
@ 2021-01-16 22:33 Gabriel do Nascimento Ribeiro
  0 siblings, 0 replies; only message in thread
From: Gabriel do Nascimento Ribeiro @ 2021-01-16 22:33 UTC (permalink / raw)
  To: emacs-devel

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!
Gabriel



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-16 22:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-16 22:33 Minibuffer Execute + Repeat Gabriel do Nascimento Ribeiro

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