[PATCH 2/2] emacs: Fix broken showing of forwarded messages.
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Sat, 4 Feb 2012 00:32:33 +0000 (17:32 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:03 +0000 (09:44 -0800)
dc/6c0cd91ce6a44feb5e6ce6d985dec18dd7dfd9 [new file with mode: 0644]

diff --git a/dc/6c0cd91ce6a44feb5e6ce6d985dec18dd7dfd9 b/dc/6c0cd91ce6a44feb5e6ce6d985dec18dd7dfd9
new file mode 100644 (file)
index 0000000..66c996e
--- /dev/null
@@ -0,0 +1,91 @@
+Return-Path: <awg@lagos.xvx.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 6B16D431FB6\r
+       for <notmuch@notmuchmail.org>; Fri,  3 Feb 2012 16:32:45 -0800 (PST)\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\r
+       tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 n5CcAG3Kmz1H for <notmuch@notmuchmail.org>;\r
+       Fri,  3 Feb 2012 16:32:44 -0800 (PST)\r
+Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10])\r
+       by olra.theworths.org (Postfix) with ESMTP id F18B1431FBD\r
+       for <notmuch@notmuchmail.org>; Fri,  3 Feb 2012 16:32:41 -0800 (PST)\r
+Received: from pd2ml1so-ssvc.prod.shaw.ca ([10.0.141.139])\r
+       by pd3mo1so-svcs.prod.shaw.ca with ESMTP; 03 Feb 2012 17:32:40 -0700\r
+X-Cloudmark-SP-Filtered: true\r
+X-Cloudmark-SP-Result: v=1.1 cv=2TvZ7eE48NdEYeaL5Xf58dNzJU178UzT+2lxUZ5Mhss=\r
+       c=1 sm=1\r
+       a=OhxnqyL4MJ8A:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
+       a=ZXeQhi9146TlpB7tSjEA:9 a=4ze6sY0TZOHs7T6yz-IA:7\r
+       a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
+Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
+       by pd2ml1so-dmz.prod.shaw.ca with ESMTP; 03 Feb 2012 17:32:40 -0700\r
+Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
+       id 9B2C1800C338; Fri,  3 Feb 2012 17:32:40 -0700 (MST)\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] emacs: Fix broken showing of forwarded messages.\r
+Date: Fri,  3 Feb 2012 17:32:33 -0700\r
+Message-Id: <1328315554-16085-3-git-send-email-awg+notmuch@xvx.ca>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <1328315554-16085-1-git-send-email-awg+notmuch@xvx.ca>\r
+References: <1328315554-16085-1-git-send-email-awg+notmuch@xvx.ca>\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: Sat, 04 Feb 2012 00:32:45 -0000\r
+\r
+Fix the bug in showing forwarded messages with no new text by not\r
+hiding "original" messages if they are the entire message.\r
+---\r
+ emacs/notmuch-wash.el |    5 +++--\r
+ test/emacs            |    1 -\r
+ 2 files changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el\r
+index 67143e5..2fe9e5d 100644\r
+--- a/emacs/notmuch-wash.el\r
++++ b/emacs/notmuch-wash.el\r
+@@ -176,8 +176,9 @@ insert before the button, probably for indentation."\r
+       (let* ((msg-start (match-beginning 0))\r
+            (msg-end (point-max))\r
+            (msg-lines (count-lines msg-start msg-end)))\r
+-      (notmuch-wash-region-to-button\r
+-       msg msg-start msg-end "original" "\n")))\r
++      (when (< msg-lines (count-lines (point-min) (point-max)))\r
++        (notmuch-wash-region-to-button\r
++         msg msg-start msg-end "original" "\n"))))\r
+   (while (and (< (point) (point-max))\r
+             (re-search-forward notmuch-wash-citation-regexp nil t))\r
+     (let* ((cite-start (match-beginning 0))\r
+diff --git a/test/emacs b/test/emacs\r
+index b8b13a7..52683dd 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -350,7 +350,6 @@ Thanks for the advice! I will be sure to put it to good use.\r
+ test_expect_equal_file OUTPUT EXPECTED\r
+ \r
+ test_begin_subtest "Non-hiding of forwarded message with no new text"\r
+-test_subtest_known_broken\r
+ add_message [id]=forwarded-top-post \\r
+           '[subject]="FW: The problem with top-posting"' \\r
+           '[body]="\r
+-- \r
+1.7.5.4\r
+\r