[PATCH 2/3] man: document insert --must-index

Peter Wang novalazy at gmail.com
Sat Jul 20 17:07:33 PDT 2013


Add documentation for the new option.
---
 man/man1/notmuch-insert.1 | 39 +++++++++++++++++++++++++++++++++------
 1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/man/man1/notmuch-insert.1 b/man/man1/notmuch-insert.1
index d5202ac..44c18d8 100644
--- a/man/man1/notmuch-insert.1
+++ b/man/man1/notmuch-insert.1
@@ -55,15 +55,42 @@ Otherwise the folder must already exist for mail
 delivery to succeed.
 
 .RE
+
+.RS 4
+.TP 4
+.B "--must-index"
+
+The default behaviour of
+.B notmuch insert
+is to succeed if the message is 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.
+
+The
+.B "--must-index"
+option causes
+.B notmuch insert
+to fail if the message could not be added to the notmuch database,
+and the newly-created message file deleted.
+
+Failure to set tags does not consitute a failure of the overall
+command.
+
+.RE
 .SH 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.
 
-If the message could not be written to disk then a non-zero exit
-status is returned.
+.TP
+.B 1
+Failed to write the message to disk.
+.TP
+.B 2
+Failed to index the message, and
+.B "--must-index"
+was specified.
 
 .RE
 .SH SEE ALSO
-- 
1.7.12.1



More information about the notmuch mailing list