rougier / mu4e-dashboard

A dashboard for mu4e (mu for emacs)
GNU General Public License v3.0
465 stars 43 forks source link

sent back to dashboard when quitting a mailbox #45

Open dmgerman opened 2 years ago

dmgerman commented 2 years ago

This might be useful to some of you. This code replaces the main mu4e view with the dashboard, but only if the dashboard has been loaded.

This assumes that there is a function mu4e-dashboard, which is part of #44

    (defun dmg-mu4e-view (orig &rest args)
      (interactive)
       (if (find-buffer-visiting mu4e-dashboard-file)
           (mu4e-dashboard)
          (apply orig args)
         ))

    (advice-add 'mu4e--main-view :around #'dmg-mu4e-view)
rougier commented 2 years ago

It could be added into the documentation actually.

pseudomyne commented 1 year ago

Hi, Just in case : mu4e&~main-view doesn't exist here. mu4e--main-viewdoes.