5

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 interacting with the minibuffer.

How can I prevent this happening, or at least dismiss the message so I can continue interacting with the minibuffer?

Drew
  • 75,699
  • 9
  • 109
  • 225
retrodev
  • 295
  • 1
  • 9
  • I like to create a `process-filter` and send the string of process output directly to the `*Messages*` buffer with `insert` and I let-bind `inhibit-read-only` and create the buffer in the proper mode if doesn't already exist. See this related thread -- **Send process output to *Messages* buffer, but bypass the echo area**: http://emacs.stackexchange.com/a/6003/2287 If one of your offending functions mentioned in the question have a `message` being created, you may wish to consider commenting that out or modifying it to a concept similar to the link in this comment -- i.e., just insert. – lawlist May 03 '16 at 13:57
  • See also this related thread that describes a new variable available in Emacs 25 -- i.e., `inhibit-message`: http://superuser.com/a/927832/206164 The doc-string states: "*Non-nil means calls to ‘message’ are not displayed. They are still logged to the `*Messages*` buffer.*" – lawlist May 03 '16 at 14:10
  • What do you mean by "updates to the minibuffer"? Do you mean that they print messages in the echo area (same space as the minibuffer, when the latter is inactive)? Or do they use `minibuffer-message` to write to the active minibuffer? – Drew May 03 '16 at 14:28
  • I think it's actually messages in the echo area. So, say I'm halfway through interacting with an interactive function, supplying paramters, some other process I have running such as jabber-mode or mu4e will write to the echo area and I will have to wait for it to go away. I don't want to be interrupted. – retrodev May 04 '16 at 09:32
  • The processes that interrupt are not developed by me. I'm looking for a configuration type option to prevent this behaviour. – retrodev May 04 '16 at 09:33
  • There is no universal configuration to override the default behavior of `message` *only* when your cursor is in the mini-buffer. You will need to track down each function that creates the `message` that annoys you, and you'll need to modify its behavior accordingly. Since your question is too broad, I suspect no one is going to pull up `jabber` or `mu4e` and suggest a slew of modifications. Thus, you'll need to narrow the question down to a specific function if you need help modifying it. If Emacs 25, consider let-binding `inhibit-message`. Search for `(message` in the source code. – lawlist May 04 '16 at 17:45
  • Seems the variable minibuffer-message-timeout should work out of the box, but it doesn't. I have come up with this: (fset 'original-message (symbol-function 'message)) (defun clear-message (&rest args) (run-with-timer 2 nil (lambda () (original-message nil)))) you can test it with (run-with-timer 2 nil (lambda () (message "Some message"))) Maybe it's better to set inhibit-message at entry and exit of the minibuffer (setq inhibit-message t) – godblessfq Apr 19 '19 at 11:07

0 Answers0