--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\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 BC57B6DE02AD\r
+ for <notmuch@notmuchmail.org>; Fri, 10 Jun 2016 16:03:10 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.335\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.335 tagged_above=-999 required=5 tests=[AWL=0.235,\r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001]\r
+ 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 FbvilGyUefp6 for <notmuch@notmuchmail.org>;\r
+ Fri, 10 Jun 2016 16:03:03 -0700 (PDT)\r
+Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com\r
+ [74.125.82.51]) by arlo.cworth.org (Postfix) with ESMTPS id A321D6DE0032 for\r
+ <notmuch@notmuchmail.org>; Fri, 10 Jun 2016 16:03:02 -0700 (PDT)\r
+Received: by mail-wm0-f51.google.com with SMTP id k204so9829156wmk.0\r
+ for <notmuch@notmuchmail.org>; Fri, 10 Jun 2016 16:03:02 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id;\r
+ bh=mu4zwzcso80+LKONH7HuOFyFs9Jnmv+LXakPgInR9pE=;\r
+ b=wf3zcpcNwU6uMYU6TZ3avl4TW95t/sxXnKybMq+mAsNPwLh6KfpL5IEGcjkbO7j4bE\r
+ O87eOGR6iRKH13l2oFy/5hUHimh5XDrHFyv7f2VtFTlmaTbgBLeReAg4nnk+BzXONSpy\r
+ xxXoPKOJXNEUsODmtkIGUc/hHM1id+/PLffwpdamOUscqHpdkWADX7rWQRERxhLrqlso\r
+ FFXmzfDRRuDYWKkZceI8wcC+4TKMrBBUsGxpfZtBLgfRq0Fjp8gh51gg4QCMsMx62vj3\r
+ wDthaCsmVdrQXQ2zttOnq8ZtLOcKFt+jj4QAb0wx3V87ItM1PSQ7uuSHSSzomFYqbXFx\r
+ RdLw==\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=mu4zwzcso80+LKONH7HuOFyFs9Jnmv+LXakPgInR9pE=;\r
+ b=BtMOVdS2zwmwRDmew9PM++Xe9jf/3frcsUDNSL4Fg7KkEsCWnFuF5ry0rwflbdT6pA\r
+ 4aqoxBQLyT5PaGXlAzY1qeYTKQgzHgtuB2WmBaTKD2ZivRh8n+Qcu7IsHSc6mwYhsZuB\r
+ un78viiFPPMvsiJQQWMy6BbIl1ErpBW/d+voRcZGdwIG/nss5auLxPqd7XVGcEZj1l4u\r
+ x7ItZuz3Wz3/2qTS5/xCirEKMOVE3blqrWXCoLnJScmzmdtsmOAYoMZxMSjPwahzAjkX\r
+ 9iueUlwoy96OySCX5tNaHGpeDv2/S/g5V4V193N02PUxkxcWGRks7zmanT3Ox1Rck7Zf\r
+ bgdg==\r
+X-Gm-Message-State:\r
+ ALyK8tLcoNEEuvs5wdjc0gyBCrgTtY+xXUWcbNpp3WZ6zLEuk1V+um3icI77QjMjWlFyWw==\r
+X-Received: by 10.194.48.7 with SMTP id h7mr4102213wjn.9.1465599780788;\r
+ Fri, 10 Jun 2016 16:03:00 -0700 (PDT)\r
+Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
+ by smtp.gmail.com with ESMTPSA id 75sm1266904wml.15.2016.06.10.16.02.59\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Fri, 10 Jun 2016 16:03:00 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 0/6] Use notmuch insert for fcc\r
+Date: Sat, 11 Jun 2016 00:02:46 +0100\r
+Message-Id: <1465599772-10297-1-git-send-email-markwalters1009@gmail.com>\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: Fri, 10 Jun 2016 23:03:10 -0000\r
+\r
+This series allows the use of notmuch insert for fcc. It is rather\r
+larger than I would like but I am fairly happy with the user\r
+experience. A defcustom controls whether to use notmuch insert or file\r
+fcc.\r
+\r
+The syntax in the insert case is\r
+\r
+Fcc: folder +tag1 -tag2\r
+\r
+which inserts the message in folder, and +tag1 and -tag2 changes (if\r
+present) are applied afterwards.\r
+\r
+Since setting an fcc-header to "| notmuch insert --folder=sent"\r
+essentially works, I will try to justify why the series ends this\r
+big. The main reason is error handling: the pipe as above does no\r
+error handling, so if the notmuch database is locked the fcc will be\r
+silently lost. Unfortunately message-do-fcc which handles fcc is quite\r
+inflexible and always passes full filename as fcc, which prevents the\r
+syntax given above.\r
+\r
+Thus to get this syntax we need to extract a local copy of\r
+message-do-fcc which we simplify and rejig for our needs. The exact\r
+rejigged form is in preparation for the postpone/resume/draft patches.\r
+\r
+We could get rid of file fcc, but some people might still want it, and\r
+it is used in the test suite, including by some non-emacs tests (via\r
+emacs_fcc_message in test-lib.sh) so I am happier to keep it for now.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+\r
+Mark Walters (6):\r
+ emacs: notmuch-check-exit-status bugfix\r
+ emacs: maildir-fcc: prepare for use of notmuch insert\r
+ emacs: maildir import message-do-fcc\r
+ emacs: simplify our local copy of message-do-fcc\r
+ Modify our local copy of message-do-fcc\r
+ emacs: maildir: add the actual insert code\r
+\r
+ emacs/notmuch-lib.el | 10 ++-\r
+ emacs/notmuch-maildir-fcc.el | 192 +++++++++++++++++++++++++++++++++++++------\r
+ emacs/notmuch-mua.el | 10 +--\r
+ test/test-lib.el | 5 ++\r
+ 4 files changed, 185 insertions(+), 32 deletions(-)\r
+\r
+-- \r
+2.1.4\r
+\r