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 E8151431FAE for ; Mon, 7 Oct 2013 15:33:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 v1DiBQpOOtGy for ; Mon, 7 Oct 2013 15:33:27 -0700 (PDT) Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu [18.9.25.12]) by olra.theworths.org (Postfix) with ESMTP id 8E667431FAF for ; Mon, 7 Oct 2013 15:33:27 -0700 (PDT) X-AuditID: 1209190c-b7fd38e0000009aa-d6-525336b6c2ae Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id E3.41.02474.6B633525; Mon, 7 Oct 2013 18:33:27 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r97MXPe8024733; Mon, 7 Oct 2013 18:33:26 -0400 Received: from drake.dyndns.org (26-4-172.dynamic.csail.mit.edu [18.26.4.172]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r97MXNI2028507 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Mon, 7 Oct 2013 18:33:25 -0400 Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1VTJMh-0006bp-LQ; Mon, 07 Oct 2013 18:33:23 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 05/11] emacs: Move `notmuch-call-notmuch-process' to notmuch-lib Date: Mon, 7 Oct 2013 18:33:15 -0400 Message-Id: <1381185201-25197-6-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1381185201-25197-1-git-send-email-amdragon@mit.edu> References: <1381185201-25197-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsUixG6nrrvdLDjI4NNpFovrN2cyOzB6PFt1 izmAMYrLJiU1J7MstUjfLoEr41zzeaaCyUIVP1vfsDcwtvJ3MXJySAiYSFxee48VwhaTuHBv PRuILSSwj1Fiw5zMLkYuIHsDo8SECXtZIJzDTBLbp9xhhXDmMkqs2/iSBaSFTUBDYtv+5Ywg toiAtMTOu7OBijg4mAXUJP50qYCEhQUCJCZ8X8oOYrMIqEosmv8HzOYVcJC40tsAdYWSxMJT 28BsTgFHiSUbL0Jd5CAxd/8i1gmM/AsYGVYxyqbkVunmJmbmFKcm6xYnJ+blpRbpGurlZpbo paaUbmIEBQ2nJM8OxjcHlQ4xCnAwKvHwChwOChJiTSwrrsw9xCjJwaQkynvGNDhIiC8pP6Uy I7E4I76oNCe1+BCjBAezkgivgBFQjjclsbIqtSgfJiXNwaIkznuTwz5ISCA9sSQ1OzW1ILUI JivDwaEkwRsGMlSwKDU9tSItM6cEIc3EwQkynAdo+AKQGt7igsTc4sx0iPwpRkUpcd7ZIAkB kERGaR5cLyyqXzGKA70izLsVpIoHmBDgul8BDWYCGqzLHggyuCQRISXVwJgroVm5x+7EHrPX d83Fl/32nW+Zc1vlhd7za8w31G/ONovo2yoYHsXa+vnJh7PrUvtF66/MWPf5/uXrkxqqy/lN Lmdx77N6wxyy4//+1O1fD0yLTXY+9kT2xNfJDoatcwz2Xt+ZOL/5qV+KVUb4k591cQ8Y56rq 6e5qv1ac5n2xZI+5aZWBxUklluKMREMt5qLiRADJr4NPxQIAAA== X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Mon, 07 Oct 2013 22:33:34 -0000 Previously, this was in notmuch.el, but all of the other notmuch call wrappers were in notmuch-lib.el. Move `notmuch-call-notmuch-process' to live with its friends. This happens to fix a missing dependency from notmuch-tag.el, which required notmuch-lib, but not notmuch. --- emacs/notmuch-lib.el | 11 +++++++++++ emacs/notmuch.el | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 58f3313..4e0604e 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -534,6 +534,17 @@ You may need to restart Emacs or upgrade your notmuch package.")) ;; `notmuch-logged-error' does not return. )))) +(defun notmuch-call-notmuch-process (&rest args) + "Synchronously invoke \"notmuch\" with the given list of arguments. + +If notmuch exits with a non-zero status, output from the process +will appear in a buffer named \"*Notmuch errors*\" and an error +will be signaled." + (with-temp-buffer + (let ((status (apply #'call-process notmuch-command nil t nil args))) + (notmuch-check-exit-status status (cons notmuch-command args) + (buffer-string))))) + (defun notmuch-call-notmuch-sexp (&rest args) "Invoke `notmuch-command' with ARGS and return the parsed S-exp output. diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 0ff248b..2c7678d 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -511,17 +511,6 @@ If BARE is set then do not prefix with \"thread:\"" (let ((message-id (notmuch-search-find-thread-id))) (notmuch-mua-new-reply message-id prompt-for-sender nil))) -(defun notmuch-call-notmuch-process (&rest args) - "Synchronously invoke \"notmuch\" with the given list of arguments. - -If notmuch exits with a non-zero status, output from the process -will appear in a buffer named \"*Notmuch errors*\" and an error -will be signaled." - (with-temp-buffer - (let ((status (apply #'call-process notmuch-command nil t nil args))) - (notmuch-check-exit-status status (cons notmuch-command args) - (buffer-string))))) - (defun notmuch-search-set-tags (tags &optional pos) (let ((new-result (plist-put (notmuch-search-get-result pos) :tags tags))) (notmuch-search-update-result new-result pos))) -- 1.8.4.rc3