Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A dashboard for mu4e (mu for emacs)

License

NotificationsYou must be signed in to change notification settings

rougier/mu4e-dashboard

Repository files navigation

mu4e Dashboard

mu4e dashboard provides a newmu4e org link type that allows to execute various mu4e queries when clicked. Such links can be organised into a dashboard, by simply writing an org file as shown below:

Screenshot 1: Full page dashboard

./dashboard.png

Screenshot 2: Side dashboard

./dashboard-2.png

Installation

Evaluate the buffer and you’re good to go. It is your responsibility to write an org file with links pointing to varius queries on your mailboxes.

Configuration

Links

The link syntax is quite intuitive:

[[mu:query|format|count][description]]

query must be a valid mu4e query andcount (optional) is the maximum number of results to be returned. When the link is clicked,mu4e-headers-search is called with the proper query.

[[mu:flag:unread][All unread]][[mu:flag:unread||10][Last 10 unread]]

format can be used to specify thatquery results are to be counted in order to update the description using the given format:

[[mu:flag:unread|%3d][---]]

With the example above, when the link is cliked, the--- part will be replaced by the number of unread mails.

Using mu4e-bookmarks

Queries can include references to mu4e-bookmarks. A bookmark is denoted withbm:<bookmarkName>

bookmarkName cannot contain spaces nor ]. A query can contain several bookmarks, but their expansion is not recursive.

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 to:

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

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

Key bindings

Keybindings can be configured using theKEYMAP keyword in your org file:

#+KEYMAP: key | elisp function

For example, if you want to bind; to context switch, you would write:

#+KEYMAP: ; | mu4e-context-switch

Query test

In the provideddashboard.org, there’s a definition for a mu query that can be called directly inside the org file usingorg-babel. This can be convenient if you want to test a query before creating a link. Usage is quite simple:

#+CALL: query(flag:unread, 10)#+RESULTS:

Just typeC-c C-c on the call line and you should see query results under the RESULTS line.

Usage

To activate the dashboard, typemu4e-dashboard-mode. This will turn onmu4e-dashboard-mode minor mode and install any custom keybindings in the current buffer.

To edit the org file, you’ll need to turn offmu4e-dashboard-mode.

Related

There is a fork of this software which is designed to be used withnotmuch instead of with mu4e. It replaces the standardnotmuch-hello dashboard with an org-mode version. You can find ithere.

About

A dashboard for mu4e (mu for emacs)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp