]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Suppress window creation when replying
authorDavid Edmondson <dme@dme.org>
Mon, 26 Apr 2010 11:19:10 +0000 (12:19 +0100)
committerCarl Worth <cworth@cworth.org>
Mon, 26 Apr 2010 14:15:42 +0000 (07:15 -0700)
The buffer used to edit a reply should overlay the original
message. Encourage this by setting `same-window-regexps' locally.

emacs/notmuch-mua.el

index acb7dbf0e2202e065e31e55a64c35bad3fbc05a3..e9b76f103c01d832bb3bd9eaae84dba047f28f4e 100644 (file)
              (setq headers (mail-header-extract)))))
       (forward-line 1)
       (setq body (buffer-substring (point) (point-max))))
              (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
     (message-sort-headers)
     (message-hide-headers)
     (save-excursion