unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Allow to redefine notmuch binary name and path in elisp mode
@ 2009-11-20  1:15 Mikhail Gusarov
  2009-11-20 12:41 ` Carl Worth
  0 siblings, 1 reply; 2+ messages in thread
From: Mikhail Gusarov @ 2009-11-20  1:15 UTC (permalink / raw)
  To: notmuch


Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
---
 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    "\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)))
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Allow to redefine notmuch binary name and path in elisp mode
  2009-11-20  1:15 [PATCH] Allow to redefine notmuch binary name and path in elisp mode Mikhail Gusarov
@ 2009-11-20 12:41 ` Carl Worth
  0 siblings, 0 replies; 2+ messages in thread
From: Carl Worth @ 2009-11-20 12:41 UTC (permalink / raw)
  To: Mikhail Gusarov, notmuch

On Fri, 20 Nov 2009 07:15:40 +0600, Mikhail Gusarov <dottedmag@dottedmag.net> wrote:
> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>

Thanks for the patch, Mikhail!

This is pushed now.

-Carl

PS. Some people may have noticed that the original mail from Mikhail put
notmuch-show-mode into an infinite loop. The bug is triggered by the
mail message containing a notmuch message marker, "^lmessage{" in the
body, (but with a literal ^L).

I haven't fixed the infinite loop yet, and it would be good to come up
with a way to do ignore delimiters internal to the body of a message.
Until then, I've changed the notmuch.el code to use "\f" instead of
literal ^L so we at least won't hit this bug with patches to notmuch.el
anymore.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-20 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-20  1:15 [PATCH] Allow to redefine notmuch binary name and path in elisp mode Mikhail Gusarov
2009-11-20 12:41 ` Carl Worth

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).