1 Return-Path: <peterjohnhartman@gmail.com>
\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 71200431FB6
\r
6 for <notmuch@notmuchmail.org>; Wed, 2 Feb 2011 15:46:53 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id iM5V7pNrqSy0 for <notmuch@notmuchmail.org>;
\r
17 Wed, 2 Feb 2011 15:46:53 -0800 (PST)
\r
18 Received: from mail-vw0-f53.google.com (mail-vw0-f53.google.com
\r
19 [209.85.212.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id D6E09431FB5
\r
22 for <notmuch@notmuchmail.org>; Wed, 2 Feb 2011 15:46:52 -0800 (PST)
\r
23 Received: by vws8 with SMTP id 8so297207vws.26
\r
24 for <notmuch@notmuchmail.org>; Wed, 02 Feb 2011 15:46:49 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=domainkey-signature:date:from:to:subject:message-id:mime-version
\r
27 :content-type:content-disposition:user-agent;
\r
28 bh=cDXfv2iI/fYiBtoxRgublqS7IzcU9qJTdVJv6lk1EU4=;
\r
29 b=X2mVb8yUOgF9o/177/oMBSroVr4RnUGHKqV1EbS63K1YRMdHEMlNg/f+Ms+HN9F5bS
\r
30 KYKItC2RcbNyj+I62eajwD4GGOKLGeLbTXLlEUvmlTDkSFchYyeAhL0SBxwLKWHBvFn+
\r
31 Yn0GwMDo3eH3I33SfEU/+8M2crcmfJnb6LJdg=
\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
33 h=date:from:to:subject:message-id:mime-version:content-type
\r
34 :content-disposition:user-agent;
\r
35 b=NmxKGSb+UZKi6V6kVzLdgRPaSex5mT/r4LZJ08dGVL0aPbP/rR+DjofkwjPNB73gT3
\r
36 Msfr2COJ7WldfI80v+b0rizNalnhQZP7n0Is8WC4A5IvF+tdrs2JoHfE9ttzHJwjNQB6
\r
37 mKAUObOJPgTR/nPmQ27dPW65dC8LrVHyw7Yq8=
\r
38 Received: by 10.220.200.13 with SMTP id eu13mr2461918vcb.148.1296690408254;
\r
39 Wed, 02 Feb 2011 15:46:48 -0800 (PST)
\r
40 Received: from localhost (user132-198.wireless.utoronto.ca [142.1.132.198])
\r
41 by mx.google.com with ESMTPS id e18sm126198vbm.15.2011.02.02.15.46.46
\r
42 (version=SSLv3 cipher=RC4-MD5); Wed, 02 Feb 2011 15:46:47 -0800 (PST)
\r
43 Date: Wed, 2 Feb 2011 18:47:19 -0500
\r
44 From: Peter John Hartman <peterjohnhartman@gmail.com>
\r
45 To: notmuch@notmuchmail.org
\r
46 Subject: [PATCH] Have --format=mbox insert Status:
\r
47 Message-ID: <20110202234719.GA28241@triltoucheee.wireless.utoronto.ca>
\r
49 Content-Type: text/plain; charset=us-ascii
\r
50 Content-Disposition: inline
\r
51 User-Agent: Mutt/1.5.20 (2009-06-14)
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Wed, 02 Feb 2011 23:46:53 -0000
\r
68 This is not a complete patch, but should give you an idea. (It works well
\r
69 enough for me, but I think it could do more).
\r
71 diff --git a/notmuch-show.c b/notmuch-show.c
\r
72 index ef421ec..dff66de 100644
\r
73 --- a/notmuch-show.c
\r
74 +++ b/notmuch-show.c
\r
75 @@ -272,6 +272,12 @@ format_message_mbox (const void *ctx,
\r
77 printf ("From %s %s", from, date_asctime);
\r
79 + if (strstr(_get_tags_as_string(ctx,message),"unread") != NULL) {
\r
80 + printf ("Status: O\n");
\r
82 + printf ("Status: RO\n");
\r
85 while ((line_len = getline (&line, &line_size, file)) != -1 ) {
\r
86 if (_is_from_line (line))
\r
89 It could, for instance, insert X-Status: AFTD flags, maybe, and it could be
\r
90 a little more sensitive about O. Maybe if tag is "new" it won't put the O
\r
91 there, but I wasn't sure.
\r
93 Anyway, this is chiefly useful for me and others who use the mbox format.
\r
94 For instance, I combine notmuch with mutt as follows:
\r
96 notmuch show --format=mbox $(notmuch search thread:xxx | cut -d' ' -f1) >
\r
97 tmp.mbox && mutt -f tmp.mbox && rm -f tmp.mbox
\r
104 sic dicit magister P
\r
106 Collaborative Programme in Ancient and Medieval Philosophy
\r
107 University of Toronto
\r
108 http://individual.utoronto.ca/peterjh
\r