Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [minibuffer]

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

20
votes
3answers
3k views

How to display the content of minibuffer in the middle of the emacs frame?

When working on a maximized Emacs frame, having the content of the minibuffer / echo area display at the bottom of the screen can be hard to see, but also causes to lose focus on the text being edited ...
12
votes
3answers
796 views

Put the current file name in the minibuffer

How can I insert the file name of the active file buffer into a command? When I invoke a command that needs a file name, I am often doing so from a file buffer and want the name of that file while ...
11
votes
2answers
849 views

Display the beginning of a scope when it is out of screen

I would like to display the opening part of a scope when this one get out of screen. Example: namespace a { ... --------------------- <- display frame ... | }* ...
11
votes
1answer
3k views

Spacemacs: paste into minibuffer

Is there a way to paste something into the minibuffer? For example if I want to eval-expression and paste something in there neiter C-v or (obviously p) will work? There has to be a way.
10
votes
4answers
1k views

How to change default minibuffer message?

After the init file has done loading I get this message in the minibuffer: For information about GNU Emacs and the GNU system, type C-h C-a. What is it being triggered by and how do I change it?
10
votes
4answers
484 views

How can I read a single character from the minibuffer?

When part of a defun, (interactive "c(C)hoose (A)n (O)ption") will prompt the user for a single character; RET is not required. How can I replicate this reading behavior without the need for ...
9
votes
2answers
811 views

Transiently adjust text size in mode line and minibuffer?

When working with others around a shared monitor or via screen-sharing (e.g. Google Hangout), I often use text-scale-adjust (C-x C-+) to let others more easily read my screen. I would love to be able ...
9
votes
1answer
865 views

How to cancel the minibuffer from the main buffer

