From 029c4d9502c01b428348e984498ed96e2cd4a280 Mon Sep 17 00:00:00 2001 From: Sime Ramov Date: Mon, 14 Jul 2014 14:28:14 +0200 Subject: [PATCH] notmuch-reply date format --- c1/e2582ed43af550a07262d56d1f6d0a96f149da | 100 ++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 c1/e2582ed43af550a07262d56d1f6d0a96f149da diff --git a/c1/e2582ed43af550a07262d56d1f6d0a96f149da b/c1/e2582ed43af550a07262d56d1f6d0a96f149da new file mode 100644 index 000000000..7a81c33e9 --- /dev/null +++ b/c1/e2582ed43af550a07262d56d1f6d0a96f149da @@ -0,0 +1,100 @@ +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 55B59431FBD + for ; Mon, 14 Jul 2014 05:37:40 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.099 +X-Spam-Level: +X-Spam-Status: No, score=-0.099 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + RCVD_IN_DNSWL_NONE=-0.0001, UNPARSEABLE_RELAY=0.001] + 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 oXgqHatSp8an for ; + Mon, 14 Jul 2014 05:37:34 -0700 (PDT) +X-Greylist: delayed 549 seconds by postgrey-1.32 at olra; + Mon, 14 Jul 2014 05:37:34 PDT +Received: from smtp.pobox.com (smtp.pobox.com [208.72.237.35]) + by olra.theworths.org (Postfix) with ESMTP id BFF79431FBC + for ; Mon, 14 Jul 2014 05:37:34 -0700 (PDT) +Received: from smtp.pobox.com (unknown [127.0.0.1]) + by pb-smtp0.pobox.com (Postfix) with ESMTP id 4DD5A23F35 + for ; Mon, 14 Jul 2014 08:28:05 -0400 (EDT) +DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date + :message-id:from:subject:to; s=sasl; bh=ifwtpUL9goCkscCGta9z7byY + HFw=; b=arwQknaSxMKkucYdpQ1qt2rDms89A9Hugk4IwuGp/3KGbmcPAWkqlVU0 + +rSXCDUUgAg7U6KckbmerNUfcFALnKcu3ttnC2wjUKfyDkT/AltLzC54QotkSHyu + ddcxemRpVd6r31WCmNrgJJxpZlRRp55YfDcrPMtEdCcyVpgQB/I= +DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=date:message-id + :from:subject:to; q=dns; s=sasl; b=qoydZDIuzLlQ9YxvWU+c7Q+Fw6gEN + kcqfUAzlz0ayEdMWlLyBvoM/+5MB2LxZ3GV2pldUj51RPXjnA5tj8yaN3cKmXutC + E0l+zwTnZl/ScY+NUYWYLmSuybJTZAelBrP7MPKNvrWeKOJM0OBj3Q0kxn+EMNxA + RL1prnC+TZAgQQ= +Received: from pb-smtp0.int.icgroup.com (unknown [127.0.0.1]) + by pb-smtp0.pobox.com (Postfix) with ESMTP id 44B8123F34 + for ; Mon, 14 Jul 2014 08:28:05 -0400 (EDT) +Received: from ouroboros.ramov.inet (unknown [178.218.165.9]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by pb-smtp0.pobox.com (Postfix) with ESMTPSA id E22FA23F25 + for ; Mon, 14 Jul 2014 08:27:58 -0400 (EDT) +Received: from localhost (1000@localhost [local]); + by localhost (OpenSMTPD) with ESMTPA id c8fc1cbc; + for ; Mon, 14 Jul 2014 14:28:14 +0200 (CEST) +Date: Mon, 14 Jul 2014 14:28:14 +0200 (CEST) +Message-Id: <1722345767858996112.enqueue@ouroboros.ramov.inet> +From: Sime Ramov +Subject: notmuch-reply date format +To: notmuch@notmuchmail.org +X-Pobox-Relay-ID: + 4A5A1490-0B52-11E4-90F5-9903E9FBB39C-45584858!pb-smtp0.pobox.com +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: Mon, 14 Jul 2014 12:37:40 -0000 + +Hello, + +I would like to customize the attribution string in the reply templates. +Something like this, with ISO date: + +* Full Name [2014-07-14 12:30 +0200]: + +After the following trivial edit: + +diff --git a/notmuch-reply.c b/notmuch-reply.c +index 7c1c809..eaf1eed 100644 +--- a/notmuch-reply.c ++++ b/notmuch-reply.c +@@ -44,9 +44,9 @@ format_part_reply (mime_node_t *node) + int i; + if (node->envelope_file) { +- printf ("On %s, %s wrote:\n", +- notmuch_message_get_header (node->envelope_file, "date"), +- notmuch_message_get_header (node->envelope_file, "from")); ++ printf ("* %s [%s]:\n", ++ notmuch_message_get_header (node->envelope_file, "from"), ++ notmuch_message_get_header (node->envelope_file, "date")); + } else if (GMIME_IS_MESSAGE (node->part)) { + GMimeMessage *message = GMIME_MESSAGE (node->part); + InternetAddressList *recipients; + +The (partial) result is this: + +* Full Name [Mon, 14 Jul 2014 12:30:36 +0200]: + +Where would be the best place to `strftime` date? I snooped around in +lib/ source but haven't gotten far. Any ideas? Is it a Xapian thing? -- 2.26.2