mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
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
This commit is contained in:
parent
bd4704aa5c
commit
e395f4507d
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue