mu4e: when in-reply-to: is removed, remove references: too

When user removes the In-Reply-To header, also remove the (hidden)
References header when sending the message, effectively making the
message appear at the top-level.

Mention in the doc, NEWS.
This commit is contained in:
djcb 2015-11-22 12:17:36 +02:00
parent b43b701aa9
commit a2409b62ca
3 changed files with 26 additions and 5 deletions

View File

@ -21,7 +21,12 @@
one.
- allow for transforming mailing-list names for display, using
`mu4e-mailing-list-patterns'.
- some optimizations in indexing
- some optimizations in indexing (~30% faster in some cases)
- new variable mu4e-user-agent-string, to customize the User-Agent:
header.
- when removing the "In-reply-to" header from replies, mu4e will
also remove the (hidden) References header, effectively creating
a new message-thread.
** 0.9.13

View File

@ -264,6 +264,14 @@ Ie. either 'name <email>' or 'email')."
(add-hook 'completion-at-point-functions
'mu4e~compose-complete-contact nil t))
(defun mu4e~remove-refs-maybe ()
"Remove the References: header if the In-Reply-To header is
missing. This allows the user to effectively start a new
message-thread by removing the In-Reply-To header."
(unless (message-fetch-field "in-reply-to")
(message-remove-header "References")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar mu4e-compose-mode-map nil
"Keymap for \"*mu4e-compose*\" buffers.")
@ -303,6 +311,8 @@ Ie. either 'name <email>' or 'email')."
;; setup the fcc-stuff, if needed
(add-hook 'message-send-hook
(lambda () ;; mu4e~compose-save-before-sending
;; when in-reply-to was removed, remove references as well.
(mu4e~remove-refs-maybe)
;; for safety, always save the draft before sending
(set-buffer-modified-p t)
(save-buffer)
@ -621,6 +631,8 @@ end of the buffer."
(define-key mu4e-compose-mode-map
(vector 'remap 'end-of-buffer) 'mu4e-compose-goto-bottom)
(provide 'mu4e-compose)
;; Load mu4e completely even when this file was loaded through

View File

@ -533,8 +533,8 @@ updates - for example when receiving new mail. See
writing mail and inherits the setup for sending mail as well.
For sending mail using @abbr{SMTP}, @t{mu4e} uses @t{smtpmail}
(@inforef{Top,,smtpmail}). This package supports many different ways to send
mail; please refer to its documentation for the details.
(@inforef{Top,,smtpmail}). This package supports many different ways to
send mail; please refer to its documentation for the details.
Here, we only provide some simple examples - for more, see @ref{Example
configurations}.
@ -3444,9 +3444,13 @@ You can drag-and-drop from your desktop; alternatively, you can use @t{dired}
@item @emph{@t{mu4e} seems to remove myself from the @t{Cc:}-list; how can I
prevent that?} Set @code{mu4e-compose-keep-self-cc} to @t{t} in your
configuration.
@item @emph{How can I start a new message-thread from a reply?} Remove the @t{In-Reply-To} header,
and @t{mu4e} automatically removes the (hidden) @t{References} header as
well when sending it. This makes the message show up as a top-level
message rather than as a response.
@item @emph{How can I sign or encrypt messages?} You can do so using @command{emacs}'
MIME-support -- check the @t{Attachments}-menu while composing a message. Also
see @ref{Signing and encrypting}.
MIME-support -- check the @t{Attachments}-menu while composing a
message. Also see @ref{Signing and encrypting}.
@item @emph{Can I use @t{BBDB} with @t{mu4e}?} Yes, with the current
(2015-06-23) development release of BBDB
@url{http://savannah.nongnu.org/projects/bbdb/}, or releases of BBDB