Suppose that I do M-x blabla without pressing return and then I switch to the main buffer. If the curser is at minibuffer I can cancel the mini-buffer by the shortcut C-g. But if the cursor is at the ...
9
votes
2answers
828 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 (:...
9
votes
3answers
1k views

Send process output to *Messages* buffer, but bypass the echo area

Is it possible to send the output from a process-filter to the *Messages* buffer and suppress that message output from appearing in the echo area, such that I am able to simultaneously use interactive ...
9
votes
0answers
568 views

How to immediately resize the minibuffer window?

Suppose that I have this function, that inserts some stuff into the minibuffer: (defun foobar () (interactive) (minibuffer-with-setup-hook (lambda () (let ((resize-mini-windows t)) ...
7
votes
1answer
213 views

Access minibuffer history without using arrow keys

Is it possible to scroll the minibuffer history without using arrow keys? My preference would be to not have my fingers leave the home row.
7
votes
3answers
530 views

Why do some commands terminate when leaving the minibuffer (isearch) while others don't (find-file)?

Occasionally I start to open a file, and before I select the file for some reason I execute C-x o before answering the prompt. Then everytime I try and run find-file again it complains about Command ...
6
votes
1answer
310 views

How do I disable key-chord-mode in the minibuffer?

key-chord-mode is useful, but I don't need it to work in the minibuffer. How do I disable it in the minibuffer?
6
votes
5answers
1k 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, ...
6
votes
2answers
973 views

How do you disable the buffer end/beginning warnings in the minibuffer?

I see that I can do something like this: (defun limit-warnings () (set (make-local-variable 'warning-minimum-level) 'fatal)) (add-hook 'minibuffer-setup-hook 'disable-warnings) (Sorry for syntax ...
6
votes
2answers
1k views

fuzzy completion-style

People more knowlegable than I have suggested that intelligent fuzzy matching and sorting for both minibuffer completion and in-buffer completion could be accomplished by implementing a completion-...
6
votes
1answer
643 views

What is “Symbol Highlight Transient State”?

Pressing * (spacemacs/enter-ahs-forward) works like visual star in Vim, except for the mini buffer: What is "Symbol Highlight Transient State" in the mini buffer about? Where is the documentation ...
5
votes
2answers
2k views

How to copy minibuffer contents?

To post this question and this question, I had to copy the contents of minibuffer. I tried to copy from minibuffer but it didn't worked. I came across this discussion and checked *Messages* buffer ...
5
votes
2answers
236 views

Exit minibuffer and execute a command afterwards?

I am trying to bind a key in minibuffer-local-map to a command which uses abort-recursive-edit or exit-minibuffer and then proceeds executing more elisp code. So I want to exit the minibuffer and then ...
5
votes
1answer
159 views

I-search prompt font

I want my minibuffer prompt to be in bigger font, so I've added this to my .emacs: (defun my-minibuffer-setup () (set (make-local-variable 'face-remapping-alist) '((default :height 1.5)))) (...
5
votes
1answer
349 views

Use thing-at-point for isearch and minibuffer commands

How can I insert some text (thing) at point from the buffer into the minibuffer at a text prompt or during an incremental search? Is there a convenient way to insert, e.g., the sexp around point?
5
votes
1answer
126 views

Define colors for single use in minibuffer

I couldn't find anything on this, so I'm asking it here. I can display a message in minibuffer with (message "foo bar") I would like to give only the message "foo bar" a red color in the minibuffer....
5
votes
1answer
551 views

Key binding with an argument

Say I have a shell command foo that I want to bind to a key. I could do for example: (global-set-key (kbd "C-c f") (lambda () (interactive) (shell-command "foo"))) I would like to be able to pass an ...
5
votes
1answer
538 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.
5
votes
1answer
107 views

Specifying how history is managed for each buffer

After editing a couple of encrypted files with Emacs and EasyPG Assistant I realized that parts of those files were still stored in various lists within Emacs, e.g the kill-ring and the minibuffer ...
5
votes
0answers
102 views

How to stop background processes interrupting minibuffer

I have a couple of background processes that I regularly run, such as mu4e and jabber-mode. These, and other, processes provide updates to the minibuffer. Unfortunately, they do so when I'm already ...
5
votes
1answer
622 views

Case-insensitive filename completion in `shell-command'

I know I can get case-insensitive filename completion in the minibuffer using read-file-name-completion-ignore-case, but this doesn't seem to apply to all filename completion in the minibuffer. ...
4
votes
2answers
1k views

Difference between the physical “RET” key and the command 'newline in the minibuffer

The key "RET" is bound to 'newline in many modes in Emacs as described in M-x describe-binding. But in the minubuffer, they are different (try to send the command newline to the minibuffer). So this ...
4
votes
2answers
240 views

How to get back to minibuffer during an interactive search?

This might be a trivial issue, but here goes: I like to search (C-s or M-C-s for regexp search) often, and I want to be able to search in the buffer I'm in - jumping up and down (C-r, C-s) between ...
4
votes
1answer
396 views

How can I remap keys in the minibuffer?

I thought I could just use minibuffer-local-map but it isn't working. With emacs -Q I eval: (define-key minibuffer-local-map (kbd "TAB") nil) Then open up M-: and hit C-h c TAB and it says TAB runs ...
4
votes
2answers
125 views

Interactive auto-suggest?

My current configuration of Emacs (24.5.1 on U15.10) has auto-suggest set up for find-file, that is, when I do C-x C-f, the mini-buffer fills with possible completions that I can tab to and hit enter ...
4
votes
1answer
70 views

How catch the minibuffer message when saving, and colorize it? (Only for savings)

You could colorize the message in the minibuffer with (message (propertize "foo bar" 'face '(:foreground "green" :weight bold))) I would apply this only to the confirmation message of writings. ...
4
votes
1answer
113 views

subword-mode in minibuffer?

I use subword-mode when I'm editing Python and C++ code, and it's jarring when deleting a word backwards/forwards (Ctrl+Space and Ctrl+Delete) works one way in the source code buffer and a different ...
4
votes
2answers
544 views

Can't get out of minibuffer completion

Since upgrading from v. 24 to v. 25 [OSX 10.11.6] I find myself frequently fighting with minibuffer completion, as typing a tab after doing switch-to-buffer. ^G just beeps, and the completions ...
4
votes
1answer
178 views

Center text in minibuffer/echo area?

Q: is there a way to center the minibuffer/echo area horizontally? I use Emacs in a single, very wide frame split into three windows side by side. I'm usually working in the center window, with the ...
3
votes
3answers
169 views

How to call another function, if one function gives an error message

Suppose I call a function which is named as foo. Sometimes that function foo will give a message such as "Example of error message". If that is the case, then something else should be executed. ...
3
votes
1answer
176 views

Call function interactively and set initial content

I would like to call a function (find-file) interactively and then set the initial content of the mini buffer to my server's home folder. I got as far as using call-interactively, but after that I'm ...
3
votes
1answer
92 views

Prevent Emacs from messaging when it writes recentf

I've configured Emacs to save recentf every five minutes by using this code: (run-at-time nil (* 5 60) 'recentf-save-list) It works great, but after writing recentf Emacs feels it has to tell me ...
3
votes
1answer
296 views

Additional binding for keyboard-quit doesn't work with minibuffer

I set (global-set-key (kbd "H-g") 'keyboard-quit). When the minibuffer is open and waiting for input, and I want to quit out of it, when I hit H-g, the bell rings and I see the Quit message, but the ...
3
votes
2answers
159 views

keybinding to yank word/char under cursor into minibuffer?

Does Emacs have a keybinding 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 often wish I could use ...
3
votes
1answer
611 views

Show Helm candidates at left, immediately above minibuffer

If I split a frame vertically, keep point in left split and press M-x, minibuffer will be on bottom and M-x will be in left corner like this. This is very convinient as I can 'see' what I am typing ...
3
votes
1answer
195 views

How can I disable the vertical scroll bar on just the minibuffer?

Look at this tiny scroll bar (circled in red): I think I could use the elisp function set-window-scroll-bars, but I don't know how to specify the minibuffer.
3
votes
3answers
294 views

Display path and filename in a minibuffer

Eval this code: (defun xx-display-filename (filename) "" (interactive "Ffilename: ") (message (concat "Filename is: " filename))) Let's assume that I am editing a ~/.emacs.d/personal/custom.el ...
3
votes
2answers
282 views

How to use describe-key in Helm results buffer?

While in the results buffer of helm-projectile-grep, I know I can use C-<up> and C-<down> to visit the files with the matches, but I would like to rebind those keys. Normally I would use ...
3
votes
1answer
165 views

Making read-char input robust? [closed]

I need to read a char at a time to interactively build a filter string while I show the results in a regular buffer. And what I've written works, except when a cursor key is pressed - then bang, I ...
3
votes
1answer
1k views

How do I change the color of the prompt in the mini-buffer?

I am using the zenburn theme and my mini-buffer prompt is unreadable (image attached). Please help me. I am just learning emacs.
3
votes
2answers
98 views

How to bind a key inside the completing-read prompt?

In one of my packages, I use a loop with completing-read to query the user for a list of words. Inside the prompt, I'd like to bind DEL to a different command. How can I achieve that? The solution ...
3
votes
1answer
338 views

Error running timer “show-paren-function” when displaying matching line in message/mini buffer

I want to display the line contains matching bracket in the message/mini buffer at the bottom of emacs. I found some code on emacs Wiki, after put it in init file, emacs do show the maching line in ...
3
votes
2answers
308 views

Add bottom margin to minibuffer / echo area?

When running emacs maximized on my new screen, a black shadow at the bottom, that for normal viewing angles is just a few pixels wide, interfers with the readability of the minibuffer / echo area. ...