Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5C732431FBC for ; Thu, 19 Nov 2009 17:15:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cIKEImhfHliC for ; Thu, 19 Nov 2009 17:15:47 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id 83CE7431FAE for ; Thu, 19 Nov 2009 17:15:47 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 17EAE8C069 for ; Fri, 20 Nov 2009 02:15:46 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NBI68-0005kv-PN for notmuch@notmuchmail.org; Fri, 20 Nov 2009 07:15:40 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 07:15:40 +0600 Message-Id: <1258679740-22089-1-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH] Allow to redefine notmuch binary name and path in elisp mode X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2009 01:15:48 -0000 Signed-off-by: Mikhail Gusarov --- 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) (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