X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=89c01a578ccdfe331599f21fc3174d1e15807923;hb=190f69169dc5c2ee12dcf077ead7f3fac4d9d88b;hp=201d7ec8593f376c1ae9f20a3671eff52535e4bc;hpb=3c1eea5646fcf33d66acb874d82f3518a75c24de;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 201d7ec8..89c01a57 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -232,6 +232,9 @@ on the command line, and then retry your notmuch command"))) "Return the user.other_email value (as a list) from the notmuch configuration." (split-string (notmuch-config-get "user.other_email") "\n" t)) +(defun notmuch-user-emails () + (cons (notmuch-user-primary-email) (notmuch-user-other-email))) + (defun notmuch-poll () "Run \"notmuch new\" or an external script to import mail. @@ -240,8 +243,9 @@ depending on the value of `notmuch-poll-script'." (interactive) (if (stringp notmuch-poll-script) (unless (string= notmuch-poll-script "") - (call-process notmuch-poll-script nil nil)) - (call-process notmuch-command nil nil nil "new"))) + (unless (equal (call-process notmuch-poll-script nil nil) 0) + (error "Notmuch: poll script `%s' failed!" notmuch-poll-script))) + (notmuch-call-notmuch-process "new"))) (defun notmuch-bury-or-kill-this-buffer () "Undisplay the current buffer.