18 votes
Accepted

Spacemacs: paste into minibuffer

C-y does work, but you can also paste into the minibuffer from the default register using dotspacemacs-emacs-leader-key instead of dotspacemacs-leader-key, in which case you can use: leaderre" or ...
Braham Snyder's user avatar
12 votes
Accepted

Call a function and insert text in minibuffer prompt

Use minibuffer-setup-hook: (defun foo () (insert "ABCDE")) (add-hook 'minibuffer-setup-hook 'foo) As @Basil mentions in a comment, depending on your use case you can alternatively use macro ...
Drew's user avatar
  • 77.5k
9 votes

Can't get out of minibuffer completion

Is it possible there is an active recursive edit in the completion minibuffer? C-] by default is abort-recursive-edit. Alternatively keyboard-escape-quit or ESC ESC ESC might help?
dgtized's user avatar
  • 4,199
9 votes

How do I change the color of the prompt in the mini-buffer?

It's not obvious how to find out what face it is. The usual way is to put your cursor on some text and then use C-u C-x = but that's harder to do in the minibuffer. The other way I know of is to use M-...
amitp's user avatar
  • 2,541
9 votes

Using evil in the minibuffer

PR #1059 implemented this. Turn it on like this: (setq evil-want-minibuffer t) Watch out not to become too evil! :D
Alexander Shukaev's user avatar
9 votes
Accepted

Prevent Emacs from messaging when it writes recentf

One solution for that narrow case is to dynamically set save-silently for that invocation specific invocation. Try: (run-at-time nil (* 5 60) (lambda () (let ((save-...
ebpa's user avatar
  • 7,479
8 votes

Exit minibuffer and execute a command afterwards?

I wrote about this once. The code: (defmacro ivy-quit-and-run (&rest body) "Quit the minibuffer and run BODY afterwards." `(progn (put 'quit 'error-message "") (run-at-time nil nil ...
abo-abo's user avatar
  • 14.1k
8 votes
Accepted

Tab completion in minibuffer: case insensitive

Sure. Set variable completion-ignore-case to t. Put this in your init file: (setq completion-ignore-case t) C-h v completion-ignore-case: completion-ignore-case is a variable defined in C source ...
Drew's user avatar
  • 77.5k
8 votes
Accepted

Call function interactively and set initial content

find-file uses the buffer-local default-directory value as the default filename (see also find-file-read-args), so all you need to do is bind that value for the scope of the call to find-file: (let ((...
phils's user avatar
  • 51.1k
7 votes
Accepted

How do you disable the buffer end/beginning warnings in the minibuffer?

This is very similar to the question Is there a way to disable the “buffer is read-only” warning?, so a very similar answer seems appropriate. You can disable these messages by setting command-error-...
Constantine's user avatar
  • 9,122
6 votes

gpg password entry in minibuffer, not popup

Have you tried installing gpg version greater than 2.1, and then (setq epa-pinentry-mode 'loopback)? This should prompt for the password in the minibuffer. Edit: epa-pinentry-mode has been marked ...
InHarmsWay's user avatar
  • 1,319
6 votes
Accepted

How can I disable the vertical scroll bar on just the minibuffer?

fledermaus solved the puzzle: Add this to init.el: (set-window-scroll-bars (minibuffer-window) nil nil)
daveloyall's user avatar
  • 1,300
5 votes
Accepted

Exit minibuffer and execute a command afterwards?

I don't know of a way to do what you request. As you say in your question, and as @abo-abo shows, a workaround is to use a timer to execute the code you want run after the minibuffer is exited. The ...
Drew's user avatar
  • 77.5k
5 votes

How can I read a single character from the minibuffer?

The question was answered long ago, but this additional answer may provide some assistance to other searchers. read-char-choice allows you to specify a list of choices. The fn will not return until ...
Cheeso's user avatar
  • 245
5 votes

How copy content of minibuffer to kill-ring?

Just like ordinary buffers, C-x h (mark-whole-buffer) then M-w (kill-ring-save).
xuchunyang's user avatar
  • 14.5k
5 votes
Accepted

What is the variable for having multiple minibuffers?

The feature is called (emacs) Recursive Edit, it's disabled by default, you can enable it via (setq enable-recursive-minibuffers t) With Recursive Edit enabled, you might also want to enable ...
xuchunyang's user avatar
  • 14.5k
5 votes
Accepted

How can I resume swiper-isearch with the next line selected?

I found a solution to what I was trying to do: (defun my-swiper-isearch-again () "Start swiper-isearch with the last thing searched for." (interactive) (swiper-isearch (car swiper-history))) (...
bfad's user avatar
  • 171
5 votes
Accepted

Inserting timestamp in mini buffer in Emacs

I have the following in my .emacs: ;; date (global-set-key "\C-\M-d" (lambda (arg) (interactive "P") (let ((separator (pcase arg ('(4) "-") ...
choroba's user avatar
  • 2,045
5 votes
Accepted

How can I suppress the message `When done with this frame, type C-x 5 0`?

This is possible starting from Emacs 28, which provides the user option server-client-instructions for this purpose. (setq server-client-instructions nil)
phils's user avatar
  • 51.1k
5 votes
Accepted

How to suppress `Wrote /home/user/.emacs.d/recentf` message in minibuffer

This should do it. (defun no-msg (function) "Prevent FUNCTION from showing `Wrote <FILE>' messages. \(The messages are still logged to `*Messages*'.)" (let ((inhibit-message t)) ...
Drew's user avatar
  • 77.5k
5 votes
Accepted

How to exit minibuffer with one key?

You want to bind keys for the minibuffer in a minibuffer keymap. If you want a key to work in all minibuffers then bind it in keymap minibuffer-local-map: (define-key minibuffer-local-map (kbd "&...
Drew's user avatar
  • 77.5k
4 votes

AucTeX: Disable electric-pair-mode in minibuffer during Macro definition?

To specifically disable electric-pair-mode in the minibuffer change elethan's example to use the minibufferp function. Below is the relevant part from my Emacs configuration: ;; Enable smart paring (...
Peter W. V. Tran-Jørgensen's user avatar
4 votes
Accepted

How to make exceptions to bind-key* overriding behavior?

You can use the PREDICATE argument of bind-key* (bind-key* KEY-NAME COMMAND &optional PREDICATE) Similar to ‘bind-key’, but overrides any mode-specific bindings. (bind-key KEY-NAME COMMAND &...
npostavs's user avatar
  • 9,203
4 votes
Accepted

Key binding to yank word/char under cursor into minibuffer?

Vanilla Emacs doesn't, but Icicles does. See Inserting Text from Cursor. The key sequence M-. grabs one or more text things at point (the cursor position) in the current buffer and inserts them at ...
Drew's user avatar
  • 77.5k
4 votes

What is "Symbol Highlight Transient State"?

I'm not sure there's that much documentation on that (and I've rebound those keys personally), but I believe it's spacemacs' integration of auto-highlight-symbol.el, which is in various files, ...
Croad Langshan's user avatar
4 votes

Aliases on minibuffer for quick switching of directories

There are several things you could do. Use pattern matching that abbreviates parts of the directory hierarchy or file name. Even vanilla Emacs lets you do this to some extent (e.g. with wildcard * ...
Drew's user avatar
  • 77.5k
4 votes
Accepted

Minibuffer for each window

For Emacs 26 and later you can use emacs-maple-minibuffer or ivy-posframe if your are using ivy. Those packages let you configure to popup a minibuffer frame at any position, including the current ...
clemera's user avatar
  • 3,461
4 votes
Accepted

How do I reset minibuffer when it seems to act like a regular buffer?

@NickD had the answer! When my echo area "turns into" a minibuffer, I simply choose that buffer and execute the top-level function and the problem is solved. Thanks a ton for the help!
Tom Purl's user avatar
  • 377
4 votes

Minibuffer completion frameworks and interfaces

I guess the most elaborate comparison is given in the Selectrum readme. Next to that I think you should read about the philosophy behind the Vertico and Embark packages, which I find very appealing. ...
dalanicolai's user avatar
  • 7,805
4 votes

Batch mode, read NUL-delimited list of file names from stdin

As NickD analyzed, read-from-minibuffer reads one line at a time, and considers either CR or LF to end a line and doesn't distinguish between them. And I can't find another way to read from standard-...
Gilles 'SO- stop being evil''s user avatar

Only top scored, non community-wiki answers of a minimum length are eligible