X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-mua.el;h=fcdd2d14784727af51a8d16fc3b44eee5a4bb5c3;hb=38c35f8123e203e3aea63f3d12ef219a5932fb70;hp=acb7dbf0e2202e065e31e55a64c35bad3fbc05a3;hpb=45ad21fba18730cdf76725b8a132fc52ba4190a7;p=notmuch diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index acb7dbf0..fcdd2d14 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -72,12 +72,16 @@ (setq headers (mail-header-extract))))) (forward-line 1) (setq body (buffer-substring (point) (point-max)))) - (notmuch-mua-mail (mail-header 'to headers) - (mail-header 'subject headers) - (loop for header in headers - if (not (or (eq 'to (car header)) - (eq 'subject (car header)))) - collect header)) + (let + ;; Overlay the composition window on that being used to read + ;; the original message. + ((same-window-regexps '("\\*mail .*"))) + (notmuch-mua-mail (mail-header 'to headers) + (mail-header 'subject headers) + (loop for header in headers + if (not (or (eq 'to (car header)) + (eq 'subject (car header)))) + collect header))) (message-sort-headers) (message-hide-headers) (save-excursion @@ -107,6 +111,7 @@ (message-mail to subject other-headers continue switch-function yank-action send-actions) + (message-sort-headers) (message-hide-headers)) (defun notmuch-mua-send-and-exit (&optional arg)