Hello,
I recently wanted to write a function to go to a few maildirs that are noisy
for me and just be able to mark them all as read and return to my current
inbox maildir. I discovered the two contributed functions[1] that do the
initial marking all unread as read and then I ended up creating this:
; Use the helper functions to mark all read in annoying maildirs
(defun jsm:mu4e-mark-noisy-maildirs-all-read ()
"Mark all read for some of my noisy maildirs such as Root Email"
(interactive)
(let ((noisy-maildirs (list "/Work/Root Mail" "/Work/Projects.Spacewalk")))
(mapc (lambda (maildir)
(save-window-excursion (mu4e~headers-jump-to-maildir maildir)
(mu4e-headers-flag-all-read)
;; (sleep-for 2)
(mu4e-headers-query-prev)))
noisy-maildirs)))
(define-key mu4e-headers-mode-map (kbd "A")
'jsm:mu4e-mark-noisy-maildirs-all-read)
It runs but it is switches back to the previous query too quickly it would
seem because the messages are either not marked or the mark execution doesn't
complete because the messages are still left as unread. Perhaps there are
some synchronous versions of the functions I'm using that would solve this?
[1]: https://github.com/djcb/mu/issues/128
Thanks,
--
Jon Miller
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.