Emacs minor mode to display the count of a mu query / mu4e bookmark in the mode-line
Add this file to your Emacs-Lisp load path, or load it explicitly by adding the following to your ~/.emacs.d/init.el:
(load-file "/path/to/muml.el")Add the following to your emacs config to enable muml:
(require 'muml)
(turn-on-muml-mode)The query used can be customised by setting ‘muml-query. For example, to query for unread mail use:
(setq muml-query "flag:unread")This is the default value for ‘muml-query.
You can also query using a bookmark as follows:
(setq muml-bookmark "Unread messages")This variable has precedence over ‘muml-query but the query will default to that of ‘muml-query if the bookmark cannot be found.
If using a bookmark be sure to turn on muml after you configure your mu4e bookmarks. If not, then your bookmark will not be found on the initial setting of the mode-line.
muml makes use of multiple hooks to update the message count. However, it is possible that under certain situations the count might not get updated. In this case, you can manually trigger an update by running:
M-x muml-update
If you do not want to have muml permanently displaying in your mode-line but would like to know if there is any mail waiting for you without switching to mu4e, you can run the following command to display the count of your chosen query or bookmark in the echo area:
M-x muml-display-query-count
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.