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