-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
;;; mu4e-folders.el --- Dealing with maildirs & folders -*- lexical-binding: t -*- | ||
;;; mu4e-folders.el --- Maildirs & folders -*- lexical-binding: t -*- | ||
|
||
;; Copyright (C) 2021-2023 Dirk-Jan C. Binnema | ||
;; Copyright (C) 2021-2024 Dirk-Jan C. Binnema | ||
|
||
;; Author: Dirk-Jan C. Binnema <[email protected]> | ||
;; Maintainer: Dirk-Jan C. Binnema <[email protected]> | ||
|
@@ -28,20 +28,26 @@ | |
(require 'mu4e-helpers) | ||
(require 'mu4e-context) | ||
(require 'mu4e-server) | ||
|
||
|
||
;;; Customization | ||
(defgroup mu4e-folders nil | ||
"Special folders." | ||
:group 'mu4e) | ||
|
||
(defcustom mu4e-drafts-folder "/drafts" | ||
"Folder for draft messages, relative to the root maildir. | ||
For instance, \"/drafts\". Instead of a string, may also be a | ||
function that takes a message (a msg plist, see | ||
`mu4e-message-field'), and returns a folder. Note, the message | ||
parameter refers to the original message being replied to / being | ||
forwarded / re-edited and is nil otherwise. `mu4e-drafts-folder' | ||
is only evaluated once." | ||
For instance, \"/drafts\". | ||
Instead of a string, may also be a function that takes a | ||
message (a msg plist, see `mu4e-message-field'), and returns a | ||
folder. Note, the message parameter refers to the original | ||
message being replied to / being forwarded / re-edited and is nil | ||
otherwise. `mu4e-drafts-folder' is only evaluated once. | ||
The form of draft messages is not necessarily compatible with | ||
other e-mail programs, e.g. when it involves attachments and the | ||
like. | ||
" | ||
:type '(choice | ||
(string :tag "Folder name") | ||
(function :tag "Function return folder name")) | ||
|
@@ -98,8 +104,7 @@ Each of the list elements is a plist with at least: | |
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 and | ||
speedbar. | ||
`:hide' - if t, the shortcut is hidden from the main-view. | ||
`: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'. | ||
|
@@ -162,7 +167,7 @@ mime-type are nil." | |
(defvar mu4e-maildir-list nil | ||
"Cached list of maildirs.") | ||
|
||
|
||
|
||
(defun mu4e-maildir-shortcuts () | ||
"Get `mu4e-maildir-shortcuts' in the (new) format. | ||
Converts from the old format if needed." | ||
|
@@ -284,8 +289,8 @@ Offer to create it if it does not exist yet." | |
This is based on the variable `mu4e-attachment-dir', which is either: | ||
- if is a string, used it as-is | ||
- a function taking two string parameters, both of which can be nil: | ||
(1) a filename or a URL | ||
(2) a mime-type (such as \"text/plain\"." | ||
(1) FNAME, a filename or a URL | ||
(2) MIMETYPE, a mime-type (such as \"text/plain\"." | ||
(let ((dir | ||
(cond | ||
((stringp mu4e-attachment-dir) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters