How can I prevent the mini-buffer from displaying previous commands in Emacs?

前端 未结 2 1279

I am not even sure this is a previous command or a non-finished command or whatever, but I do know I really don\'t like it.

My problem is that some commands (or mes

相关标签:
2条回答
  • 2021-01-04 15:01

    The mini-buffer has lost focus. Try C-x o (Control+x o) to regain focus. To cancel the command press C-g when you have focus in the mini-buffer.

    0 讨论(0)
  • 2021-01-04 15:04

    Chances are you're getting into the situation because you started a command and used your mouse to select something in a different window. If that's the case, you can have Emacs automatically abort the command when you do such an action.

    This is the code you'd add to your .emacs:

    (defun stop-using-minibuffer ()
      "kill the minibuffer"
      (when (and (>= (recursion-depth) 1) (active-minibuffer-window))
        (abort-recursive-edit)))
    
    (add-hook 'mouse-leave-buffer-hook 'stop-using-minibuffer)
    

    Note: I grabbed this from my blog post on the topic.

    And there is also a super user question that addresses this issue, and my answer there provides a command to jump back to the minibuffer.

    0 讨论(0)
提交回复
热议问题