solution to gnus-alias problems?
authorDavid Bremner <bremner@debian.org>
Mon, 1 Oct 2012 00:57:50 +0000 (21:57 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:40 +0000 (09:49 -0800)
bd/c515670d9d0b3a2a59eae51673f61225782b5f [new file with mode: 0644]

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