Re: [PATCH v6 1/3] emacs: `notmuch-show-get-message-id': optionally return Message...
authorPieter Praet <pieter@praet.org>
Thu, 1 Mar 2012 17:12:12 +0000 (18:12 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:07 +0000 (09:45 -0800)
73/f405f18b6bceb845915d5164f077e347bac8f2 [new file with mode: 0644]

diff --git a/73/f405f18b6bceb845915d5164f077e347bac8f2 b/73/f405f18b6bceb845915d5164f077e347bac8f2
new file mode 100644 (file)
index 0000000..ad40efb
--- /dev/null
@@ -0,0 +1,148 @@
+Return-Path: <pieter@praet.org>\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 C728B431FD7\r
+       for <notmuch@notmuchmail.org>; Thu,  1 Mar 2012 09:14:41 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 TUOD76Gllg8Q for <notmuch@notmuchmail.org>;\r
+       Thu,  1 Mar 2012 09:14:41 -0800 (PST)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ B92D7431FAE   for <notmuch@notmuchmail.org>; Thu,  1 Mar 2012 09:14:40 -0800\r
+ (PST)\r
+Received: by wgbdt12 with SMTP id dt12so28549wgb.2\r
+       for <notmuch@notmuchmail.org>; Thu, 01 Mar 2012 09:14:38 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
+       10.180.99.100 as permitted sender) client-ip=10.180.99.100; \r
+Authentication-Results: mr.google.com;\r
+       spf=pass (google.com: domain of pieter@praet.org\r
+       designates 10.180.99.100 as permitted sender)\r
+       smtp.mail=pieter@praet.org\r
+Received: from mr.google.com ([10.180.99.100])\r
+       by 10.180.99.100 with SMTP id ep4mr12863236wib.7.1330622078265\r
+       (num_hops = 1); Thu, 01 Mar 2012 09:14:38 -0800 (PST)\r
+Received: by 10.180.99.100 with SMTP id ep4mr10308714wib.7.1330622077970;\r
+       Thu, 01 Mar 2012 09:14:37 -0800 (PST)\r
+Received: from localhost ([109.131.111.80])\r
+       by mx.google.com with ESMTPS id df3sm43051920wib.1.2012.03.01.09.14.36\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Thu, 01 Mar 2012 09:14:36 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: David Bremner <david@tethera.net>\r
+Subject: Re: [PATCH v6 1/3] emacs: `notmuch-show-get-message-id': optionally\r
+       return Message-Id sans prefix\r
+In-Reply-To: <87399tbzmx.fsf@zancas.localnet>\r
+References: <1327397873-20596-1-git-send-email-dme@dme.org>\r
+       <1329684627-10708-1-git-send-email-pieter@praet.org>\r
+       <1329684627-10708-2-git-send-email-pieter@praet.org>\r
+       <87ehtjj7s6.fsf@zancas.localnet> <87hayaol8b.fsf@praet.org>\r
+       <87399tbzmx.fsf@zancas.localnet>\r
+User-Agent: Notmuch/0.11.1+210~g6afc43e (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-unknown-linux-gnu)\r
+Date: Thu, 01 Mar 2012 18:12:12 +0100\r
+Message-ID: <87obsgmej7.fsf@praet.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQkVxhK1105wvA+mSDJlXCWq4DWInfv5zYXeiIKVlWOPLNGwxJK8i8a6172qn/63jrbK9biM\r
+Cc: Notmuch Mail <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: Thu, 01 Mar 2012 17:14:41 -0000\r
+\r
+On Wed, 29 Feb 2012 08:19:34 -0400, David Bremner <david@tethera.net> wrote:\r
+> On Tue, 28 Feb 2012 19:40:04 +0100, Pieter Praet <pieter@praet.org> wrote:\r
+> > \r
+> > Though I couldn't help but notice (it's a curse...) that patch #3\r
+> > seems to have gained an extra space in its commit message subject:\r
+> > \r
+> >   Original (id:"1329684627-10708-4-git-send-email-pieter@praet.org"):\r
+> >     emacs: add `notmuch-show-stash-mlarchive-link{,-and-go}'\r
+> >                                                   ^\r
+> \r
+> I don't have any applypatch-msg hook. I am using \r
+>   "notmuch show --format=raw $messageid | git am -" to\r
+> apply the patch.  \r
+> \r
+> I looked at the file on disk, and something is wrapping the subject\r
+> there.  Perhaps somebody's unwrapping code is buggy? I'm not sure what's\r
+> at fault here; [...]\r
+\r
+TL;DR:  Doesn't seem like there's much we can do about it...\r
+\r
+\r
+According to RFC 2822 section 2.2.3 [1], header fields should be folded\r
+by inserting a CRLF right before the last whitespace char before the\r
+line exceeds 78 characters, and when a field contains comma-separated\r
+values (which is somewhat applicable in this case), it should be folded\r
+by inserting a CRLF right after a comma.\r
+\r
+Now, the issue is that unfolding is accomplished by simply removing any\r
+CRLF that is immediately followed by a whitespace char:\r
+\r
+If the subject headers of those patches were folded by simply inserting\r
+a CRLF, they couldn't possibly be unfolded again as there wouldn't be a\r
+whitespace char right after the CRLF, so Mailman seems to have helpfully\r
+inserted a tab...\r
+\r
+\r
+Here's one of those patches at a number of archives:\r
+\r
+- http://notmuchmail.org/pipermail/notmuch/2012/009575.html\r
+- http://mid.gmane.org/1329684627-10708-4-git-send-email-pieter@praet.org\r
+- http://mail-archive.com/search?l=mid&q=1329684627-10708-4-git-send-email-pieter@praet.org\r
+\r
+As you can see (in the source of those pages), both Pipermail and Gmane\r
+unfold the subject header by simply removing the line break, and at The\r
+Mail Archive, the tab is also replaced by a space.  I assume the latter\r
+also happens in gmime ?\r
+\r
+\r
+So, I guess I'll just have to learn to live with it... :)\r
+\r
+\r
+> [...] maybe you could experiment with applying the the patches\r
+> from the list and let me know if e.g. going from files is better than\r
+> using "notmuch show --format=raw".\r
+>\r
+\r
+Based on my (admittedly very superficial) analysis of the problem,\r
+that won't do us any good wrt this issue, unfortunately...\r
+\r
+But it *would* buy us a (slight) performance increase, so if/when my\r
+patch to `notmuch-show-mapc' [2] goes in, we might want to consider\r
+making `notmuch-show-pipe-message' use `notmuch-show-get-filename'\r
+instead of `notmuch-show-get-message-{id,ids-for-open-messages}'.\r
+\r
+\r
+> d\r
+> \r
+> \r
+\r
+\r
+Peace\r
+\r
+-- \r
+Pieter\r
+\r
+[1] http://tools.ietf.org/html/rfc2822.html#section-2.2.3\r
+[2] id:"1330122640-18895-5-git-send-email-pieter@praet.org"\r