aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2013-07-04 23:18:19 +0100
committerGravatar David Bremner <bremner@debian.org>2013-07-27 18:22:37 -0300
commite395f4507d473c190a649094eaee05bceac17af0 (patch)
treefbd36de8e225ce8211149f4ce6dedc3b64d45af4 /emacs
parentbd4704aa5ccb9353720d162eb93c6514c22f6fb3 (diff)
emacs: hello: make --batch error gracefully
Recently notmuch-hello was converted to use batch count. However, it seems that several people run different versions of notmuch-emacs and notmuch-cli so this batch makes emacs fail with an error message if --batch is not available in the CLI. Amended by: db
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-hello.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 147c08cc..9db8c993 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -402,8 +402,13 @@ options will be handled as specified for
(plist-get options :filter)))
"\n")))
- (call-process-region (point-min) (point-max) notmuch-command
- t t nil "count" "--batch")
+ (unless (= (call-process-region (point-min) (point-max) notmuch-command
+ t t nil "count" "--batch") 0)
+ (notmuch-logged-error "notmuch count --batch failed"
+ "Please check that the notmuch CLI is new enough to support `count
+--batch'. In general we recommend running matching versions of
+the CLI and emacs interface."))
+
(goto-char (point-min))
(notmuch-remove-if-not