1 Return-Path: <sramov@pobox.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 59063431FBD
\r
6 for <notmuch@notmuchmail.org>; Tue, 15 Jul 2014 00:35:43 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.099 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 RCVD_IN_DNSWL_NONE=-0.0001, UNPARSEABLE_RELAY=0.001]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id AMRCn3e33ylZ for <notmuch@notmuchmail.org>;
\r
18 Tue, 15 Jul 2014 00:35:38 -0700 (PDT)
\r
19 Received: from smtp.pobox.com (smtp.pobox.com [208.72.237.35])
\r
20 by olra.theworths.org (Postfix) with ESMTP id 8FC86431FBC
\r
21 for <notmuch@notmuchmail.org>; Tue, 15 Jul 2014 00:35:38 -0700 (PDT)
\r
22 Received: from smtp.pobox.com (unknown [127.0.0.1])
\r
23 by pb-smtp0.pobox.com (Postfix) with ESMTP id 91CB6220C5;
\r
24 Tue, 15 Jul 2014 03:35:20 -0400 (EDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date
\r
26 :message-id:from:subject:to:cc:in-reply-to:references; s=sasl;
\r
27 bh=MiD5mCraUGQ7csJ39G8cniz20Bw=; b=WWrgXuZPNbalCewKlN+gLvPdWIl+
\r
28 6P1RR+/8gySr+JNNXGbNDhSKbCBDjfiSC4SLCSlUiYkz6s6cH3IrVuWzNY9xjADE
\r
29 tqXX2uy5jj64CGbqX/MoRT3p5AvCdBZHzIRK7AGgEM+DIj+zcESGbx0rcXqaEh3B
\r
31 DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=date:message-id
\r
32 :from:subject:to:cc:in-reply-to:references; q=dns; s=sasl; b=IyQ
\r
33 352aWJnn07cwF+ES5Dcj13okUmIRuCZ8G5JKp3/y1J4NirgabYpaAWHluugHLekG
\r
34 BupIYpb3eA4PUkUQqNQ6QhGmjgoDyzTDfA2Wp4XphBD10+4yK3FkDCDXvqINGw0q
\r
35 wTZzSy+u4Fk1Y99b4xKZioh1EX7YNOblLoQqhbUA=
\r
36 Received: from pb-smtp0.int.icgroup.com (unknown [127.0.0.1])
\r
37 by pb-smtp0.pobox.com (Postfix) with ESMTP id 85C1F220C4;
\r
38 Tue, 15 Jul 2014 03:35:20 -0400 (EDT)
\r
39 Received: from ouroboros.ramov.inet (unknown [178.218.165.9])
\r
40 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
41 (No client certificate requested)
\r
42 by pb-smtp0.pobox.com (Postfix) with ESMTPSA id 979BA220BF;
\r
43 Tue, 15 Jul 2014 03:35:14 -0400 (EDT)
\r
44 Received: from localhost (1000@localhost [local]);
\r
45 by localhost (OpenSMTPD) with ESMTPA id f57c85c6;
\r
46 Tue, 15 Jul 2014 09:35:30 +0200 (CEST)
\r
47 Date: Tue, 15 Jul 2014 09:35:30 +0200 (CEST)
\r
48 Message-Id: <702358554056882337.enqueue@ouroboros.ramov.inet>
\r
49 From: Sime Ramov <sramov@pobox.com>
\r
50 Subject: Re: notmuch-reply date format
\r
51 To: Austin Clements <amdragon@MIT.EDU>
\r
52 In-Reply-To: <20140714130431.GB4660@mit.edu>
\r
53 References: <1722345767858996112.enqueue@ouroboros.ramov.inet>
\r
54 <20140714130431.GB4660@mit.edu>
\r
56 8FB27B22-0BF2-11E4-BBE4-9903E9FBB39C-45584858!pb-smtp0.pobox.com
\r
57 Cc: notmuch@notmuchmail.org
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Tue, 15 Jul 2014 07:35:43 -0000
\r
74 * Austin Clements <amdragon@MIT.EDU> [Mon, 14 Jul 2014 09:04:31 -0400]:
\r
75 > Assuming the CLI is the right place for you to change this, you
\r
76 > probably want to call notmuch_message_get_date, then localtime, then
\r
79 Tried to get this working to no avail. Not a programmer obviously :) I
\r
80 cobbled this together from various online sources:
\r
82 diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
83 index 7c1c809..16cf19c 100644
\r
84 --- a/notmuch-reply.c
\r
85 +++ b/notmuch-reply.c
\r
86 @@ -44,9 +44,15 @@ format_part_reply (mime_node_t *node)
\r
89 if (node->envelope_file) {
\r
90 - printf ("On %s, %s wrote:\n",
\r
91 - notmuch_message_get_header (node->envelope_file, "date"),
\r
92 - notmuch_message_get_header (node->envelope_file, "from"));
\r
96 + info = localtime(notmuch_message_get_date(node->envelope_file));
\r
98 + strftime(dbuf, sizeof(dbuf), "%F %R %z", info);
\r
99 + printf ("* %s [%s]:\n",
\r
100 + notmuch_message_get_header(node->envelope_file, "from"), dbuf);
\r
102 } else if (GMIME_IS_MESSAGE (node->part)) {
\r
103 GMimeMessage *message = GMIME_MESSAGE (node->part);
\r
104 InternetAddressList *recipients;
\r
106 When compiling I get this warning:
\r
108 notmuch-reply.c: In function 'format_part_reply':
\r
109 notmuch-reply.c:50: warning: passing argument 1 of 'localtime' makes pointer from integer without a cast
\r
111 And a core dump when notmuch reply is invoked on a message. Am I even
\r