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