mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 20:38:08 +01:00
Allow to redefine notmuch binary name and path in elisp mode
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
This commit is contained in:
parent
2cc3165163
commit
dbb29a77fa
1 changed files with 8 additions and 5 deletions
13
notmuch.el
13
notmuch.el
|
@ -71,6 +71,9 @@ pattern can still test against the entire line).")
|
||||||
(defvar notmuch-show-signature-lines-max 12
|
(defvar notmuch-show-signature-lines-max 12
|
||||||
"Maximum length of signature that will be hidden by default.")
|
"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-begin-regexp "\fmessage{")
|
||||||
(set 'notmuch-show-message-end-regexp "\fmessage}")
|
(set 'notmuch-show-message-end-regexp "\fmessage}")
|
||||||
(set 'notmuch-show-header-begin-regexp "\fheader{")
|
(set 'notmuch-show-header-begin-regexp "\fheader{")
|
||||||
|
@ -251,7 +254,7 @@ buffer."
|
||||||
|
|
||||||
(defun notmuch-reply (query-string)
|
(defun notmuch-reply (query-string)
|
||||||
(switch-to-buffer (generate-new-buffer "notmuch-draft"))
|
(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))
|
(goto-char (point-min))
|
||||||
(if (re-search-forward "^$" nil t)
|
(if (re-search-forward "^$" nil t)
|
||||||
(progn
|
(progn
|
||||||
|
@ -690,7 +693,7 @@ thread from that buffer can be show when done with this one)."
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(save-excursion
|
(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)
|
(notmuch-show-markup-messages)
|
||||||
)
|
)
|
||||||
(run-hooks 'notmuch-show-hook)
|
(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*")))
|
(let ((error-buffer (get-buffer-create "*Notmuch errors*")))
|
||||||
(with-current-buffer error-buffer
|
(with-current-buffer error-buffer
|
||||||
(erase-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)
|
(point)
|
||||||
(progn
|
(progn
|
||||||
(with-current-buffer error-buffer
|
(with-current-buffer error-buffer
|
||||||
|
@ -917,8 +920,8 @@ This function advances point to the next line when finished."
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(if oldest-first
|
(if oldest-first
|
||||||
(call-process "notmuch" nil t nil "search" "--sort=oldest-first" query)
|
(call-process notmuch-command 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=newest-first" query))
|
||||||
(notmuch-search-markup-thread-ids)
|
(notmuch-search-markup-thread-ids)
|
||||||
))
|
))
|
||||||
(run-hooks 'notmuch-search-hook)))
|
(run-hooks 'notmuch-search-hook)))
|
||||||
|
|
Loading…
Reference in a new issue