9

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 redisplay. The only way I know to exit the minibuffer in this situation is to pick one of the completions, either with the mouse or by navigating with keys. I have a pretty simple setup with respect to switch-buffer. I don't think I use any buffer libraries that would affect his, and have not changed buffer handling for several versions. Any suggestions about what is causing this and how I can get out of minibuffer completion without choosing one of the completions?

2
  • Does your problem persist when you try running Emacs without your configuration (emacs -q?) If it doesn't, then your config is the problem. I couldn't reproduce your issue in Emacs 25 without configuration.
    – user12563
    Commented Mar 25, 2017 at 20:17
  • What @DoMiNeLa10 said. If you see the same thing when starting Emacs with emacs -Q then provide a step-by-step recipe to repro the problem. If not, recursively bisect your init file to find the culprit.
    – Drew
    Commented Mar 25, 2017 at 22:16

4 Answers 4

11

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?

2

I was seeing the same thing, but I knew that for me it had started sometime after I'd upgraded to and had been using Emacs 25. In my case, the problem turned out to be my recent addition of the following to my ~/.emacs file:

(set-frame-parameter nil 'unsplittable t)

The above was one of several things I had used to try to undo some other behavior changes that Emacs 25 brought in. In this case, it wasn't the right thing to try.

This also might explain why I didn't seem to get stuck in the minibuffer when I was running with my full ~/.emacs configuration, yet in --no-window-system (-nw) mode. There, as I understand it, frames aren't even a thing.

2

Aha! This has been making me crazy for a long time. Today I spent some more time searching and exploring. I stumbled on the answer after doing ^H-m when in the minibuffer. The fourth keybinding listed is "q", quit-window. Typing q when completions are displayed closes the completion buffer and returns to the minibuffer, where ^G aborts normally.

I don't understand why it was so difficult for me to figure this out, or why there aren't a lot of people complaining about this.

1

I had just defined a keyboard macro, and was editing a path in the mini buffer, and wanted to change spaces to '_' underscore characters, and attempted to use M-% to change ' ' to '_', and the mini buffer could not change the characters - so I copied the string to the shell and attempted to do the substitution there.

Then I got the error message - since I was already in the middle of changing the name of the buffer in the mini buffer.

I closed the macro definition and the change of the buffer name stopped as well.

I stopped getting 'not in nested command loop' messages. And was able to continue without being stuck in the mini buffer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.