1 Return-Path: <sojkam1@fel.cvut.cz>
\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 CFF50431FBD
\r
6 for <notmuch@notmuchmail.org>; Tue, 2 Mar 2010 22:21:01 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.228 tagged_above=-999 required=5 tests=[AWL=0.371,
\r
12 BAYES_00=-2.599] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id VNM6MrPcOCFn for <notmuch@notmuchmail.org>;
\r
16 Tue, 2 Mar 2010 22:21:00 -0800 (PST)
\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 84B1F431FAE
\r
19 for <notmuch@notmuchmail.org>; Tue, 2 Mar 2010 22:21:00 -0800 (PST)
\r
20 Received: from localhost (unknown [192.168.200.4])
\r
21 by max.feld.cvut.cz (Postfix) with ESMTP id 6EEB619F3439;
\r
22 Wed, 3 Mar 2010 07:20:50 +0100 (CET)
\r
23 X-Virus-Scanned: IMAP AMAVIS
\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])
\r
25 by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,
\r
27 with ESMTP id CALjbjm4JaM7; Wed, 3 Mar 2010 07:20:49 +0100 (CET)
\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])
\r
29 by max.feld.cvut.cz (Postfix) with ESMTP id 1092419F3438;
\r
30 Wed, 3 Mar 2010 07:20:49 +0100 (CET)
\r
31 Received: from steelpick.localdomain (k335-30.felk.cvut.cz [147.32.86.30])
\r
32 (Authenticated sender: sojkam1)
\r
33 by imap.feld.cvut.cz (Postfix) with ESMTPSA id E6E13FA003;
\r
34 Wed, 3 Mar 2010 07:20:48 +0100 (CET)
\r
35 Received: from wsh by steelpick.localdomain with local (Exim 4.71)
\r
36 (envelope-from <sojkam1@fel.cvut.cz>)
\r
37 id 1Nmhwu-0003rL-7I; Wed, 03 Mar 2010 07:20:48 +0100
\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>
\r
39 To: Sebastian Spaeth <Sebastian@SSpaeth.de>, notmuch@notmuchmail.org
\r
40 In-Reply-To: <1267533462-15682-1-git-send-email-Sebastian@SSpaeth.de>
\r
41 References: <1267533462-15682-1-git-send-email-Sebastian@SSpaeth.de>
\r
42 Date: Wed, 03 Mar 2010 07:20:47 +0100
\r
43 Message-ID: <878waaexj4.fsf@steelpick.localdomain>
\r
45 Content-Type: text/plain; charset=us-ascii
\r
46 Subject: Re: [notmuch] [PATCH] notmuch-reply: Use a shorter 'On,
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Wed, 03 Mar 2010 06:21:02 -0000
\r
62 On Tue, 2 Mar 2010 13:37:42 +0100, Sebastian Spaeth <Sebastian@SSpaeth.de> wrote:
\r
63 > Previously, we would output:
\r
64 > 'On Thu, 25 Feb 2010 14:32:54 +0100, Sebastian Spaeth <Sebastian@SSpaeth.de> wrote:' now it is:
\r
65 > 'On 2010-02-25, Sebastian Spaeth wrote:'
\r
67 > In case we don't find a '<' (as indicator for 'Realname <email>'), we still use the whole from address.
\r
69 > Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
\r
71 > This probably shows my lack of C skills quite nicely but it does the job for me.
\r
73 > notmuch-reply.c | 21 ++++++++++++++++++---
\r
74 > 1 files changed, 18 insertions(+), 3 deletions(-)
\r
76 > diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
77 > index 98f6442..929572f 100644
\r
78 > --- a/notmuch-reply.c
\r
79 > +++ b/notmuch-reply.c
\r
80 > @@ -288,9 +288,12 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_
\r
81 > GMimeMessage *reply;
\r
82 > notmuch_messages_t *messages;
\r
83 > notmuch_message_t *message;
\r
84 > - const char *subject, *from_addr = NULL;
\r
85 > + const char *subject, *from_addr = NULL, *short_from;
\r
86 > const char *in_reply_to, *orig_references, *references;
\r
87 > char *reply_headers;
\r
89 > + struct tm *datetm;
\r
92 > for (messages = notmuch_query_search_messages (query);
\r
93 > notmuch_messages_has_more (messages);
\r
94 > @@ -346,10 +349,21 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_
\r
95 > g_object_unref (G_OBJECT (reply));
\r
98 > + date = notmuch_message_get_date(message);
\r
99 > + datetm = gmtime( &date );
\r
100 > + datestr = talloc_array(ctx, char, 11);
\r
101 > + strftime(datestr, 11, "%Y-%m-%d", datetm);
\r
103 > + /* If from contains '<' (not as first char),
\r
104 > + * only use the preceding real name */
\r
105 > + short_from = talloc_strdup(ctx, from_addr);
\r
107 I do not see, where do you assign a value to from_addr (besides the
\r