X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=b8d0198db42988dd03e0cda766b731e434d5e518;hb=ddc44ae0d02c7f92640b5e560fca5fddbd7b6c98;hp=e7c5c97144dc666787006cd4238ab89a99cbd588;hpb=52faf1f99313a76b21a13517e7f21ef45cde1f9e;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index e7c5c971..b8d0198d 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -133,6 +133,7 @@ For example, if you wanted to remove an \"inbox\" tag and add an (define-key map "?" 'notmuch-help) (define-key map "q" 'notmuch-kill-this-buffer) (define-key map "s" 'notmuch-search) + (define-key map "z" 'notmuch-tree) (define-key map "m" 'notmuch-mua-new-mail) (define-key map "=" 'notmuch-refresh-this-buffer) (define-key map "G" 'notmuch-poll-and-refresh-this-buffer) @@ -627,6 +628,17 @@ You may need to restart Emacs or upgrade your notmuch package.")) ;; `notmuch-logged-error' does not return. )))) +(defun notmuch-call-notmuch-process (&rest args) + "Synchronously invoke \"notmuch\" with the given list of arguments. + +If notmuch exits with a non-zero status, output from the process +will appear in a buffer named \"*Notmuch errors*\" and an error +will be signaled." + (with-temp-buffer + (let ((status (apply #'call-process notmuch-command nil t nil args))) + (notmuch-check-exit-status status (cons notmuch-command args) + (buffer-string))))) + (defun notmuch-call-notmuch-sexp (&rest args) "Invoke `notmuch-command' with ARGS and return the parsed S-exp output.