[PATCH 0/7] cli/reply: refactoring
authorJani Nikula <jani@nikula.org>
Sat, 18 Jun 2016 21:31:26 +0000 (00:31 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:06 +0000 (16:22 -0700)
85/62d5ee443a18c7c7add14222c6e13a2ee76155 [new file with mode: 0644]

diff --git a/85/62d5ee443a18c7c7add14222c6e13a2ee76155 b/85/62d5ee443a18c7c7add14222c6e13a2ee76155
new file mode 100644 (file)
index 0000000..e2ed39d
--- /dev/null
@@ -0,0 +1,106 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 124546DE034D\r
+ for <notmuch@notmuchmail.org>; Sat, 18 Jun 2016 14:33:11 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.563\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.563 tagged_above=-999 required=5 tests=[AWL=0.157,\r
+  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id DzYal-iuqjuB for <notmuch@notmuchmail.org>;\r
+ Sat, 18 Jun 2016 14:33:01 -0700 (PDT)\r
+Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com\r
+ [74.125.82.48]) by arlo.cworth.org (Postfix) with ESMTPS id F3C5E6DE009B for\r
+ <notmuch@notmuchmail.org>; Sat, 18 Jun 2016 14:33:00 -0700 (PDT)\r
+Received: by mail-wm0-f48.google.com with SMTP id f126so26576607wma.1\r
+ for <notmuch@notmuchmail.org>; Sat, 18 Jun 2016 14:32:59 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=nikula-org.20150623.gappssmtp.com; s=20150623;\r
+ h=from:to:cc:subject:date:message-id;\r
+ bh=1HS1uf1nFktnx1BeEDtd535w4FrnrNu2Y3povby2Kqw=;\r
+ b=Ix+CM3+wGtB84LFUyD+FqV4tjjOycdw6xOB49NFmnlrFu/LGdBcMYY8igXIDbP9/FM\r
+ OEtDlVgg5laLuGAwRWjQ3EJIUaeBHtfw9R5xxvWh+tnidYbSavBchd+WTQLp/uZ7IlxU\r
+ PCKIAIKllgDE8VnTlr8J3XHU3eJB3MHnCrFSxUrYGB0+f/UQU2T7Risk5XizsNr/0DB5\r
+ r3tlt5/TMpdSKJbHNyk71mrwlTCUGqkXtdIxn2NfSoUfRPRoW7CQdbY5W5gCNjh7BWkC\r
+ 6GMHbaqXdZb6N3t6e35z2EAog+NdY1uQlQCCBavtSF3503sWfoEbjDWDoWtR0ImJWk38\r
+ YNLg==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id;\r
+ bh=1HS1uf1nFktnx1BeEDtd535w4FrnrNu2Y3povby2Kqw=;\r
+ b=SlZWoTk/b36ozxBp0QC/U+WkJrRFQuJSGouaGQzqZ+C8XrY+iEfQQ9vQgE93wWP/Rz\r
+ Yoen9nzHEvEXv/csv7VQaP5408F8LonDPnmYbJvIA2OarjXO6npYcyx+s3dnoI3ye82f\r
+ VxWAbxE99vdl9h4LhtCr32BXWf1OipUsC9U7o2TdaPSMMqUGEhuOvWLz0+TQRuZYzENz\r
+ XDQEuiN8TsKl6/x7FipP1AToE7wMftlonPJy8/1P1x/lNDB/sXEkVBgvRAi+R3Mdo0S0\r
+ BxVAOYMW7R/2sLUJj7VNY0GbVrvJu697/eWvrdWbI1WWm4Ka/cBx3HZ+ngx8XGXF0yks\r
+ yIvQ==\r
+X-Gm-Message-State:\r
+ ALyK8tKuNq3QZ1mpEWRzuWmCe5ojr6NgQDytkbePq8tf5eWBEQfB1J7dtiLiCsb6pMf2yA==\r
+X-Received: by 10.28.215.139 with SMTP id o133mr4203798wmg.74.1466285577830;\r
+ Sat, 18 Jun 2016 14:32:57 -0700 (PDT)\r
+Received: from localhost (mobile-access-bcee4e-81.dhcp.inet.fi.\r
+ [188.238.78.81])\r
+ by smtp.gmail.com with ESMTPSA id bb4sm15955208wjb.32.2016.06.18.14.32.56\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Sat, 18 Jun 2016 14:32:56 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Cc: jani@nikula.org,\r
+       Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+Subject: [PATCH 0/7] cli/reply: refactoring\r
+Date: Sun, 19 Jun 2016 00:31:26 +0300\r
+Message-Id: <cover.1466284726.git.jani@nikula.org>\r
+X-Mailer: git-send-email 2.1.4\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 18 Jun 2016 21:33:11 -0000\r
+\r
+Hi all -\r
+\r
+I started looking at how to use GMimeMessage for the headers in notmuch\r
+reply, based on [1]. Turns out we *already* parse the message twice in\r
+most cases, once in the lib and once in mime_node_open(). However,\r
+notmuch reply is a mess, and passing that GMIME_MESSAGE (node->part)\r
+from the node to add_recipients_from_message() gets tricky. Here's a\r
+bunch of refactoring to make the future work easier. I like the diffstat\r
+already.\r
+\r
+Oh, as a bonus, if we ever try to get that "reply to multiple messages\r
+at once" feature back, this makes it easier too.\r
+\r
+BR,\r
+Jani.\r
+\r
+[1] id:87bn30tdb0.fsf@nikula.org\r
+\r
+Jani Nikula (7):\r
+  cli/reply: push notmuch reply format abstraction lower in the stack\r
+  cli/reply: reuse show_reply_headers() in headers-only format\r
+  cli/reply: unify reply format functions\r
+  cli/reply: reorganize create_reply_message()\r
+  cli/reply: make references header creation easier to follow\r
+  cli/reply: reuse create_reply_message() also for headers-only format\r
+  cli/reply: reduce the reply format abstractions\r
+\r
+ notmuch-reply.c | 266 +++++++++++++++++---------------------------------------\r
+ 1 file changed, 79 insertions(+), 187 deletions(-)\r
+\r
+-- \r
+2.1.4\r
+\r