From: David Edmondson Date: Mon, 26 Apr 2010 11:19:10 +0000 (+0100) Subject: emacs: Suppress window creation when replying X-Git-Tag: 0.3~67 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=47f5871aff404990cb059b3da9976971da922b00 emacs: Suppress window creation when replying The buffer used to edit a reply should overlay the original message. Encourage this by setting `same-window-regexps' locally. --- diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index acb7dbf0..e9b76f10 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