X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.el;h=4b2936a9645b980b8654ec71788e010c17ab3c0b;hp=cbb240f31eab688920134989edde5e3e58b82420;hb=5d0a01dceb67e9bdcb95bcb2328baef5e7ea7d52;hpb=2cc316516356f12d21e066121ce64317b3783a9f diff --git a/notmuch.el b/notmuch.el index cbb240f3..4b2936a9 100644 --- a/notmuch.el +++ b/notmuch.el @@ -71,6 +71,9 @@ pattern can still test against the entire line).") (defvar notmuch-show-signature-lines-max 12 "Maximum length of signature that will be hidden by default.") +(defvar notmuch-command "notmuch" + "Command to run the notmuch binary.") + (set 'notmuch-show-message-begin-regexp "\fmessage{") (set 'notmuch-show-message-end-regexp "\fmessage}") (set 'notmuch-show-header-begin-regexp "\fheader{") @@ -251,7 +254,7 @@ buffer." (defun notmuch-reply (query-string) (switch-to-buffer (generate-new-buffer "notmuch-draft")) - (call-process "notmuch" nil t nil "reply" query-string) + (call-process notmuch-command nil t nil "reply" query-string) (goto-char (point-min)) (if (re-search-forward "^$" nil t) (progn @@ -690,7 +693,7 @@ thread from that buffer can be show when done with this one)." (erase-buffer) (goto-char (point-min)) (save-excursion - (call-process "notmuch" nil t nil "show" thread-id) + (call-process notmuch-command nil t nil "show" thread-id) (notmuch-show-markup-messages) ) (run-hooks 'notmuch-show-hook) @@ -851,7 +854,7 @@ and will also appear in a buffer named \"*Notmuch errors*\"." (let ((error-buffer (get-buffer-create "*Notmuch errors*"))) (with-current-buffer error-buffer (erase-buffer)) - (if (eq (apply 'call-process "notmuch" nil error-buffer nil args) 0) + (if (eq (apply 'call-process notmuch-command nil error-buffer nil args) 0) (point) (progn (with-current-buffer error-buffer @@ -917,8 +920,8 @@ This function advances point to the next line when finished." (goto-char (point-min)) (save-excursion (if oldest-first - (call-process "notmuch" nil t nil "search" "--sort=oldest-first" query) - (call-process "notmuch" nil t nil "search" "--sort=newest-first" query)) + (call-process notmuch-command nil t nil "search" "--sort=oldest-first" query) + (call-process notmuch-command nil t nil "search" "--sort=newest-first" query)) (notmuch-search-markup-thread-ids) )) (run-hooks 'notmuch-search-hook)))