Questions tagged [minibuffer]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
63 views

Change minibuffer color when NOT in minibuffer AND minibuffer active

I frequently click on another application when I'm doing something in the minibuffer, and then I've forgotten I was in the minibuffer when I come back to emacs. I would like to highlight the ...
  • 169
0 votes
1 answer
29 views

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

On the screenshots of Doom Emacs themes (https://github.com/doomemacs/themes/tree/screenshots) I see the minibufer on the top of the screen with the visual autocomplete: How to achieve this look and ...
0 votes
0 answers
9 views

How to make the build and jack-in of a Clojure project faster and less manual while using CIDER (Emacs package for Clojure)?

Every time I am working on a Clojure project using Cider in Emacs I do the following: 1 - I execute cider-jack-in-cljs 2 - Then, the mini-buffer asks: Which command should be used (default lein): I ...
0 votes
1 answer
35 views

How do I call helm in the middle of switch-to-buffer (using vertico)?

Say I'm in the middle of switch-to-buffer (using vertico.el btw), I couldn't find the buffer/file I need. I want to use a key binding to call helm-recentf or helm-locate etc, how should I go about ...
1 vote
1 answer
33 views

Create a function to run a search with mini-buffer partially completed

I would like to write a function that starts a search (evil-search-forward specifically), with some arbitrary text already in the minibuffer. Following directions in this link I came up with the ...
0 votes
2 answers
31 views

read-string for making new buffer

Am trying to use read-string to read a string from the user. With that name I want to create a new buffer. Have seen that read-string is sometimes called from within an interactive expression, but at ...
  • 383
1 vote
1 answer
30 views

How to preselect initial text in the minibuffer with Elisp?

I'm using read-string to read a string from the minibuffer, with an initial input. How can I highlight the initial input, so that I can start replacing it with one key stroke? IOW, given (read-string &...
  • 1,414
0 votes
1 answer
42 views

Stopping the message ‘[Saved text until: …]’

The problem I have is caused by Emacs.lineSpacing: 1 in my X resources (thanks to NickD for help in pinpointing this), which equates to: (setq-default line-spacing 1) With that in effect, I call find-...
1 vote
1 answer
54 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,068
2 votes
2 answers
53 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
46 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-...
  • 1,074
0 votes
1 answer
34 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 ...
  • 169
0 votes
0 answers
45 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 ...
1 vote
1 answer
247 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 ...
0 votes
0 answers
36 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 ...
  • 1
0 votes
1 answer
89 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
141 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-...
  • 129
0 votes
1 answer
35 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 ...
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&...
  • 18k
0 votes
1 answer
29 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,074
0 votes
1 answer
38 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 ...
  • 1,414
0 votes
2 answers
185 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.
0 votes
1 answer
35 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 ...
0 votes
0 answers
16 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
56 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 ...
  • 483
3 votes
1 answer
33 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?...
  • 1,068
3 votes
2 answers
64 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 ....
  • 181
0 votes
2 answers
303 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
115 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 ...
  • 24.5k
4 votes
1 answer
86 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,074
1 vote
1 answer
71 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) (...
  • 1,074
1 vote
1 answer
38 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)&...
  • 137
1 vote
1 answer
153 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 ...
  • 1,074
1 vote
1 answer
92 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 ...
  • 266
3 votes
1 answer
123 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
48 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 ...
  • 69
1 vote
1 answer
32 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.
  • 121
0 votes
0 answers
101 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
1 answer
127 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 ...
  • 123
0 votes
1 answer
233 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,074
1 vote
1 answer
39 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 "...
3 votes
1 answer
133 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 ...
  • 1,074
3 votes
1 answer
174 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 -- ...
  • 349
0 votes
1 answer
30 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 ...
1 vote
2 answers
121 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 ...
1 vote
1 answer
38 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) ...
  • 331
0 votes
1 answer
218 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 ...
  • 1,074
0 votes
1 answer
67 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 ...
  • 331
2 votes
1 answer
76 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 ...
  • 21