rougier / mu4e-dashboard

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

Added support for bookmarks #49

Closed dmgerman closed 1 year ago

dmgerman commented 1 year ago

Queries can now include references to bookmarks. A bookmark is denoted with

 bm:<bookmarkName>

bookmarkName cannot contain spaces nor ]

For example,

Assuming the following bookmark exists:

(add-to-list 'mu4e-bookmarks
     '(:name "Unread"
           :query "flag:unread and not flag:trashed"
           :key ?f)
     t)

the dashboard query:

 mu:bm:Unread and date:7d..now

will be expanded as

(flag:unread and not flag:trashed) and date:7d..now

note that parenthesis around the bookmark are added to make sure the expansion is hygienic.

A query can contain several bookmarks, but their expansion is not recursive.

rougier commented 1 year ago

Thanks, looks good. Could you update the README with some examples of the new syntax?

dmgerman commented 1 year ago

I have added a corresponding section to the README.org.

rougier commented 1 year ago

Looks perfect, thanks.