From: Mark Walters Date: Fri, 3 Jun 2016 17:49:54 +0000 (+0100) Subject: [PATCH v2 2/3] emacs: notmuch-check-exit-status bugfix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2449239ad91903de41c49e39c89b6d7f08af5c83;p=notmuch-archives.git [PATCH v2 2/3] emacs: notmuch-check-exit-status bugfix --- diff --git a/92/673aa02f97aca8c7d58281119cfb549809031b b/92/673aa02f97aca8c7d58281119cfb549809031b new file mode 100644 index 000000000..cd831cf90 --- /dev/null +++ b/92/673aa02f97aca8c7d58281119cfb549809031b @@ -0,0 +1,115 @@ +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 CA7776DE02CC + for ; Fri, 3 Jun 2016 10:51:01 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.325 +X-Spam-Level: +X-Spam-Status: No, score=-0.325 tagged_above=-999 required=5 tests=[AWL=0.245, + 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 HCxZ8GZEbgDX for ; + Fri, 3 Jun 2016 10:50:54 -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 DF8636DE02BF for + ; Fri, 3 Jun 2016 10:50:33 -0700 (PDT) +Received: by mail-wm0-f66.google.com with SMTP id a136so1034934wme.0 + for ; Fri, 03 Jun 2016 10:50:33 -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=Hw2GOaxAjD3m9JeFcjfju5VfNqECkJpvkJfMNjBH3Lw=; + b=FG9C6RCNEEI3SBTMRjBlP4+QrvmfljxpmVhcEG50lwWjZZpX/TczFy8lxIXUHA90B2 + epbHVcowFcRHZT5tFFsd9a6p1E6wTc1oDN0f7J2ZVlzpL+DwjzKVtUyDR64qut/+SijY + eSy3ZFgqOB+ZL1/arg9Qf7MFbo9urwKIkuHKznpunCEmfSghqNe/fe5zK1o1Zk87Lh0P + hSxMnf4BEA4M6JEdfIeh0NBUrsfyXAxx6fG+2Llx5xXlHxLghi+/igNmnT7ZNYhlRJ4C + IxIRkC7mZMe0PNLbpkkw1Wq5PUWQHonuFg8L7R2Q7PlfxdAPQGsV0WZ0AkWk475GI19e + i7Kw== +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=Hw2GOaxAjD3m9JeFcjfju5VfNqECkJpvkJfMNjBH3Lw=; + b=E++y78lPNYzcanD+1OomlevVw48LYs6QXoKRY5METXJ+kW8tTYay8pZzqEZn47J+rl + +zp1yrwiWYgkedpjl365MWzDQqT8QzydDTKZg2RnlM9QJ0XTKDFjUr2hNkrbgP/Lannt + 1Dzf29DJ5dCeEahJof/SeGHUmX6yxQTZh1Pkj3twieJaGCK9Uu2olr4ZbLWkBnfoEJLf + cRRLDRmdg6fmOyncya6D+D6eghyXaF5aqMJ5l3LY7iA0eB/N+R+dJghI86bS4erzywiD + JO+13EeoM6FkEO5ZACoqd/nBXjo3NLZY5deo/snD2JIPs32TUU9uoCO/dL8mwpf1GSvG + ILpQ== +X-Gm-Message-State: + ALyK8tLwwIcOBy6KSl8B2Ed4/fcy8aOXetKvDuNILwf0F/yg0+ScvYNvtyspjHeRA9RPSA== +X-Received: by 10.194.114.228 with SMTP id jj4mr4583287wjb.121.1464976232483; + Fri, 03 Jun 2016 10:50:32 -0700 (PDT) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by smtp.gmail.com with ESMTPSA id o4sm6759923wjx.45.2016.06.03.10.50.22 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 03 Jun 2016 10:50:23 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v2 2/3] emacs: notmuch-check-exit-status bugfix +Date: Fri, 3 Jun 2016 18:49:54 +0100 +Message-Id: <1464976195-23134-3-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1464976195-23134-1-git-send-email-markwalters1009@gmail.com> +References: <1464976195-23134-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, 03 Jun 2016 17:51:01 -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. +--- + +This is an existing bug in the emacs library which the postpone code +is liable to hit (if you try to save when the database is locked). + +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 f05ded6..36a7262 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 +