Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / dc / b1f3b00403b06fdceb07be0f4cd3b3f73d28d1
1 Return-Path: <awg@lagos.xvx.ca>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 9D7BE431FAF\r
6         for <notmuch@notmuchmail.org>; Fri,  3 Feb 2012 16:32:39 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id T+GRyGPNf1g9 for <notmuch@notmuchmail.org>;\r
16         Fri,  3 Feb 2012 16:32:39 -0800 (PST)\r
17 Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10])\r
18         by olra.theworths.org (Postfix) with ESMTP id 0A48D431FAE\r
19         for <notmuch@notmuchmail.org>; Fri,  3 Feb 2012 16:32:38 -0800 (PST)\r
20 Received: from pd2ml1so-ssvc.prod.shaw.ca ([10.0.141.139])\r
21         by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 03 Feb 2012 17:32:37 -0700\r
22 X-Cloudmark-SP-Filtered: true\r
23 X-Cloudmark-SP-Result: v=1.1 cv=2TvZ7eE48NdEYeaL5Xf58dNzJU178UzT+2lxUZ5Mhss=\r
24         c=1 sm=1\r
25         a=MH2TWjp3dmsA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
26         a=m9MuwA_Wz9pqlhpKPbkA:9 a=XuiGcvX9-2D4EZ-nJk0A:7\r
27         a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
28 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
29         by pd2ml1so-dmz.prod.shaw.ca with ESMTP; 03 Feb 2012 17:32:37 -0700\r
30 Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
31         id B720E800C338; Fri,  3 Feb 2012 17:32:36 -0700 (MST)\r
32 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
33 To: notmuch@notmuchmail.org\r
34 Subject: [PATCH 0/2] Bug and potential fix: forwarded messages\r
35 Date: Fri,  3 Feb 2012 17:32:31 -0700\r
36 Message-Id: <1328315554-16085-1-git-send-email-awg+notmuch@xvx.ca>\r
37 X-Mailer: git-send-email 1.7.5.4\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Sat, 04 Feb 2012 00:32:39 -0000\r
51 \r
52 Hi everyone,\r
53 \r
54 I encountered today a bug that I remember being mentioned on IRC where\r
55 some messages are shown in emacs as completely empty, even though their\r
56 content is present and simple. For me, the bug shows up with messages that\r
57 have been forwarded by an Outlook user who didn't add any content to the top\r
58 of the message. The first line of the message is "-----Original Message-----",\r
59 and the rest is the forwarded text. Notmuch tries to collapse the forwarded\r
60 content into a button, but fails mysteriously.\r
61 \r
62 The first patch in this series adds a test (marked as broken) that demonstrates\r
63 the bug. I think this should be pushed regardless of whether my solution is\r
64 the right one. My solution is to check whether we're collapsing the entire\r
65 message before doing so, and avoid turning it into a button if that's the case.\r
66 I think this is a desirable behavior, since if someone has forwarded a message\r
67 without adding anything the user probably wants to read that message. But,\r
68 I'll admit that I didn't figure out the real cause of the problem, and I\r
69 would be happy to hear other suggestions.\r
70 \r
71 It also occurs to me that this might indicate a bigger problem with how\r
72 notmuch-wash.el handles messages starting with "-----Original Message-----".\r
73 Notmuch seems to assume that this indicates the rest of the message is quoted\r
74 stuff that's been top-posted on. In my office this isn't necessarily the case,\r
75 since Outlook produces that line at the top of every reply, and it's up to\r
76 the user whether to top-post or not (and not everyone does).\r
77 \r
78 I'll have to experiment a bit more to verify whether a problem (i.e. whether\r
79 Notmuch hides inappropriate things when someone replies inline with Outlook).\r
80 Someone please correct me if I'm missing something in how the code operates.\r
81 \r
82 Adam Wolfe Gordon (2):\r
83   test: Add broken test for showing forwarded messages\r
84   emacs: Fix broken showing of forwarded messages.\r
85 \r
86  emacs/notmuch-wash.el |    5 +++--\r
87  test/emacs            |   32 ++++++++++++++++++++++++++++++++\r
88  2 files changed, 35 insertions(+), 2 deletions(-)\r
89 \r
90 -- \r
91 1.7.5.4\r
92 \r