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 1DE69431FD6 for ; Thu, 4 Jul 2013 00:38:48 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 cPPgODNus2mM for ; Thu, 4 Jul 2013 00:38:39 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id BB25F431FBF for ; Thu, 4 Jul 2013 00:38:39 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id A737B100051; Thu, 4 Jul 2013 10:38:33 +0300 (EEST) From: Tomi Ollila To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH] contrib: pick: use notmuch-start-notmuch In-Reply-To: <1372921788-16042-1-git-send-email-markwalters1009@gmail.com> References: <1372921788-16042-1-git-send-email-markwalters1009@gmail.com> User-Agent: Notmuch/0.15.2+193~g7350bd4 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain 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: Thu, 04 Jul 2013 07:38:48 -0000 On Thu, Jul 04 2013, Mark Walters wrote: > This uses the new notmuch-start-notmuch function which should give > better handling of stderr and errors generally. > --- > > Hi > > This converts pick to Austin's new async error handling code (see > commit 08fde50bf3a4c54f6413aff4052e0d84392463f9). That code separates > stderr from stdout and makes sure that appropriate messages are > displayed to the user. > > I think this is simple enough and beneficial enough to go in for 0.16 > (so I will tag it 0.16). Of course it only affects notmuch-pick so > is relatively safe. FWIW the code LGTM. Do the pick tests use this and do those pass ? Tomi > > Best wishes > > Mark > > > contrib/notmuch-pick/notmuch-pick.el | 7 +++---- > 1 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el > index fbd7c0b..7f5f729 100644 > --- a/contrib/notmuch-pick/notmuch-pick.el > +++ b/contrib/notmuch-pick/notmuch-pick.el > @@ -817,16 +817,15 @@ Complete list of currently available key bindings: > (if (equal (car (process-lines notmuch-command "count" search-args)) "0") > (setq search-args basic-query)) > (if notmuch-pick-asynchronous-parser > - (let ((proc (start-process > - "notmuch-pick" buffer > - notmuch-command "show" "--body=false" "--format=sexp" > + (let ((proc (notmuch-start-notmuch > + "notmuch-pick" buffer #'notmuch-pick-process-sentinel > + "show" "--body=false" "--format=sexp" > message-arg search-args)) > ;; Use a scratch buffer to accumulate partial output. > ;; This buffer will be killed by the sentinel, which > ;; should be called no matter how the process dies. > (parse-buf (generate-new-buffer " *notmuch pick parse*"))) > (process-put proc 'parse-buf parse-buf) > - (set-process-sentinel proc 'notmuch-pick-process-sentinel) > (set-process-filter proc 'notmuch-pick-process-filter) > (set-process-query-on-exit-flag proc nil)) > (progn > -- > 1.7.9.1 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch