summaryrefslogtreecommitdiff
path: root/mu4e
diff options
context:
space:
mode:
authordjcb <djcb@djcbsoftware.nl>2014-09-02 06:10:38 -0700
committerdjcb <djcb@djcbsoftware.nl>2014-09-02 06:10:38 -0700
commit9bd65560a5210f725222b2878935be72049ea1eb (patch)
tree2f7f4ff9ef4a5cc3f0f07fe3aba049eb8a03fefd /mu4e
parent003b7a7b7ad88de1a0143003a9fa5e4630d254a6 (diff)
mu4e: make including dates in drafts optional (and disabled by default)
Add new configuration variable `mu4e-compose-auto-include-date'.
Diffstat (limited to 'mu4e')
-rw-r--r--mu4e/mu4e-draft.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/mu4e/mu4e-draft.el b/mu4e/mu4e-draft.el
index 9400020..c97b191 100644
--- a/mu4e/mu4e-draft.el
+++ b/mu4e/mu4e-draft.el
@@ -67,6 +67,12 @@ messages (if it is set)."
:type 'boolean
:group 'mu4e-compose)
+(defcustom mu4e-compose-auto-include-date nil
+ "Whether to include a date header when starting to draft a
+message; if nil, only do so when sending the message."
+ :type 'boolean
+ :group 'mu4e-compose)
+
(defun mu4e~draft-user-agent-construct ()
"Return the User-Agent string for mu4e.
This is either the value of `mu4e-user-agent', or, if not set, a
@@ -300,14 +306,12 @@ You can append flags."
(format "%s-%02x%04x-%s:2,%s"
(format-time-string "%Y%m%d" (current-time))
(random 255) (random 65535) hostname (or flagstr ""))))
-
-;; New
-;; Automatically add a date to new drafts, so one can
-;; sort drafts by date.
+
(defun mu4e~draft-common-construct ()
"Construct the common headers for each message."
(mu4e~draft-header "User-agent" (mu4e~draft-user-agent-construct))
- (mu4e~draft-header "Date" (message-make-date)))
+ (when mu4e-compose-auto-include-date
+ (mu4e~draft-header "Date" (message-make-date))))
(defconst mu4e~draft-reply-prefix "Re: "