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 ...
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 ...
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?
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
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-...
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-...
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 ...
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 ((...
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 ...
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)
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 ...
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 * ...
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).
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 ...
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 ...
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)))
(...
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) "-")
...
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)
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))
...
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 "&...
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
(...
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 &...
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, ...
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 ...
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 ...
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!
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. ...
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-...
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 ...
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/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
minibuffer × 233key-bindings × 22
completion × 22
echo-area × 15
ivy × 11
faces × 10
helm × 9
buffers × 8
isearch × 8
prompt × 8
message × 7
window × 6
hooks × 6
frames × 6
quitting × 6
evil × 5
commands × 5
find-file × 5
ido × 5
input-method × 5
read × 5
dired × 4
search × 4
doom × 4
interactive × 4