[PATCH] emacs: Suppress window creation when replying
authorDavid Edmondson <dme@dme.org>
Mon, 26 Apr 2010 11:19:10 +0000 (12:19 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:54 +0000 (09:36 -0800)
2f/e446134a3654bc19a4d1da1325ea9158bb2121 [new file with mode: 0644]

diff --git a/2f/e446134a3654bc19a4d1da1325ea9158bb2121 b/2f/e446134a3654bc19a4d1da1325ea9158bb2121
new file mode 100644 (file)
index 0000000..6eb88ed
--- /dev/null
@@ -0,0 +1,88 @@
+Return-Path: <dme@dme.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id B518F4196F0\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 04:19:04 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.9\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9] autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id jWYotvtDpjkl for <notmuch@notmuchmail.org>;\r
+       Mon, 26 Apr 2010 04:19:04 -0700 (PDT)\r
+Received: from mail-ww0-f53.google.com (mail-ww0-f53.google.com\r
+ [74.125.82.53])       by olra.theworths.org (Postfix) with ESMTP id C8C2D431FC1       for\r
+ <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 04:19:03 -0700 (PDT)\r
+Received: by wwi18 with SMTP id 18so337711wwi.26\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 04:19:02 -0700 (PDT)\r
+Received: by 10.216.89.142 with SMTP id c14mr1184547wef.55.1272280742670;\r
+       Mon, 26 Apr 2010 04:19:02 -0700 (PDT)\r
+Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com\r
+       [83.217.165.81])\r
+       by mx.google.com with ESMTPS id r29sm874236wbv.21.2010.04.26.04.19.01\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Mon, 26 Apr 2010 04:19:01 -0700 (PDT)\r
+Received: by ut.hh.sledj.net (Postfix, from userid 1000)\r
+       id 3DA6659413B; Mon, 26 Apr 2010 12:19:12 +0100 (BST)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: Suppress window creation when replying\r
+Date: Mon, 26 Apr 2010 12:19:10 +0100\r
+Message-Id: <1272280750-3619-1-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 1.7.0\r
+In-Reply-To: <87ljcchnfc.fsf@yoom.home.cworth.org>\r
+References: <87ljcchnfc.fsf@yoom.home.cworth.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 26 Apr 2010 11:19:04 -0000\r
+\r
+The buffer used to edit a reply should overlay the original\r
+message. Encourage this by setting `same-window-regexps' locally.\r
+---\r
+ emacs/notmuch-mua.el |   16 ++++++++++------\r
+ 1 files changed, 10 insertions(+), 6 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index 305275e..b69e31c 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -73,12 +73,16 @@\r
+             (setq headers (mail-header-extract)))))\r
+       (forward-line 1)\r
+       (setq body (buffer-substring (point) (point-max))))\r
+-    (notmuch-mua-mail (mail-header 'to headers)\r
+-                    (mail-header 'subject headers)\r
+-                    (loop for header in headers\r
+-                          if (not (or (eq 'to (car header))\r
+-                                      (eq 'subject (car header))))\r
+-                          collect header))\r
++    (let\r
++      ;; Overlay the composition window on that being used to read\r
++      ;; the original message.\r
++      ((same-window-regexps '("\\*mail .*")))\r
++      (notmuch-mua-mail (mail-header 'to headers)\r
++                      (mail-header 'subject headers)\r
++                      (loop for header in headers\r
++                            if (not (or (eq 'to (car header))\r
++                                        (eq 'subject (car header))))\r
++                            collect header)))\r
+     (message-sort-headers)\r
+     (message-hide-headers)\r
+     (save-excursion\r
+-- \r
+1.7.0\r
+\r