1

I'm using mu4e for email and I really like it. The only time it annoys me is when I'm switching buffers and I want to see a list of suggested buffer names in the echo area / minibuffer, because mu4e insists on writing [mu4e] Retrieving mail... / into the echo area. In order to refresh the list of buffer names I must edit the now invisible text in the minibuffer, but it only flashes for a moment as it is again overwritten by mu4e's notification.

I like this notification when I don't use the minibuffer, so I don't want to disable it completely. Is there a way to prevent it from appearing when I'm actively using the minibuffer?

  • Here is an idea, which is one hundred percent untested -- find the section of code that is responsible for the message and add a condition -- (if (minibufferp) [then insert the output in the *Messages* buffer and bypass the echo area] (message [email retrieval message])). Here is what I use to insert text into the *Messages* buffer and bypass the echo area: (let ((inhibit-read-only t)) (with-current-buffer (messages-buffer) (goto-char (point-max)) (when (not (bolp)) (insert "\n")) (insert [email retrieval message]) (when (not (bolp)) (insert "\n")))) – lawlist Mar 5 '15 at 7:27
  • @lawlist: Don't use minibufferp for the test - use function minibuffer-depth or function active-minibuffer-window. It's not about whether the current buffer is a minibuffer; it's about whether the minibuffer is active. – Drew Mar 5 '15 at 16:21
  • @Drew -- thank you for the suggestion -- I'll give it a try later on today using an example I am familiar with so I can see how it works in-house. – lawlist Mar 5 '15 at 16:42
  • @lawlist Did you ever get a chance to work on this further? I'm interested in solving the same problem. – dodgethesteamroller Sep 18 '15 at 22:28
  • I don't use mu4e, but I bet that a very small bounty would attract sufficient attention to find a good solution. I haven't done any further work on the idea in the comment above -- it is something that I use daily when printing output from a running process with a filter directly to the *Messages* buffer so that I can go on about my business without muddying up the echo area -- the primary functions I do this with is compiling LaTeX .pdf files with start-process and running rsync with start-process. – lawlist Sep 18 '15 at 23:06
1

The offending code is right in mu4e-update-mail-and-index:

(unless mu4e-hide-index-messages
 (make-progress-reporter
  (mu4e-format "Retrieving mail...")))

which logs messages when the (undocumented) variable mu4e-hide-index-messages is nil. I prefer to disable it entirely, but to answer your question the following should do the trick:

(add-hook 'minibuffer-setup-hook
      (lambda () (setq mu4e-hide-index-messages t)))
(add-hook 'minibuffer-exit-hook
      (lambda () (setq mu4e-hide-index-messages nil)))
  • Unfortunately, this last snippet doesn't cover the case when switching to the minibuffer while retrieving mail. I guess I'll just disable it with mu4e-hide-index-messages. Thanks! – rekado Nov 22 '15 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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