Signed-off-by: Mikhail Gusarov <dottedmag at>
 notmuch.el |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index 1fc54c3..f97950f 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"
+  "Notmuch binary location")
 (set 'notmuch-show-message-begin-regexp    "message{")
 (set 'notmuch-show-message-end-regexp      "message}")
 (set 'notmuch-show-header-begin-regexp     "header{")
@@ -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)
@@ -690,7 +693,7 @@ thread from that buffer can be show when done with this 
       (goto-char (point-min))
-       (call-process "notmuch" nil t nil "show" thread-id)
+       (call-process notmuch-command nil t nil "show" thread-id)
       (run-hooks 'notmuch-show-hook)
@@ -851,7 +854,7 @@ and will also appear in a buffer named \"*Notmuch 
   (let ((error-buffer (get-buffer-create "*Notmuch errors*")))
     (with-current-buffer error-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)
        (with-current-buffer error-buffer
@@ -917,8 +920,8 @@ This function advances point to the next line when 
       (goto-char (point-min))
        (if oldest-first
-           (call-process "notmuch" nil t nil "search" "--sort=oldest-first" 
-         (call-process "notmuch" nil t nil "search" "--sort=newest-first" 
+           (call-process notmuch-command nil t nil "search" 
"--sort=oldest-first" query)
+         (call-process notmuch-command nil t nil "search" 
"--sort=newest-first" query))
     (run-hooks 'notmuch-search-hook)))

Reply via email to