Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B518F4196F0 for ; Mon, 26 Apr 2010 04:19:04 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jWYotvtDpjkl for ; Mon, 26 Apr 2010 04:19:04 -0700 (PDT) Received: from mail-ww0-f53.google.com (mail-ww0-f53.google.com [74.125.82.53]) by olra.theworths.org (Postfix) with ESMTP id C8C2D431FC1 for ; Mon, 26 Apr 2010 04:19:03 -0700 (PDT) Received: by wwi18 with SMTP id 18so337711wwi.26 for ; Mon, 26 Apr 2010 04:19:02 -0700 (PDT) Received: by 10.216.89.142 with SMTP id c14mr1184547wef.55.1272280742670; Mon, 26 Apr 2010 04:19:02 -0700 (PDT) Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com [83.217.165.81]) by mx.google.com with ESMTPS id r29sm874236wbv.21.2010.04.26.04.19.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 04:19:01 -0700 (PDT) Received: by ut.hh.sledj.net (Postfix, from userid 1000) id 3DA6659413B; Mon, 26 Apr 2010 12:19:12 +0100 (BST) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH] emacs: Suppress window creation when replying Date: Mon, 26 Apr 2010 12:19:10 +0100 Message-Id: <1272280750-3619-1-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.0 In-Reply-To: <87ljcchnfc.fsf@yoom.home.cworth.org> References: <87ljcchnfc.fsf@yoom.home.cworth.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2010 11:19:04 -0000 The buffer used to edit a reply should overlay the original message. Encourage this by setting `same-window-regexps' locally. --- emacs/notmuch-mua.el | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 305275e..b69e31c 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -73,12 +73,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 -- 1.7.0