mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
contrib: pick: use notmuch-start-notmuch
This uses the new notmuch-start-notmuch function which should give better handling of stderr and errors generally.
This commit is contained in:
parent
348437243c
commit
1fd1e57d93
1 changed files with 3 additions and 4 deletions
|
@ -817,16 +817,15 @@ Complete list of currently available key bindings:
|
||||||
(if (equal (car (process-lines notmuch-command "count" search-args)) "0")
|
(if (equal (car (process-lines notmuch-command "count" search-args)) "0")
|
||||||
(setq search-args basic-query))
|
(setq search-args basic-query))
|
||||||
(if notmuch-pick-asynchronous-parser
|
(if notmuch-pick-asynchronous-parser
|
||||||
(let ((proc (start-process
|
(let ((proc (notmuch-start-notmuch
|
||||||
"notmuch-pick" buffer
|
"notmuch-pick" buffer #'notmuch-pick-process-sentinel
|
||||||
notmuch-command "show" "--body=false" "--format=sexp"
|
"show" "--body=false" "--format=sexp"
|
||||||
message-arg search-args))
|
message-arg search-args))
|
||||||
;; Use a scratch buffer to accumulate partial output.
|
;; Use a scratch buffer to accumulate partial output.
|
||||||
;; This buffer will be killed by the sentinel, which
|
;; This buffer will be killed by the sentinel, which
|
||||||
;; should be called no matter how the process dies.
|
;; should be called no matter how the process dies.
|
||||||
(parse-buf (generate-new-buffer " *notmuch pick parse*")))
|
(parse-buf (generate-new-buffer " *notmuch pick parse*")))
|
||||||
(process-put proc 'parse-buf parse-buf)
|
(process-put proc 'parse-buf parse-buf)
|
||||||
(set-process-sentinel proc 'notmuch-pick-process-sentinel)
|
|
||||||
(set-process-filter proc 'notmuch-pick-process-filter)
|
(set-process-filter proc 'notmuch-pick-process-filter)
|
||||||
(set-process-query-on-exit-flag proc nil))
|
(set-process-query-on-exit-flag proc nil))
|
||||||
(progn
|
(progn
|
||||||
|
|
Loading…
Reference in a new issue