From 3d89938f131c384f816d0f882ea70e07b51df2bd Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 1 Oct 2012 21:57:50 +2100 Subject: [PATCH] solution to gnus-alias problems? --- bd/c515670d9d0b3a2a59eae51673f61225782b5f | 107 ++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 bd/c515670d9d0b3a2a59eae51673f61225782b5f diff --git a/bd/c515670d9d0b3a2a59eae51673f61225782b5f b/bd/c515670d9d0b3a2a59eae51673f61225782b5f new file mode 100644 index 000000000..113767163 --- /dev/null +++ b/bd/c515670d9d0b3a2a59eae51673f61225782b5f @@ -0,0 +1,107 @@ +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 BB171431FBC + for ; Sun, 30 Sep 2012 17:57:58 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +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 QWQXTs+HVRPx for ; + Sun, 30 Sep 2012 17:57:57 -0700 (PDT) +Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) + (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 18B5E431FAE + for ; Sun, 30 Sep 2012 17:57:57 -0700 (PDT) +Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net + ([156.34.89.108] helo=zancas.localnet) + by tesseract.cs.unb.ca with esmtpsa + (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) + (envelope-from ) + id 1TIUKa-0004Ut-2b; Sun, 30 Sep 2012 21:57:56 -0300 +Received: from bremner by zancas.localnet with local (Exim 4.80) + (envelope-from ) + id 1TIUKU-0002uY-LG; Sun, 30 Sep 2012 21:57:50 -0300 +From: David Bremner +To: 687390@bugs.debian.org +Subject: solution to gnus-alias problems? +User-Agent: Notmuch/0.14+37~gf227d63 (http://notmuchmail.org) Emacs/24.1.1 + (x86_64-pc-linux-gnu) +Date: Sun, 30 Sep 2012 21:57:50 -0300 +Message-ID: <87pq53xb3l.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +X-Spam_bar: - +Cc: notmuch@notmuchmail.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, 01 Oct 2012 00:57:58 -0000 + + +Geoff writes: + + Hi David, + + I've found the source of the problem I was having. It seems to be due + to some interference with the notmuch-mua-reply function and + gnus-alias. In particular, there was a problem with the part of + notmuch-mua-reply that inserted the newly setup message contents. + + Towards the end of the notmuch-mua-reply function, there is the following code: + + ;; insert the message body - but put it in front of the signature + ;; if one is present + (goto-char (point-max)) + * (if (re-search-backward message-signature-separator nil t) + * (forward-line -1) + (goto-char (point-max))) + (insert body) + (push-mark)) + (set-buffer-modified-p nil) + + The problem is with the two lines I've marked with a *. Suppose the + main message reply buffer already contains a signature and looks like + this + + [Headers] + --text follows this line + -- + [Signature text] + + The above goes goes to the end of buffer with (point-max), then + searches back to the beginning of the signature separator, which is + fine. But then it moves one line up to the beginning of '--text + follows this line--" and then inserts the newly created message body, + which means that it inserts it before the '--text follows this + line--'. + + I've solved the problem (I think) by adjust the above code as follows: + + (if (re-search-backward message-signature-separator nil t) + (progn + (beginning-of-line) + (newline)) + (goto-char (point-max))) + + Hope this helps! + + Best, + + Geoffrey + -- 2.26.2