Questions tagged [minibuffer]
The minibuffer is a part of Emacs used to read in complex commands or arguments.
194
questions
1
vote
1
answer
28
views
Is there a reliable way to determine in the minibuffer from which buffer the interactive command was invoked?
Simply checking the buffer-list is not enough, because an interactive command can be invoked via various ways, not just directly or via M-x. E.g. if you invoke it via a Helm-like selector package ...
1
vote
1
answer
86
views
Run function at the end and begin of any minibuffer interaction
I tried to advice read-from-minibuffer and read-string but nothing worked.
For example, when I called yes-or-no-p, no advice handlers were called.
Is there general way how to detect that user is ...
3
votes
1
answer
118
views
Can't switch input sources in the minibuffer during Isearch
Incremental search doesn't allow me to switch between different input sources, e.g. US English to French, when I'm typing my search string into the minibuffer. Is there a way to fix this?
It happens ...
1
vote
1
answer
234
views
Non-blocking prompt for user input
I'm using the org-pomodoro, and I have added a function to the org-pomodoro-started-hook that prompts the user for a reminder for what they should do during the break. However, I don't want to call ...
2
votes
2
answers
46
views
How to define "-" as a word character in minibuffer?
I have a specific problem that when I run "grep", my default grep command contains the -i option, and sometimes I wish to repeat the last search but case-sensitive. So I press M-p (previous ...
0
votes
1
answer
30
views
How can I compile current LaTeX buffer without showing `Master file:` line in the minibuffer
Following solution is used to compile current buffer that is a LaTeX file:
(defun my-run-latex ()
"Save all buffers and run LaTeX on the current master."
(interactive)
(let* ((inhibit-...
0
votes
1
answer
32
views
Reading a word or regular expression from the mini-buffer to a function
What function should I call to read a word or regular expression from the minibuffer? Am writing a function that accepts a word or regular expression and counts the number of matches.
But need to ...
0
votes
0
answers
26
views
Cannot invoke transient magit-pull while minibuffer is active
I'm using magit. When I try to pull or commit, I get this message in the mini-buffer:
Cannot invoke transient magit-pull while minibuffer is active
I can assure you, I have closed every magit-related ...
0
votes
0
answers
22
views
Helm get current user input
I am trying to write a custom source for Helm. This source, however, should also give me the opportunity to create new objects, and not just select between those existing.
The problem is, when what ...
0
votes
1
answer
36
views
how to make mini buffer "sticky"?
So I wanted to make mini buffer "sticky."
Currently, I am using doom emacs. When I look up info page using spc h i for example, mini buffer popups from below. The problem with this mini ...
5
votes
1
answer
85
views
How to exit minibuffer with one key?
How can I tell emacs that one key press of <f12> should terminate the minibuffer, like C-g does by default?
I tried in scratch buffer:
(global-set-key (kbd "<f12>") 'keyboard-...
0
votes
1
answer
23
views
How can I insert a character by its hex code in the minibuffer?
I've seen it's possible to insert characters with their hex codes by using ctrl+x 8 RET but on regular buffers. I'd like to insert in the minibuffer itself.
0
votes
0
answers
44
views
It now takes multiple C-g presses to cancel actions in minibuffer window
I'm a long time Emacs user. For years it took a single C-g to cancel the operation in progress in the minibuffer. For example:
C-x b to invoke switch to buffer
C-g to cancel
C-x C-f to visit file
In ...
1
vote
1
answer
155
views
Can icomplete mode be enabled selectively, only for certain commands?
I'd like to use icomplete-mode for certain commands, but not for everything. Is there a way to enable it for just a list of commands I specify?
2
votes
1
answer
35
views
widget: Setting to control "y/n" confirmation with system popup versus minibuffer
On OSX, using the following variable/keymap and code snippet, a mouse click on the "SUBMIT" button will generate a system popup confirmation message, whereas an enter key on the "SUBMIT&...
0
votes
1
answer
27
views
How can I apply `(toggle-debug-on-quit)` ignore ` Debugger entered Lisp error: (minibuffer-quit)`
I have (toggle-debug-on-quit) in my init.el file due to find a issue that makes emacs hangs. But it also catches minibuffer-quit.
Would it be possible to ignore catched errors for Debugger entered--...
1
vote
1
answer
214
views
Browse url at point when clicking and pressing super
I am trying to make emacs open the url displayed under the current point when I left click and press the super key at the same time.
I am trying with this code but it does not work
(global-set-key (...
0
votes
1
answer
36
views
How to define a command to switch to the current candidate buffer in Ido?
I'm trying to write a command that I would call while using ido-switch-buffer or ido-kill-buffer to open the current candidate in another window. Ideally it would be able to open virtual buffers as ...
0
votes
2
answers
109
views
How to map keybindings to find-file?
How I can map keybindings to find-file since there is no
find-file-mode-map or something like that?
I am using the vertico minimalistic vertical completion UI.
3
votes
2
answers
366
views
Key binding to yank word/char under cursor into minibuffer?
Does Emacs have a key binding to yank the word/character under point into the minibuffer? I know isearch has "C-w" (isearch-yank-word-or-char) and "C-M-y" (isearch-yank-char). I ...
0
votes
1
answer
23
views
How to delete inserted directory names for `find-file` input?
I've been trying to figure out how to erase directories faster when I use find-file
in vanilla Emacs.
An example is Doom Emacs, you press backspace once, and erase the entire directory, but when I try ...
2
votes
3
answers
159
views
cycling between minibuffer and last window|buffer
I'd like to cycle between an active minibuffer window and the last recent buffer.
1 (defun cycle-to-minibuffer-window ()
2 (interactive)
3 (when (active-minibuffer-window)
4 (if (...
0
votes
0
answers
10
views
How to change location of filetags on minibuffer
When doing an org-roam-node-find, using Ivy as my completion system, I get in the minibuffer the name of the nodes, and on the far right the filetags for those nodes. But for some of them the tags get ...
1
vote
1
answer
49
views
How do you target the present directory, once in a while, with do-what-I-mean enabled?
After setting Dired do-what-I-mean
(setq dired-dwim-target t)
which, quoting the man pages
If non-nil, Dired tries to guess a default target directory. This
means: if there is a Dired buffer ...
3
votes
2
answers
62
views
Batch mode, read NUL-delimited list of file names from stdin
I am writing a batch Emacs script and I would like it to read a NUL-delimited list of file names to process from stdin. (NUL-delimited lists of file names are what you get from the Unix command find ....
3
votes
1
answer
27
views
How can I do something only if the minibuffer exits normally?
Simply attaching to minibuffer-exit-hook is not enough, because it also runs when the user presses C-g, so the command quits.
Is there a way to determine in the hook if the command is exiting normally?...
0
votes
2
answers
165
views
Minibuffer completion frameworks and interfaces
Emacs has a lot of different packages for minibuffer UI, search, and completion.
Some of the packages I am aware of are Icicles, Ido, Ivy, Counsel, Swiper, Consult, Vertico, Selectrum, Orderless, ...
2
votes
1
answer
85
views
How does eldoc (>= 1.1.0) display arguments in the mode-line during eval-expression
I am unable to determine how eldoc is displaying arguments (or other information) in the mode-line while eval-expression is reading user input in the minibuffer. I could not find a relevant element in ...
7
votes
4
answers
2k
views
Suppress message in minibuffer when a buffer is saved?
Whenever a buffer is saved, a message is displayed in minibuffer.
Wrote foo.bar
I use real-auto-save to save modified buffers every 5 seconds. Due to this minibuffer is getting spammed. Sometimes, ...
3
votes
1
answer
64
views
How to suppress `Wrote /home/user/.emacs.d/recentf` message in minibuffer
In the minibuffer I keep seeing:
Wrote /home/user/.emacs.d/recentf
Would it be possible to suppress this message? (Only for file name recentf file)
my minimal.el:
(setq recentf-max-saved-items 50)
(...
1
vote
1
answer
65
views
How to remove empty space on ido-find-file's completions minibuffer window
When I use ido-find-file and press TAB I see the found filenames in a half windows size. Instead could it be compact, where can emtpy space removed?
Ex:
minimal.el:
(ido-mode 1)
(require 'consult)
(...
3
votes
1
answer
140
views
why do I need to use ctrl-G twice to quit a minibuffer prompt?
Sometime recently emacs started making me hit C-g twice to quit a minibuffer prompt and I can't figure out how or why it's doing this.
What happens is I start a minibuffer command -- say, C-x C-f -- ...
10
votes
1
answer
2k
views
Using evil in the minibuffer
evil-mode does not seem to bind keys in the minibuffer. Is there a way to use evil in the minibuffer? It's hard to use Vim-style keybindings everywhere BUT the minibuffer.
1
vote
1
answer
67
views
Accept default in ivy filename prompt
Using Doom Emacs, when I invoke a command (such as diff) that needs a filepath I get an ivy prompt that names a default value:
But I am unable to clear the line or somehow tell ivy to take that ...
6
votes
1
answer
2k
views
Tab completion in minibuffer: case insensitive
When the minibuffer offers tab completion, how can I make that case-insensitive?
Preferably a global setting that makes any completion – a filename, a command, ido, etc. – obey that setting.
1
vote
1
answer
34
views
Mollyguard specific functions (delete-frame)?
I have recently started using multiple frames regularly. I keep accidentally hitting C-x 5 0 instead of C-x 5 o. I do want to still be able to close frames, but I want an "are you sure? (y/n)&...
0
votes
0
answers
41
views
How to change to any todo state from org-agenda? (Bug?)
I have customized my org todo state keywords to the following:
(setq org-todo-keywords
'((sequence "EVENTUALLY(e)" "BONUS" "OPTION(o)" "TODO(t)" "|" ...
0
votes
0
answers
34
views
How to overwrite keys in the minibuffer?
I am tyring to apply following answer for How to prevent Text is read-only when in minibuffer, but I was not able to bind the keybinding for:
(define-key minibuffer-local-map (kbd "C-h") #'...
1
vote
1
answer
117
views
How to prevent `Text is read-only` when in minibuffer
It's about deleting minibuffer input without trying to also delete some of the minibuffer prompt (which is read-only).
When I do C-x C-f for find-file and delete all the way of the given path. Now, I ...
10
votes
3
answers
1k
views
Can I change the background color of the inactive minibuffer?
I tried it with the following settings:
(add-hook 'minibuffer-setup-hook
(lambda ()
(make-local-variable 'face-remapping-alist)
(add-to-list 'face-remapping-alist '(default (:...
3
votes
1
answer
106
views
Change prompt style to minibuffer from GUI dialogs
Emacs by default does not ask if you are sure you want to exit Emacs, so I added this to my configuration to prompt me to answer yes or no before quitting Emacs.
(setq confirm-kill-emacs 'y-or-n-p) ...
0
votes
0
answers
41
views
Many prompts hidden from sight in the minibuffer when using `EXWM` window manager
If I open Emacs 28.0.50 on Ubuntu's Gnome desktop manager (whether full screen or not), I can always see whatever prompts I have to see on the mini-buffer, such as pass's prompt for my passphrase or ...
0
votes
0
answers
71
views
Minibuffer not showing the bottom line
When I use multiple monitors, the bottom line of the minibuffer doesn't render; ie there's a line at the bottom of the list that I can select but doesn't render on screen.
I'm pretty stumped on how to ...
2
votes
2
answers
174
views
Save current file with a slightly different name in Helm
This is the same question as Save current file with a slightly different name, but for Helm. (The top answer given for the original question doesn't work in Helm, sadly: M-n (next-history-element) ...
1
vote
1
answer
26
views
How to insert date into minibuffer, or how to create a new file with date as part of filename?
shell way:
touch testfile-`date +%Y-%m-%d`
emacs way? c-x c-f testfile-... now what?
I want to type the first part of the filename myself, but not the date.
2
votes
1
answer
83
views
How can I use `TAB` with `M-x` to cycle through commands matching minibuffer input
I am finding completion in Emacs system to work similarly to bash completion, in the sense that upon pressing TAB, it presents the user with a list of possible options.
However, I am looking for ...
0
votes
1
answer
186
views
How to change color of searched text in the minibuffer when M-x activated?
When I type M-x along with some text, the found text's background and font color is hard to read (gray and bold white on top of dark blue). Is it possible to change it?
Example screenshot:
As theme I ...
1
vote
1
answer
22
views
Is there an easy way to use thing-at-point to initialize interactive read string (interactive "sfoo:")
Is there an easy way to use thing-at-point to initialize the contents of an interactive string reading?
I have a function the looks something like this:
(defun foo (string)
(interactive "...
1
vote
1
answer
102
views
How can I suppress the message `When done with this frame, type C-x 5 0`?
I am running emacs v26 daemon on the background and using a single terminal. Usually I open files using emacsclient -qt and close them using C-x C-s and C-x C-c to get back to terminal run the script ...
0
votes
1
answer
28
views
How to hierarchically find available functions in the minibuffer with stock emacs
I accidentally pressed some keys and found a feature that looked really useful. It gave me the option to hierarchically select a command/function to run in the minibuffer. There was some explanatory ...