--- /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 23482429E30\r
+ for <notmuch@notmuchmail.org>; Fri, 31 May 2013 17:40:22 -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 6w0ZUJ-z-4dL for <notmuch@notmuchmail.org>;\r
+ Fri, 31 May 2013 17:40:14 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu\r
+ [18.9.25.12])\r
+ by olra.theworths.org (Postfix) with ESMTP id 937B8431FBD\r
+ for <notmuch@notmuchmail.org>; Fri, 31 May 2013 17:40:14 -0700 (PDT)\r
+X-AuditID: 1209190c-b7f566d000004c69-41-51a942eeaff6\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+ by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 05.73.19561.EE249A15; Fri, 31 May 2013 20:40:14 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r510eCOd032002; \r
+ Fri, 31 May 2013 20:40:13 -0400\r
+Received: from drake.dyndns.org (c-76-21-105-205.hsd1.ca.comcast.net\r
+ [76.21.105.205]) (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 r510e9jf020937\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Fri, 31 May 2013 20:40:12 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1UiZrd-0003QN-5Y; Fri, 31 May 2013 20:40:09 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 0/6] Make Emacs search use sexp format\r
+Date: Fri, 31 May 2013 20:40:02 -0400\r
+Message-Id: <1370047208-12785-1-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrHIsWRmVeSWpSXmKPExsUixCmqrfvOaWWgwbK5XBar5/JYXL85k9ni\r
+ zcp5rA7MHjtn3WX3OPx1IYvHs1W3mAOYo7hsUlJzMstSi/TtErgy3vU+YirYJlBx6MJ+pgbG\r
+ KzxdjBwcEgImEve6gExOIFNM4sK99WxdjFwcQgL7GCXm3t7EDuFsZJT4ePw/K4Rzmkli2/7v\r
+ UM5cRokzi06ygPSzCWgAJZYzgtgiAtISO+/OZgWxmQUMJS5/7QCrERawlLh/8Q6YzSKgKvHx\r
+ 8lawGl4BB4l7/98yQtyhKNH9bALbBEbeBYwMqxhlU3KrdHMTM3OKU5N1i5MT8/JSi3QN9XIz\r
+ S/RSU0o3MYKDRZJnB+Obg0qHGAU4GJV4eDtWrQgUYk0sK67MPcQoycGkJMo723FloBBfUn5K\r
+ ZUZicUZ8UWlOavEhRgkOZiUR3vw5QOW8KYmVValF+TApaQ4WJXHeyyk3/YUE0hNLUrNTUwtS\r
+ i2CyMhwcShK8L0GGChalpqdWpGXmlCCkmTg4QYbzAA0/B1LDW1yQmFucmQ6RP8WoKCXOewEk\r
+ IQCSyCjNg+uFRfMrRnGgV4R5uYGxLcQDTARw3a+ABjMBDX5ivRxkcEkiQkqqgbH7ZvfmzoQ3\r
+ +gvOnxLKskmWvGnguz68gGVZ/pF6nhnVpjE65mv4klIfrvf4NtGVt+3Xi2TLlZ1zdC0aN2js\r
+ 2sJ0eJlv+cKpH0x+J03atnkaM69p1epnsccLOKt7Xe6+CcuOnJNUe2aij0jOHttbX/lcIn77\r
+ h19w+KKx/twPpfaMV5W73r9d0qnEUpyRaKjFXFScCACywxbewQIAAA==\r
+Cc: tomi.ollila@iki.fi\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: Sat, 01 Jun 2013 00:40:22 -0000\r
+\r
+This is v3 of id:1369934016-22308-1-git-send-email-amdragon@mit.edu.\r
+This tweaks the shell invocation as suggested by Tomi and fixes two\r
+comment typos pointed out by Mark. It also adds a NEWS patch. I'm\r
+going to go ahead and mark this ready because of Tomi's and Mark's\r
+reviews of v2.\r
+\r
+The diff from v2 follows\r
+\r
+diff --git a/NEWS b/NEWS\r
+index 80abd97..2a4bde6 100644\r
+--- a/NEWS\r
++++ b/NEWS\r
+@@ -66,6 +66,17 @@ notmuch-vim, but of course that is their decision.\r
+ Emacs Interface\r
+ ---------------\r
+ \r
++Better handling of errors in search buffers\r
++\r
++ Instead of interleaving errors in search result buffers, search mode\r
++ now reports errors in the minibuffer.\r
++\r
++Faster search results\r
++\r
++ Communication between search mode and the notmuch CLI is now more\r
++ efficient because it uses the CLI's S-expression support. As a\r
++ result, search mode should now fill search buffers faster.\r
++\r
+ No Emacs 22 support\r
+ \r
+ The Emacs 22 support added late 2010 was sufficient only for a short\r
+diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+index 180f63d..a206808 100644\r
+--- a/emacs/notmuch-lib.el\r
++++ b/emacs/notmuch-lib.el\r
+@@ -497,8 +497,8 @@ status."\r
+ (command (or (executable-find notmuch-command)\r
+ (error "command not found: %s" notmuch-command)))\r
+ (proc (apply #'start-process name buffer\r
+- "sh" "-c"\r
+- "ERR=\"$1\"; shift; exec \"$0\" \"$@\" 2>\"$ERR\""\r
++ "/bin/sh" "-c"\r
++ "exec 2>\"$1\"; shift; exec \"$0\" \"$@\""\r
+ command err-file args)))\r
+ (process-put proc 'err-file err-file)\r
+ (process-put proc 'sub-sentinel sentinel)\r
+@@ -533,8 +533,8 @@ status."\r
+ (when warnings\r
+ (notmuch-logged-error (car warnings) (cdr warnings)))))\r
+ (error\r
+- ;; Emacs behaves strangely if error an error escapes from a\r
+- ;; sentinel, so turns errors into messages.\r
++ ;; Emacs behaves strangely if an error escapes from a sentinel,\r
++ ;; so turn errors into messages.\r
+ (message "%s" (error-message-string err))))\r
+ (ignore-errors (delete-file err-file))))\r
+ \r
+\r
+\r