[PATCH v2 10/10] man: update insert documentation

Peter Wang novalazy at gmail.com
Wed Apr 16 05:59:25 PDT 2014


Add documentation for the insert --must-index option
and failure exit codes.
---
 doc/man1/notmuch-insert.rst | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/doc/man1/notmuch-insert.rst b/doc/man1/notmuch-insert.rst
index 2be1a7b..02c516b 100644
--- a/doc/man1/notmuch-insert.rst
+++ b/doc/man1/notmuch-insert.rst
@@ -38,16 +38,28 @@ Supported options for **insert** include
         does not exist. Otherwise the folder must already exist for mail
         delivery to succeed.
 
+    ``--must-index``
+        Succeed only if the message is written to disk, added to the
+        notmuch database, and tagged (unless a duplicate message).
+        Failure to synchronize tags to maildir flags has no effect.
+        Without this option, **insert** succeeds as long as the message
+        is written to disk.
+
 EXIT STATUS
 ===========
 
-This command returns exit status 0 if the message was successfully added
-to the mail directory, even if the message could not be indexed and
-added to the notmuch database. In the latter case, a warning will be
-printed to standard error but the message file will be left on disk.
+This command returns exit status 0 on success. On failure, it returns a
+non-zero exit status:
+
+    1
+        General failure code.
+
+    2
+        Failed to write the message to disk.
 
-If the message could not be written to disk then a non-zero exit status
-is returned.
+    3
+        Failed to index or tag the message (unless a duplicate message),
+        and ``--must-index`` was specified.
 
 SEE ALSO
 ========
-- 
1.8.4



More information about the notmuch mailing list