From 3d312e2577820f7c14df24be305da715d4ea74ee Mon Sep 17 00:00:00 2001 From: David Bremner Date: Wed, 7 Dec 2016 07:27:12 -0400 Subject: [PATCH 1/4] cli/insert: document the use of EX_TEMPFAIL --- doc/man1/notmuch-insert.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/man1/notmuch-insert.rst b/doc/man1/notmuch-insert.rst index 9e7afc36..9847e674 100644 --- a/doc/man1/notmuch-insert.rst +++ b/doc/man1/notmuch-insert.rst @@ -60,6 +60,13 @@ indexing to Notmuch database, changing tags, and synchronizing tags to maildir flags. The ``--keep`` option may be used to settle for successful message file delivery. +This command supports the following special exit status code for +errors most likely to be temporary in nature, e.g. failure to get a +database write lock. + +``75 (EX_TEMPFAIL)`` + A temporary failure occured; the user is invited to retry. + The exit status of the **post-insert** hook does not affect the exit status of the **insert** command. From f1160fbe2cb006e6a2a84085c106c2d9c7fe07dc Mon Sep 17 00:00:00 2001 From: David Bremner Date: Wed, 7 Dec 2016 07:27:13 -0400 Subject: [PATCH 2/4] NEWS: news for notmuch-insert error handling --- NEWS | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NEWS b/NEWS index 99ef277d..c0aa4797 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,15 @@ +Notmuch 0.23.4 (UNRELEASED) +=========================== + +Command Line Interface +---------------------- + +Improve error handling in notmuch insert + + Database lock errors no longer prevent message file delivery to the + filesystem. Certain errors during `notmuch insert` most likely to + be temporary return EX_TEMPFAIL. + Notmuch 0.23.3 (2016-11-27) =========================== From 001256ab2916ab809b75ea8aa4bc363bf81a4174 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Wed, 7 Dec 2016 20:45:51 -0400 Subject: [PATCH 3/4] emacs: restore autoload cookie for notmuch-search The cookie only applies to next form, so in the previous location it applied to the put, rather than the function. --- emacs/notmuch.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 68a4c0b1..46f14fea 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -931,8 +931,8 @@ PROMPT is the string to prompt with." "Return the current query in this search buffer" notmuch-search-query-string) -;;;###autoload (put 'notmuch-search 'notmuch-doc "Search for messages.") +;;;###autoload (defun notmuch-search (&optional query oldest-first target-thread target-line) "Display threads matching QUERY in a notmuch-search buffer. From e81c71639e91d9a7f1fcda0f121c2ce8ed0cec63 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Wed, 7 Dec 2016 20:45:52 -0400 Subject: [PATCH 4/4] NEWS: announce autoload fix --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS b/NEWS index c0aa4797..a7d4c205 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,11 @@ Improve error handling in notmuch insert filesystem. Certain errors during `notmuch insert` most likely to be temporary return EX_TEMPFAIL. +Emacs +----- + +Restore autoload cookie for notmuch-search. + Notmuch 0.23.3 (2016-11-27) ===========================