--- /dev/null
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 53EE1421178\r
+ for <notmuch@notmuchmail.org>; Thu, 24 Oct 2013 08:19:54 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 3g2qnhGIjRWc for <notmuch@notmuchmail.org>;\r
+ Thu, 24 Oct 2013 08:19:50 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu\r
+ [18.9.25.15])\r
+ by olra.theworths.org (Postfix) with ESMTP id 37C91429E52\r
+ for <notmuch@notmuchmail.org>; Thu, 24 Oct 2013 08:19:28 -0700 (PDT)\r
+X-AuditID: 1209190f-b7fa08e0000009c6-e0-52693a7f7da6\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id EA.10.02502.F7A39625; Thu, 24 Oct 2013 11:19:27 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r9OFJFie018646; \r
+ Thu, 24 Oct 2013 11:19:15 -0400\r
+Received: from drake.dyndns.org\r
+ (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+ [216.15.114.40]) (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r9OFJCI1012915\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Thu, 24 Oct 2013 11:19:14 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1VZMgq-0006ds-P9; Thu, 24 Oct 2013 11:19:12 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 05/11] emacs: Move `notmuch-call-notmuch-process' to\r
+ notmuch-lib\r
+Date: Thu, 24 Oct 2013 11:19:05 -0400\r
+Message-Id: <1382627951-25252-6-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.8.4.rc3\r
+In-Reply-To: <1382627951-25252-1-git-send-email-amdragon@mit.edu>\r
+References: <1382627951-25252-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsUixG6nrltvlRlkcLzDyKJpurPF6rk8Ftdv\r
+ zmR2YPbYOesuu8et+6/ZPZ6tusUcwBzFZZOSmpNZllqkb5fAlfF59iPmgslCFdN7epkbGFv5\r
+ uxg5OSQETCTm3N3NAmGLSVy4t54NxBYS2McoMaejuIuRC8jeyCjx9dg1ZgjnDpPEn1m9rBDO\r
+ XEaJPasXMYG0sAloSGzbv5wRxBYRkJbYeXc2K4jNLBAtceTyDLCxwgLBEitnvwaaxMHBIqAq\r
+ cXBVJEiYV8BB4u6B74wQVyhJLDy1DayVU8BR4ufra4wQFzlI/Pp9hmUCI/8CRoZVjLIpuVW6\r
+ uYmZOcWpybrFyYl5ealFuiZ6uZkleqkppZsYQYHFKcm/g/HbQaVDjAIcjEo8vBof0oOEWBPL\r
+ iitzDzFKcjApifLeM80MEuJLyk+pzEgszogvKs1JLT7EKMHBrCTCO00PKMebklhZlVqUD5OS\r
+ 5mBREue9yWEfJCSQnliSmp2aWpBaBJOV4eBQkuD9ZwnUKFiUmp5akZaZU4KQZuLgBBnOAzRc\r
+ xgpkeHFBYm5xZjpE/hSjopQ47yWQZgGQREZpHlwvLPJfMYoDvSLM+wGkigeYNOC6XwENZgIa\r
+ PGVJGsjgkkSElFQDY/FjqbfzuB6by52bq+HEnVQikFCQxLn9Kp+1rnxpR9DZXbciIuNvZISe\r
+ 5txw9Zcg8+9UXy6Js89/cO+99WRv0rX1krvbatRuHby/aNL3Pz/mWMo4GshavthivIQ7KXjr\r
+ jhs3eU+3iVrZGi9aPO1u59kPkea5DZ95dGuOm8q9nshcb7/vzNGgQCWW4oxEQy3mouJEABHU\r
+ xF7XAgAA\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 24 Oct 2013 15:19:54 -0000\r
+\r
+Previously, this was in notmuch.el, but all of the other notmuch call\r
+wrappers were in notmuch-lib.el. Move `notmuch-call-notmuch-process'\r
+to live with its friends. This happens to fix a missing dependency\r
+from notmuch-tag.el, which required notmuch-lib, but not notmuch.\r
+---\r
+ emacs/notmuch-lib.el | 11 +++++++++++\r
+ emacs/notmuch.el | 11 -----------\r
+ 2 files changed, 11 insertions(+), 11 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+index 58f3313..4e0604e 100644\r
+--- a/emacs/notmuch-lib.el\r
++++ b/emacs/notmuch-lib.el\r
+@@ -534,6 +534,17 @@ You may need to restart Emacs or upgrade your notmuch package."))\r
+ ;; `notmuch-logged-error' does not return.\r
+ ))))\r
+ \r
++(defun notmuch-call-notmuch-process (&rest args)\r
++ "Synchronously invoke \"notmuch\" with the given list of arguments.\r
++\r
++If notmuch exits with a non-zero status, output from the process\r
++will appear in a buffer named \"*Notmuch errors*\" and an error\r
++will be signaled."\r
++ (with-temp-buffer\r
++ (let ((status (apply #'call-process notmuch-command nil t nil args)))\r
++ (notmuch-check-exit-status status (cons notmuch-command args)\r
++ (buffer-string)))))\r
++\r
+ (defun notmuch-call-notmuch-sexp (&rest args)\r
+ "Invoke `notmuch-command' with ARGS and return the parsed S-exp output.\r
+ \r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 53e9826..496c8ec 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -535,17 +535,6 @@ If BARE is set then do not prefix with \"thread:\""\r
+ (let ((message-id (notmuch-search-find-thread-id)))\r
+ (notmuch-mua-new-reply message-id prompt-for-sender nil)))\r
+ \r
+-(defun notmuch-call-notmuch-process (&rest args)\r
+- "Synchronously invoke \"notmuch\" with the given list of arguments.\r
+-\r
+-If notmuch exits with a non-zero status, output from the process\r
+-will appear in a buffer named \"*Notmuch errors*\" and an error\r
+-will be signaled."\r
+- (with-temp-buffer\r
+- (let ((status (apply #'call-process notmuch-command nil t nil args)))\r
+- (notmuch-check-exit-status status (cons notmuch-command args)\r
+- (buffer-string)))))\r
+-\r
+ (defun notmuch-search-set-tags (tags &optional pos)\r
+ (let ((new-result (plist-put (notmuch-search-get-result pos) :tags tags)))\r
+ (notmuch-search-update-result new-result pos)))\r
+-- \r
+1.8.4.rc3\r
+\r