From: Austin Clements Date: Sun, 9 Jun 2013 04:45:37 +0000 (+2000) Subject: [PATCH 1/2] emacs: Don't report CLI signals sent by Emacs as errors X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=08545b39b05d6bb52127fb6fc7c4acde3d25e946;p=notmuch-archives.git [PATCH 1/2] emacs: Don't report CLI signals sent by Emacs as errors --- diff --git a/99/16761b8af7edc9d6ffca6761188c1b61e76648 b/99/16761b8af7edc9d6ffca6761188c1b61e76648 new file mode 100644 index 000000000..a4530b5a4 --- /dev/null +++ b/99/16761b8af7edc9d6ffca6761188c1b61e76648 @@ -0,0 +1,104 @@ +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 1B30F431FC2 + for ; Sat, 8 Jun 2013 21:45:59 -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 4he4WgEc1uFB for ; + Sat, 8 Jun 2013 21:45:51 -0700 (PDT) +Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu + [18.7.68.37]) + by olra.theworths.org (Postfix) with ESMTP id 8C7F5431FB6 + for ; Sat, 8 Jun 2013 21:45:51 -0700 (PDT) +X-AuditID: 12074425-b7f966d00000454c-ca-51b4087fc6e3 +Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) + by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP + id C8.4E.17740.F7804B15; Sun, 9 Jun 2013 00:45:51 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r594jnNb004329; + Sun, 9 Jun 2013 00:45:49 -0400 +Received: from drake.dyndns.org + (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com + [216.15.114.40]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r594jl8i009510 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Sun, 9 Jun 2013 00:45:48 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1UlXVj-0003wT-IS; Sun, 09 Jun 2013 00:45:47 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH 1/2] emacs: Don't report CLI signals sent by Emacs as errors +Date: Sun, 9 Jun 2013 00:45:37 -0400 +Message-Id: <1370753138-15021-2-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <1370753138-15021-1-git-send-email-amdragon@mit.edu> +References: <1370753138-15021-1-git-send-email-amdragon@mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFtrFIsWRmVeSWpSXmKPExsUixCmqrVvPsSXQ4HOTlMWefV4W12/OZHZg + 8rh7msvj2apbzAFMUVw2Kak5mWWpRfp2CVwZJx+vYC7YyF2x4ds1tgbGJs4uRk4OCQETiT9v + WtghbDGJC/fWs3UxcnEICexjlHiy6wM7hLOBUeLNo8uMEM5tJomvN09AZeYyStxZdoYNpJ9N + QENi2/7ljCC2iIC0xM67s1m7GDk4mAWcJNravEDCwgI+EgevvwMrYRFQlbgz5yCYzSvgIHFr + ywQ2iDMUJbqfQdicAo4Sbd+fMIOMEQKq6e9yn8DIv4CRYRWjbEpulW5uYmZOcWqybnFyYl5e + apGuhV5uZoleakrpJkZQELG7qO5gnHBI6RCjAAejEg+vwLrNgUKsiWXFlbmHGCU5mJREeVcw + bAkU4kvKT6nMSCzOiC8qzUktPsQowcGsJMJ76TxQOW9KYmVValE+TEqag0VJnPdGyk1/IYH0 + xJLU7NTUgtQimKwMB4eSBG8jO9BQwaLU9NSKtMycEoQ0EwcnyHAeoOGnQGp4iwsSc4sz0yHy + pxgVpcR5i0ASAiCJjNI8uF5YlL9iFAd6RZh3MkgVDzBBwHW/AhrMBDR4+qsNIINLEhFSUg2M + 1ltEs9hF2ln8X5x4zhLer55tpCJ+88DHOEluQ30FrYfr+qacuXj//6eIyCSjsxv/LSmdGxA2 + a8LPvWr3bgoss1xtc7jWvKGAX//lwsOZVfKKHRK9p2dUC/KHxtfwzLXt3+TWdvP/jg/v/+67 + WNq7ImVi4ZUNwnM9picdWuo6WXGig39Wjfg7JZbijERDLeai4kQAR1L1BM0CAAA= +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: Sun, 09 Jun 2013 04:45:59 -0000 + +Previously, when the user killed the search buffer before the CLI +search process had completed, we would report the signal sent by Emacs +to kill the CLI to the user as an error. Fix this by only reporting +error exits if the process buffer is still live. We still report +stderr output regardless in case stderr output was relevant to why the +user killed the search buffer (such as a wrapper script being stuck). +--- + emacs/notmuch-lib.el | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el +index 28f78e0..534f217 100644 +--- a/emacs/notmuch-lib.el ++++ b/emacs/notmuch-lib.el +@@ -528,8 +528,12 @@ status." + (when sub-sentinel + (funcall sub-sentinel proc event)) + ;; Check the exit status. This will signal an error if the +- ;; exit status is non-zero. +- (notmuch-check-async-exit-status proc event real-command err-file) ++ ;; exit status is non-zero. Don't do this if the process ++ ;; buffer is dead since that means Emacs killed the process ++ ;; and there's no point in telling the user that (but we ++ ;; still check for and report stderr output below). ++ (when (buffer-live-p (process-buffer proc)) ++ (notmuch-check-async-exit-status proc event real-command err-file)) + ;; If that didn't signal an error, then any error output was + ;; really warning output. Show warnings, if any. + (let ((warnings +-- +1.7.10.4 +