Skip to main content
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
  • 79.1k
11 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,249
10 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

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,591
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,579
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
  • 79.1k
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
  • 53k
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,339
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

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
  • 265
5 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
  • 79.1k
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.8k
5 votes
Accepted

Set focus to minibuffer window

I prefer to select a window in a particular direction -- that way, I don't have to "cycle" through too many windows. That being said, here is a repost from Emacs wiki -- "The following command ...
lawlist's user avatar
  • 19.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.8k
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,125
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
  • 53k
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
  • 79.1k
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
  • 79.1k
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,253
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
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,476
4 votes
Accepted

What are the implications of working in multiple layers of recursive-edit?

The Emacs manual node Recursive Edit explains the phenomenon. In a way it's like having another editing session (typically temporarily), with the same buffers etc. available (for the most part). That ...
Drew's user avatar
  • 79.1k
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,985
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
4 votes
Accepted

How to preselect initial text in the minibuffer with Elisp?

Use macro minibuffer-with-setup-hook to set the mark at the end of the minibuffer prompt. read-string then inserts the initial text with the mark active, which means that initial text is selected as ...
Drew's user avatar
  • 79.1k
4 votes

How to get a minibufer on top of the screen with the visual auto-complete

Answering my own question. Yes, it's probably Vertico + vertico-posframe + marginalia.el (thank you @dalanicolai!). Vertico: https://github.com/minad/vertico vertico-posframe: https://github.com/...
Yuriy Al. Shirokov's user avatar

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