--- /dev/null
+Return-Path: <novalazy@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 olra.theworths.org (Postfix) with ESMTP id 1A57C431FCB\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 17:17:08 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id BArc5nU+9uHf for <notmuch@notmuchmail.org>;\r
+ Sat, 24 Nov 2012 17:17:06 -0800 (PST)\r
+Received: from mail-da0-f53.google.com (mail-da0-f53.google.com\r
+ [209.85.210.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id BC78D431FBF\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 17:17:05 -0800 (PST)\r
+Received: by mail-da0-f53.google.com with SMTP id x6so2305618dac.26\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 17:17:03 -0800 (PST)\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:x-mailer;\r
+ bh=3GUItFdm2276ugnKkw9CjhLciftag9VYm79knC4+hLo=;\r
+ b=mxYtJ+jV2UK9FJYFPcrF0pYLjeYj8QFdlqzh3o0mbvhHlibWjWU0QGhTBCmKaLKAyI\r
+ hbBF5sQnmDl3QuAobQijiTDCwWi1seQm/X7KMfZb+t60Ig7+DoM8UpwPF+VYG31crUx0\r
+ 7c+hwzAq7YCC1GXASToItunPnnRpp91pXcfjGRx5zJyY8B4ZffqL8G7s7etY/VxOXxSz\r
+ F1KAL93QQ1OS+kE8fH9uiZbyR3UVTYEfeAorIKfZ2QT2FAVs+7JL0AtVmsRZj0hUqm5e\r
+ 9gNRyuA9uaVL8vLEGITzbApPqDDsZKrOdS4v23pZ+3U+bDFHDnxGPr1cSJYMjYLvzm5X\r
+ wlHw==\r
+Received: by 10.68.232.201 with SMTP id tq9mr26485208pbc.12.1353806223801;\r
+ Sat, 24 Nov 2012 17:17:03 -0800 (PST)\r
+Received: from localhost (215.42.233.220.static.exetel.com.au.\r
+ [220.233.42.215])\r
+ by mx.google.com with ESMTPS id tm8sm6222674pbc.48.2012.11.24.17.17.00\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Sat, 24 Nov 2012 17:17:02 -0800 (PST)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 00/20] insert command\r
+Date: Sun, 25 Nov 2012 12:16:26 +1100\r
+Message-Id: <1353806206-29133-1-git-send-email-novalazy@gmail.com>\r
+X-Mailer: git-send-email 1.7.12.1\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 25 Nov 2012 01:17:08 -0000\r
+\r
+This series mainly addresses the issues raised by Mark:\r
+\r
+- check talloc failures\r
+- deadlock in maildir_open_tmp\r
+- stricter file modes (0600 and 0700)\r
+- shared tag operation parser with notmuch-tag.c\r
+- simplified mkdir_parents\r
+- trap SIGINT\r
+- fsync after writing and rename\r
+- added a couple of tests\r
+- man page wording\r
+- comments\r
+\r
+Due to new restriction on tags beginning with '-', an argument beginning with\r
+"--" is no longer ambiguous so I have removed the optional "--" separator\r
+between options and tag operations.\r
+\r
+Peter Wang (20):\r
+ tag: factor out tag operation parsing\r
+ tag: make tag operation parser public\r
+ cli: add stub for insert command\r
+ insert: open Maildir tmp file\r
+ insert: copy stdin to Maildir tmp file\r
+ insert: move file from Maildir tmp to new\r
+ insert: add new message to database\r
+ insert: support --folder option\r
+ insert: prevent writes outside Maildir hierarchy\r
+ insert: apply default tags to new message\r
+ insert: parse command-line tag operations\r
+ insert: apply command-line tag operations\r
+ insert: add --create-folder option\r
+ insert: fsync after writing tmp file\r
+ insert: fsync new directory after rename\r
+ insert: trap SIGINT and clean up\r
+ insert: add copyright line from notmuch-deliver\r
+ test: add tests for insert\r
+ man: document 'insert' command\r
+ man: reference notmuch-insert.1\r
+\r
+ Makefile.local | 1 +\r
+ man/Makefile.local | 1 +\r
+ man/man1/notmuch-config.1 | 4 +-\r
+ man/man1/notmuch-count.1 | 4 +-\r
+ man/man1/notmuch-dump.1 | 4 +-\r
+ man/man1/notmuch-insert.1 | 60 +++++\r
+ man/man1/notmuch-new.1 | 4 +-\r
+ man/man1/notmuch-reply.1 | 3 +-\r
+ man/man1/notmuch-restore.1 | 3 +-\r
+ man/man1/notmuch-search.1 | 3 +-\r
+ man/man1/notmuch-show.1 | 3 +-\r
+ man/man1/notmuch-tag.1 | 3 +-\r
+ man/man1/notmuch.1 | 3 +-\r
+ man/man5/notmuch-hooks.5 | 4 +-\r
+ man/man7/notmuch-search-terms.7 | 3 +-\r
+ notmuch-client.h | 12 +\r
+ notmuch-insert.c | 493 ++++++++++++++++++++++++++++++++++++++++\r
+ notmuch-tag.c | 79 ++++---\r
+ notmuch.c | 3 +\r
+ test/insert | 93 ++++++++\r
+ test/notmuch-test | 1 +\r
+ 21 files changed, 733 insertions(+), 51 deletions(-)\r
+ create mode 100644 man/man1/notmuch-insert.1\r
+ create mode 100644 notmuch-insert.c\r
+ create mode 100755 test/insert\r
+\r
+-- \r
+1.7.12.1\r
+\r