diff --git a/NEWS.org b/NEWS.org index 54625135..06c89cc1 100644 --- a/NEWS.org +++ b/NEWS.org @@ -45,6 +45,11 @@ your hook-functions (or elsewhere) you can check if anything changed using the new variable ~mu4e-index-update-status~. + - `message-user-organization` can now be used to set the `Organization:` + header. See its docstring for details. + + - undo is now supported across message-saves + - a lot of the internals have been changed: - =mu4e= is slowly moving from using the =~= to the more common =--= separator diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index 7e761b89..4d8fd68e 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -281,6 +281,7 @@ removing the In-Reply-To header." (define-key map (kbd "C-S-u") 'mu4e-update-mail-and-index) (define-key map (kbd "C-c C-u") 'mu4e-update-mail-and-index) (define-key map (kbd "C-c C-k") 'mu4e-message-kill-buffer) + (define-key map (kbd "C-c ;") 'mu4e-compose-context-switch) (define-key map (kbd "M-q") 'mu4e-fill-paragraph) map))) @@ -643,10 +644,14 @@ when the buffer is in `mu4e-compose-mode': "Draft must be saved before switching context. Save?")) (unless (and (not force) (eq old-context (mu4e-context-switch nil name))) - ;; Change From field to user-mail-address + ;; Change From / Organization if needed. + (message-replace-header "Organization" + (or (message-make-organization) "") + '("Subject")) ;; keep in same place (message-replace-header "From" (or (mu4e~draft-from-construct) "")) - ;; Move message to mu4e-draft-folder + + ;; Move message to mu4e-draft-folder (if has-file (progn (save-buffer) (let ((msg-id (message-fetch-field "Message-ID")) diff --git a/mu4e/mu4e-draft.el b/mu4e/mu4e-draft.el index 39a2d1d3..adc2cd13 100644 --- a/mu4e/mu4e-draft.el +++ b/mu4e/mu4e-draft.el @@ -607,6 +607,8 @@ You can append flags." (defun mu4e~draft-common-construct () "Construct the common headers for each message." (concat + (when-let ((organization (message-make-organization))) + (mu4e~draft-header "Organization" organization)) (when mu4e-user-agent-string (mu4e~draft-header "User-agent" mu4e-user-agent-string)) (mu4e~draft-header "Date" (message-make-date)))) diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index 04af2c27..ab82aa17 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -2458,6 +2458,7 @@ when starting; see the discussion in the previous section. :to "aliced@@home.example.com"))) :vars '( ( user-mail-address . "aliced@@home.example.com" ) ( user-full-name . "Alice Derleth" ) + ( message-user-organization . "Homebase" ) ( mu4e-compose-signature . (concat "Alice Derleth\n" @@ -2473,6 +2474,7 @@ when starting; see the discussion in the previous section. (string-match-p "^/Arkham" (mu4e-message-field msg :maildir)))) :vars '( ( user-mail-address . "aderleth@@miskatonic.example.com" ) ( user-full-name . "Alice Derleth" ) + ( message-user-organization . "Miskatonic University" ) ( mu4e-compose-signature . (concat "Prof. Alice Derleth\n"