--- /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 62FB9431FBF\r
+ for <notmuch@notmuchmail.org>; Sat, 19 Jan 2013 16:50:39 -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 FrA+chqZ5aFj for <notmuch@notmuchmail.org>;\r
+ Sat, 19 Jan 2013 16:50:35 -0800 (PST)\r
+Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com\r
+ [209.85.220.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id E6918431FB6\r
+ for <notmuch@notmuchmail.org>; Sat, 19 Jan 2013 16:50:34 -0800 (PST)\r
+Received: by mail-pa0-f49.google.com with SMTP id bi1so2746847pad.8\r
+ for <notmuch@notmuchmail.org>; Sat, 19 Jan 2013 16:50:32 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=x-received:from:to:cc:subject:date:message-id:x-mailer;\r
+ bh=LBphp1zPAwlrEwxaHA7ziDW2wphUdWd+1fVdD/ZPVLc=;\r
+ b=Fn1LISghxxbOYEoH3JMJX0omSdcRGFcH6/XvM82iVtkIChejU8vAvvi4YvcY/X+bNo\r
+ Id6MGJP9KBV94XfrA+laMY5TY8dtn6tIISx2JIdfsE6WG++xixww59haeUrMb+mxNq6k\r
+ Cyz2LT5oxt5ZFhtTcUOPH0A/CP3PoL8gTnnPj1YGxH+6da8eR1yCkvDDBMOhDttGTC4K\r
+ hbM8RBOatOg3DfcrbL+wA1EfpVXsRhtxDUt7Zfpq9mFmCziu+EDlekU75/pi7uNmE1rF\r
+ /7bKsUYXid0+fKvEmIzqmVenXlK4DWIikv3+/u4/aHSyaIzMx3CJ/bOe4CFIvo7+IXZY\r
+ O1Bw==\r
+X-Received: by 10.68.132.34 with SMTP id or2mr18592990pbb.133.1358643032878;\r
+ Sat, 19 Jan 2013 16:50:32 -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 ni8sm5791616pbc.70.2013.01.19.16.50.29\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Sat, 19 Jan 2013 16:50:31 -0800 (PST)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 00/20] insert command\r
+Date: Sun, 20 Jan 2013 11:49:44 +1100\r
+Message-Id: <1358643004-14522-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, 20 Jan 2013 00:50:39 -0000\r
+\r
+This mainly addresses review comments from v2\r
+and rebases on top of tag-util.c.\r
+\r
+Peter Wang (20):\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: apply default tags to new message\r
+ tag-util: do not reset list in parse_tag_command_line\r
+ tag-util: move out 'tag' command-line checks\r
+ insert: parse and apply command-line tag operations\r
+ insert: support --folder option\r
+ insert: prevent writes outside Maildir hierarchy\r
+ insert: add --create-folder option\r
+ insert: fsync after writing tmp file\r
+ insert: fsync new directory after rename\r
+ insert: fsync parent directory after mkdir\r
+ insert: trap SIGINT and clean up\r
+ insert: add copyright line from notmuch-deliver\r
+ man: document 'insert' command\r
+ man: reference notmuch-insert.1\r
+ test: add tests for insert\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 | 59 +++++\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 | 3 +\r
+ notmuch-insert.c | 482 ++++++++++++++++++++++++++++++++++++++++\r
+ notmuch-tag.c | 10 +\r
+ notmuch.c | 3 +\r
+ tag-util.c | 12 -\r
+ tag-util.h | 2 +\r
+ test/insert | 106 +++++++++\r
+ test/notmuch-test | 1 +\r
+ 23 files changed, 692 insertions(+), 29 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