From e534f8ae794780d6413a08ee6b8947302b9d138d Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 16 Mar 2025 16:29:40 +0200 Subject: [PATCH] mu4e: centralize docstring for mu4e-bookmarks Refer to it in mu4e-maildir-shortcut, so we only have one place to document the format. --- mu4e/mu4e-bookmarks.el | 6 ++++-- mu4e/mu4e-folders.el | 25 +++++++++---------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/mu4e/mu4e-bookmarks.el b/mu4e/mu4e-bookmarks.el index 37127e2f..af4442ae 100644 --- a/mu4e/mu4e-bookmarks.el +++ b/mu4e/mu4e-bookmarks.el @@ -48,14 +48,16 @@ ( :name "Messages with images" :query "mime:image/*" :key ?p)) - "List of pre-defined queries that are shown on the main screen. + "List of predefined queries that are shown on the main screen. Each of the list elements is a plist with at least: `:name' - the name of the query `:query' - the query expression string or function + +Likely, you also want to assign a shortcut key; `:key' - the shortcut key (single character) -Optionally, you can add the following: +Furthermore, you can add the following: - `:favorite' - if t, monitor the results of this query, and make it eligible for showing its status in the modeline. At most diff --git a/mu4e/mu4e-folders.el b/mu4e/mu4e-folders.el index 22d1ee28..db74eba6 100644 --- a/mu4e/mu4e-folders.el +++ b/mu4e/mu4e-folders.el @@ -98,25 +98,18 @@ This makes it possible to quickly go to a particular maildir (folder), or quickly moving messages to them (e.g., for archiving or refiling). -Each of the list elements is a plist with at least: -`:maildir' - the maildir for the shortcut (e.g. \"/archive\") -`:key' - the shortcut key. +The format is the same as for `mu4e-bookmarks', with a few +difference, so see its doc-strings for further details. -Optionally, you can add the following: -`:name' - name of the maildir to be displayed in main-view. -`:hide' - if t, the shortcut is hidden from the main-view. -`:hide-if-no-unread' - if it t, the shortcut is hidden from - the main-view if it contains no unread messages. +The only field specific for `mu4e-maildir-shortcuts' is +- `:maildir' - the maildir for the shortcut (e.g., \"/archive\") - You can also use: -`:hide-unread' - do not show the counts of unread/total number - of matches for the maildir in the main-view, and is implied - from `:hide'. +Example: -For backward compatibility, an older form is recognized as well: - - (maildir . key), where MAILDIR is a maildir (such as -\"/archive/\"), and key is a single character. +\\(setq mu4e-maildir-shortcuts + \\'( (:maildir \"/inbox\" :key ?i :hide-if-no-unread t) + (:maildir \"/drafts\" :key ?d :hide t) + (:maildir \"/sent\" :key ?s :hide-unread t))) You can use these shortcuts in the headers and view buffers, for example with `mu4e-mark-for-move-quick' (or \"m\", by default) or