Questions tagged [minibuffer]

The minibuffer is a part of Emacs used to read in complex commands or arguments.

Filter by
Sorted by
Tagged with
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 ...
user avatar
  • 1,058
2 votes
2 answers
47 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 ...
user avatar
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-...
user avatar
  • 1,102
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 ...
user avatar
  • 159
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 ...
user avatar
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 ...
user avatar
0 votes
0 answers
24 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 ...
user avatar
  • 1
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 ...
user avatar
5 votes
1 answer
87 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-...
user avatar
  • 127
0 votes
1 answer
24 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.
user avatar
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 ...
user avatar
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&...
user avatar
  • 17.6k
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--...
user avatar
  • 1,102
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 ...
user avatar
  • 1,392
0 votes
2 answers
110 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.
user avatar
0 votes
1 answer
24 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 ...
user avatar
0 votes
0 answers
11 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 ...
user avatar
1 vote
1 answer
50 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 ...
user avatar
  • 463
3 votes
1 answer
28 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?...
user avatar
  • 1,058
3 votes
2 answers
63 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 ....
user avatar
  • 181
0 votes
2 answers
173 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, ...
user avatar
2 votes
1 answer
87 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 ...
user avatar
  • 24.2k
3 votes
1 answer
65 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) (...
user avatar
  • 1,102
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) (...
user avatar
  • 1,102
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)&...
user avatar
  • 137
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)" "|" ...
user avatar
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") #'...
user avatar
  • 1,102
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 ...
user avatar
  • 1,102
1 vote
1 answer
68 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 ...
user avatar
  • 224
3 votes
1 answer
107 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) ...
user avatar
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 ...
user avatar
  • 59
1 vote
1 answer
27 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.
user avatar
  • 121
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 ...
user avatar
2 votes
1 answer
86 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 ...
user avatar
  • 123
0 votes
1 answer
187 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 ...
user avatar
  • 1,102
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 "...
user avatar
1 vote
1 answer
103 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 ...
user avatar
  • 1,102
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 -- ...
user avatar
  • 277
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 ...
user avatar
1 vote
2 answers
105 views

How do I pass a variable definition as a parameter to a command in the minibuffer?

I am an emacs novice. I am familiarizing myself with making basic changes to the init.el file. Currently, when I want to load init.el, I first C-h v user-init-file RET, this opens a *Help* screen ...
user avatar
1 vote
1 answer
31 views

Deleting a minibuffer only frame on C-g

What I'm trying to achieve I'm trying to create a popup that runs an elisp funtion I've written which searches my library directory for pdfs, gets the user to choose an option (using completing read) ...
user avatar
  • 331
0 votes
1 answer
175 views

How to keep minibuffer height compact as possible?

I am using GNU Emacs 26.3 under iTerm2. My goal is to keep minibuffer size as compact/minimum as possible. Default height view: Sometimes minibuffer's height increases and remains as it is. The empty ...
user avatar
  • 1,102
0 votes
1 answer
65 views

embark-collect-* showing wrong number of arguements from Selectrum

I've been trying to get Selectrum, Embark and other packages working together as a completion framework, but am running into a problem with embark-collect-snapshot (and embark-collect-live). In the ...
user avatar
  • 331
2 votes
1 answer
68 views

Why doesn't font lock work in the minibuffer?

If you invoke M-x eval-expression then you can evaluate elisp expressions there, but there is no syntax highlight. If I turn on emacs-lisp-mode in the eval-expression prompt then the major mode is ...
user avatar
  • 21
2 votes
2 answers
175 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) ...
user avatar
0 votes
1 answer
80 views

What are the yellow-background items in Ivy?

I'm currently migrating from Helm to ivy+counsel, and I have a problem with the faces ivy applies in the minibuffer for some commands. See this example: Some of the possible selections are ...
user avatar
0 votes
1 answer
28 views

Show line at opening brace when cursor is after the closing brace (Perl)

Something I like in Emacs is positioning the cursor after the closing brace/paren highlights the opening brace/paren. Even better, like in Emacs-Lisp mode, the opening ( line is displayed in the ...
user avatar
  • 133
0 votes
0 answers
33 views

Make ido-completing-map override minibuffer-inactive-mode-map

I'm trying to bind a key in ido-completing-map, and I want it to override the key-binding with the same key from minibuffer-inactive-mode-map. But the latter seems to take precedence. How can I remedy ...
user avatar
  • 321
2 votes
2 answers
247 views

Inserting timestamp in mini buffer in Emacs

I keep on saving various org files in their respective folders using Filename as YYYY-MM-DD.org files . So I ended up typing C-x C-w 2020-10-06.org at least thirty times today. Can this process be ...
user avatar
  • 523
1 vote
0 answers
29 views

How to define interactive function that will not auto-complete?

If I do this: (defun foo-bar-baz () (interactive) (message "foo-bar-baz")) And then M-x foo-baz RET (note no "bar") then completion matches foo-bar-baz and it executes. Is ...
user avatar
  • 123