silence mu4e 'indexing' message in minibuffer ONLY when not directly called

131 views
Skip to first unread message

Benjamin Slade

unread,
Nov 1, 2017, 12:53:39 PM11/1/17
to mu-discuss
Re: https://github.com/djcb/mu/issues/206 and `mu4e-hide-index-messages`, is there a way to still display the indexing message when I execute the indexing manually (but not when it's just running automatically)?

Dirk-Jan C. Binnema

unread,
Nov 1, 2017, 3:57:13 PM11/1/17
to mu-di...@googlegroups.com
Sure, this is emacs after all.

You could add a keybinding 'U' that toggles the variable, does the
update, and then switch it back either after <n> seconds or in
`mu4e-index-updated-hook`.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Eduardo Mercovich

unread,
Nov 1, 2017, 4:30:50 PM11/1/17
to mu-di...@googlegroups.com
Hi everyone.

>> Re: https://github.com/djcb/mu/issues/206 and
>> `mu4e-hide-index-messages`, is there a way to still display the
>> indexing message when I execute the indexing manually (but not
>> when it's just running automatically)?

> [...] You could add a keybinding 'U' that toggles the variable,
> does the update, and then switch it back either after <n>
> seconds or in `mu4e-index-updated-hook`.

What if we use the modeline to report these kind of things?

Just my 2 Zimbabwean cents... ;)


--
Eduardo Mercovich

Donde se cruzan tus talentos
con las necesidades del mundo,
ahí está tu vocación.
(Anónimo)

beo...@gmail.com

unread,
Nov 1, 2017, 6:04:05 PM11/1/17
to mu-di...@googlegroups.com
> Sure, this is emacs after all.

> You could add a keybinding 'U' that toggles the variable, does the
> update, and then switch it back either after <n> seconds or in
> `mu4e-index-updated-hook`.

Right. I did try something along those lines quickly a few months ago
without much luck, and thought I'd check to see if something of the sort
was already implemented (I recently spent too much time implementing an
auto-trim pdf mode for pdf-tools only to discover it already had one).

beo...@gmail.com

unread,
Nov 1, 2017, 10:48:45 PM11/1/17
to mu-di...@googlegroups.com
Ok, the following appears to work. I imagine the issue I had before was
probably not having some sort of `wait for <n>' piece.

(defun bms/mu4e-sometimes-silent-update-force ()
"Only show minibuffer information when explicitly called."
(interactive)
(setq mu4e-hide-index-messages nil)
(mu4e-maildirs-extension-force-update)
(sleep-for 5)
(setq mu4e-hide-index-messages t))

(defun bms/mu4e-front-keys ()
"For use on mu4e main menu screen."
(local-set-key (kbd "u") 'bms/mu4e-sometimes-silent-update-force))

(add-hook 'mu4e-main-mode-hook 'bms/mu4e-front-keys)

I tried adding a hook to `mu4e-index-updated-hook` since that seemed
cleaner, but couldn't get anything which worked.
> --
> You received this message because you are subscribed to the Google Groups "mu-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mu-discuss+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
Benjamin Slade
`(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
'(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
`(Choose Linux ,(Choose Freedom) . https://linux.com )
Reply all
Reply to author
Forward
0 new messages