[PATCH] contrib: pick: use notmuch-start-notmuch
authorMark Walters <markwalters1009@gmail.com>
Thu, 4 Jul 2013 07:09:48 +0000 (08:09 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:55:51 +0000 (09:55 -0800)
f2/fdb049b5c8ecb67010863e9b2893c15e352177 [new file with mode: 0644]

diff --git a/f2/fdb049b5c8ecb67010863e9b2893c15e352177 b/f2/fdb049b5c8ecb67010863e9b2893c15e352177
new file mode 100644 (file)
index 0000000..6dc5490
--- /dev/null
@@ -0,0 +1,111 @@
+Return-Path: <markwalters1009@gmail.com>\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 89355431FD0\r
+       for <notmuch@notmuchmail.org>; Thu,  4 Jul 2013 00:10:04 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       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 gY8Z1DjpBuZZ for <notmuch@notmuchmail.org>;\r
+       Thu,  4 Jul 2013 00:09:57 -0700 (PDT)\r
+Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com\r
+       [209.85.215.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id C8E15431FBF\r
+       for <notmuch@notmuchmail.org>; Thu,  4 Jul 2013 00:09:56 -0700 (PDT)\r
+Received: by mail-ea0-f182.google.com with SMTP id d10so557410eaj.41\r
+       for <notmuch@notmuchmail.org>; Thu, 04 Jul 2013 00:09:54 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer;\r
+       bh=dXpQCSuZGKGrOz0BYCMjHvHc5g3noH6Bcw9Ft2CCRMA=;\r
+       b=zfaTVa8EU2HII4ZIbubL91HV6nPHWfDTCdtWMi/LrG7FgcwcWUoQSay63AYXiup7sZ\r
+       2vFAcfWY1Xf+c6x1hMRNG17oC6pLh03VU5Hhy3oM8SKg5PJ75G7aBCsEA5d7+L3NPki/\r
+       D9pZr0IEMGunun1Ry6BIaVES8f27B9nd3w+2irPlvP8pPmCFdDaC14fUaUkPAO6iftlk\r
+       LV+jzcS+RVndWwAKJbOw8tobGfgDufFp4EipqXPD4qCTuxq4ji731EP1ocXb3pXFUxSD\r
+       gQWcX83ZN2WQidizr4mmgNiX9KRtFSx36cVEs0rPYJkfE8pggLEE/EEcWY/mxclZkq38\r
+       ryew==\r
+X-Received: by 10.14.149.141 with SMTP id x13mr4956634eej.77.1372921792797;\r
+       Thu, 04 Jul 2013 00:09:52 -0700 (PDT)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPSA id p49sm3036046eeu.2.2013.07.04.00.09.51\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Thu, 04 Jul 2013 00:09:52 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] contrib: pick: use notmuch-start-notmuch\r
+Date: Thu,  4 Jul 2013 08:09:48 +0100\r
+Message-Id: <1372921788-16042-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\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, 04 Jul 2013 07:10:04 -0000\r
+\r
+This uses the new notmuch-start-notmuch function which should give\r
+better handling of stderr and errors generally.\r
+---\r
+\r
+Hi\r
+\r
+This converts pick to Austin's new async error handling code (see\r
+commit 08fde50bf3a4c54f6413aff4052e0d84392463f9). That code separates\r
+stderr from stdout and makes sure that appropriate messages are\r
+displayed to the user.\r
+\r
+I think this is simple enough and beneficial enough to go in for 0.16\r
+(so I will tag it 0.16). Of course it only affects notmuch-pick so\r
+is relatively safe.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+ contrib/notmuch-pick/notmuch-pick.el |    7 +++----\r
+ 1 files changed, 3 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
+index fbd7c0b..7f5f729 100644\r
+--- a/contrib/notmuch-pick/notmuch-pick.el\r
++++ b/contrib/notmuch-pick/notmuch-pick.el\r
+@@ -817,16 +817,15 @@ Complete list of currently available key bindings:\r
+     (if (equal (car (process-lines notmuch-command "count" search-args)) "0")\r
+       (setq search-args basic-query))\r
+     (if notmuch-pick-asynchronous-parser\r
+-      (let ((proc (start-process\r
+-                   "notmuch-pick" buffer\r
+-                   notmuch-command "show" "--body=false" "--format=sexp"\r
++      (let ((proc (notmuch-start-notmuch\r
++                   "notmuch-pick" buffer #'notmuch-pick-process-sentinel\r
++                   "show" "--body=false" "--format=sexp"\r
+                    message-arg search-args))\r
+             ;; Use a scratch buffer to accumulate partial output.\r
+               ;; This buffer will be killed by the sentinel, which\r
+               ;; should be called no matter how the process dies.\r
+               (parse-buf (generate-new-buffer " *notmuch pick parse*")))\r
+           (process-put proc 'parse-buf parse-buf)\r
+-        (set-process-sentinel proc 'notmuch-pick-process-sentinel)\r
+         (set-process-filter proc 'notmuch-pick-process-filter)\r
+         (set-process-query-on-exit-flag proc nil))\r
+       (progn\r
+-- \r
+1.7.9.1\r
+\r