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 9D7BE431FAF for ; Fri, 3 Feb 2012 16:32:39 -0800 (PST) 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=[RCVD_IN_DNSWL_NONE=-0.0001] 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 T+GRyGPNf1g9 for ; Fri, 3 Feb 2012 16:32:39 -0800 (PST) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by olra.theworths.org (Postfix) with ESMTP id 0A48D431FAE for ; Fri, 3 Feb 2012 16:32:38 -0800 (PST) Received: from pd2ml1so-ssvc.prod.shaw.ca ([10.0.141.139]) by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 03 Feb 2012 17:32:37 -0700 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=2TvZ7eE48NdEYeaL5Xf58dNzJU178UzT+2lxUZ5Mhss= c=1 sm=1 a=MH2TWjp3dmsA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17 a=m9MuwA_Wz9pqlhpKPbkA:9 a=XuiGcvX9-2D4EZ-nJk0A:7 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56]) by pd2ml1so-dmz.prod.shaw.ca with ESMTP; 03 Feb 2012 17:32:37 -0700 Received: by lagos.xvx.ca (Postfix, from userid 1000) id B720E800C338; Fri, 3 Feb 2012 17:32:36 -0700 (MST) From: Adam Wolfe Gordon To: notmuch@notmuchmail.org Subject: [PATCH 0/2] Bug and potential fix: forwarded messages Date: Fri, 3 Feb 2012 17:32:31 -0700 Message-Id: <1328315554-16085-1-git-send-email-awg+notmuch@xvx.ca> X-Mailer: git-send-email 1.7.5.4 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: Sat, 04 Feb 2012 00:32:39 -0000 Hi everyone, I encountered today a bug that I remember being mentioned on IRC where some messages are shown in emacs as completely empty, even though their content is present and simple. For me, the bug shows up with messages that have been forwarded by an Outlook user who didn't add any content to the top of the message. The first line of the message is "-----Original Message-----", and the rest is the forwarded text. Notmuch tries to collapse the forwarded content into a button, but fails mysteriously. The first patch in this series adds a test (marked as broken) that demonstrates the bug. I think this should be pushed regardless of whether my solution is the right one. My solution is to check whether we're collapsing the entire message before doing so, and avoid turning it into a button if that's the case. I think this is a desirable behavior, since if someone has forwarded a message without adding anything the user probably wants to read that message. But, I'll admit that I didn't figure out the real cause of the problem, and I would be happy to hear other suggestions. It also occurs to me that this might indicate a bigger problem with how notmuch-wash.el handles messages starting with "-----Original Message-----". Notmuch seems to assume that this indicates the rest of the message is quoted stuff that's been top-posted on. In my office this isn't necessarily the case, since Outlook produces that line at the top of every reply, and it's up to the user whether to top-post or not (and not everyone does). I'll have to experiment a bit more to verify whether a problem (i.e. whether Notmuch hides inappropriate things when someone replies inline with Outlook). Someone please correct me if I'm missing something in how the code operates. Adam Wolfe Gordon (2): test: Add broken test for showing forwarded messages emacs: Fix broken showing of forwarded messages. emacs/notmuch-wash.el | 5 +++-- test/emacs | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) -- 1.7.5.4