Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3AA206DE02DD for ; Fri, 10 Jun 2016 16:03:12 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.335 X-Spam-Level: X-Spam-Status: No, score=-0.335 tagged_above=-999 required=5 tests=[AWL=0.235, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2UMZPFIhmCcs for ; Fri, 10 Jun 2016 16:03:04 -0700 (PDT) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by arlo.cworth.org (Postfix) with ESMTPS id 2FB926DE00C9 for ; Fri, 10 Jun 2016 16:03:04 -0700 (PDT) Received: by mail-wm0-f66.google.com with SMTP id n184so1713657wmn.1 for ; Fri, 10 Jun 2016 16:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/GFYv7bVXxZw2lNxPhzsyheP6HUNzdAEIAUUIEaEXUM=; b=tK2JBN9XeVo9HQCftoccsqRga+GDqT0vMOVTjOl0Wt1e9TVyQEehQMQV3QTRjpBpjO 8VbZLYK9EGpFlwCggZxJ93W59gqmWSg/Uu/0GUreykjjB395Bqh9eOcBs0hBr5smL5uj 6qJbE2nwoTgCoA7YpONSrMnL9kW95BZyLZfGpSvWWXRVOUqqhLSxyDozQKfV5hdK4XxA V9ssBeECat4j+x92KqRw5rB3j94PyqxqhtqVs6gQN4r9EI1G9m3ephtMEorhREhbupkl MxY1SNdJHWRYCFLi3jJlkV8SUm3sjaDC6JqlQpDSq/NKHpl0NKdmVlUkf+fNK1APjIii h+Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/GFYv7bVXxZw2lNxPhzsyheP6HUNzdAEIAUUIEaEXUM=; b=DVdsNYoQ0cHpS9siL8x/TtZbD0MQoiRY3Pz33eDR6+5HsuJ9fF2lpPoTF14z/kKRVu LKw2+Q6WsV44WbNNuJcd5zV2KviYAttLxBO2omQwAx6M4XrgKGr8IecERal7ptsb8oS9 CTQxATDftWh3j+Hlz57nZVE42RukKx5SvwtS7Vdna+IQKm0AaYsMJliXSaugtSq1PVB6 HVsZbR7nHRe03OPQqlZgy46XP9RhZPSesJbxzqGL+Mwe2/z3Z1s6qPuLmVc47PBfczeq XN7bk0RBNmV0/1yxgoTZoKmBSaxEq+Wko7QZOY3JpkUORInAKlbWYpMh8GXtHu4U3cA7 dbUA== X-Gm-Message-State: ALyK8tLJalTRBaeScsin0BslanLGLxcF7Y/DxOX9+6CZxmFc2OQYAN/OFTPkjesbU6jRXg== X-Received: by 10.28.129.197 with SMTP id c188mr1143892wmd.46.1465599782549; Fri, 10 Jun 2016 16:03:02 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id o4sm14423400wjx.45.2016.06.10.16.03.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jun 2016 16:03:01 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH 1/6] emacs: notmuch-check-exit-status bugfix Date: Sat, 11 Jun 2016 00:02:47 +0100 Message-Id: <1465599772-10297-2-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1465599772-10297-1-git-send-email-markwalters1009@gmail.com> References: <1465599772-10297-1-git-send-email-markwalters1009@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 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: Fri, 10 Jun 2016 23:03:12 -0000 This function prints diagnostic information in the event of an error. However, one of the callers has an optional :stdin-string keyword argument. This causes the error printing routine to error itself. Rather than reach notmuch-check-exit-status about the possible keyword arguments (currently only one but could be more in the future) this commit just tells notmuch-check-exit-status how to print non-string arguments. --- emacs/notmuch-lib.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 1781af4..2f015b0 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -790,9 +790,15 @@ You may need to restart Emacs or upgrade your notmuch package.")) (insert-file-contents err-file) (unless (eobp) (buffer-string))))) + (command-string + (mapconcat (lambda (arg) + (shell-quote-argument + (cond ((stringp arg) arg) + ((symbolp arg) (symbol-name arg)) + (t "*UNKNOWN ARGUMENT*")))) + command " ")) (extra - (concat - "command: " (mapconcat #'shell-quote-argument command " ") "\n" + (concat "command: " command-string "\n" (if (integerp exit-status) (format "exit status: %s\n" exit-status) (format "exit signal: %s\n" exit-status)) -- 2.1.4