[PATCH v2 2/3] emacs: notmuch-check-exit-status bugfix
authorMark Walters <markwalters1009@gmail.com>
Fri, 3 Jun 2016 17:49:54 +0000 (18:49 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:57 +0000 (16:21 -0700)
92/673aa02f97aca8c7d58281119cfb549809031b [new file with mode: 0644]

diff --git a/92/673aa02f97aca8c7d58281119cfb549809031b b/92/673aa02f97aca8c7d58281119cfb549809031b
new file mode 100644 (file)
index 0000000..cd831cf
--- /dev/null
@@ -0,0 +1,115 @@
+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 arlo.cworth.org (Postfix) with ESMTP id CA7776DE02CC\r
+ for <notmuch@notmuchmail.org>; Fri,  3 Jun 2016 10:51:01 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.325\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.325 tagged_above=-999 required=5 tests=[AWL=0.245,\r
+  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id HCxZ8GZEbgDX for <notmuch@notmuchmail.org>;\r
+ Fri,  3 Jun 2016 10:50:54 -0700 (PDT)\r
+Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com\r
+ [74.125.82.66]) by arlo.cworth.org (Postfix) with ESMTPS id DF8636DE02BF for\r
+ <notmuch@notmuchmail.org>; Fri,  3 Jun 2016 10:50:33 -0700 (PDT)\r
+Received: by mail-wm0-f66.google.com with SMTP id a136so1034934wme.0\r
+ for <notmuch@notmuchmail.org>; Fri, 03 Jun 2016 10:50:33 -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:in-reply-to:references;\r
+ bh=Hw2GOaxAjD3m9JeFcjfju5VfNqECkJpvkJfMNjBH3Lw=;\r
+ b=FG9C6RCNEEI3SBTMRjBlP4+QrvmfljxpmVhcEG50lwWjZZpX/TczFy8lxIXUHA90B2\r
+ epbHVcowFcRHZT5tFFsd9a6p1E6wTc1oDN0f7J2ZVlzpL+DwjzKVtUyDR64qut/+SijY\r
+ eSy3ZFgqOB+ZL1/arg9Qf7MFbo9urwKIkuHKznpunCEmfSghqNe/fe5zK1o1Zk87Lh0P\r
+ hSxMnf4BEA4M6JEdfIeh0NBUrsfyXAxx6fG+2Llx5xXlHxLghi+/igNmnT7ZNYhlRJ4C\r
+ IxIRkC7mZMe0PNLbpkkw1Wq5PUWQHonuFg8L7R2Q7PlfxdAPQGsV0WZ0AkWk475GI19e\r
+ i7Kw==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+ :references;\r
+ bh=Hw2GOaxAjD3m9JeFcjfju5VfNqECkJpvkJfMNjBH3Lw=;\r
+ b=E++y78lPNYzcanD+1OomlevVw48LYs6QXoKRY5METXJ+kW8tTYay8pZzqEZn47J+rl\r
+ +zp1yrwiWYgkedpjl365MWzDQqT8QzydDTKZg2RnlM9QJ0XTKDFjUr2hNkrbgP/Lannt\r
+ 1Dzf29DJ5dCeEahJof/SeGHUmX6yxQTZh1Pkj3twieJaGCK9Uu2olr4ZbLWkBnfoEJLf\r
+ cRRLDRmdg6fmOyncya6D+D6eghyXaF5aqMJ5l3LY7iA0eB/N+R+dJghI86bS4erzywiD\r
+ JO+13EeoM6FkEO5ZACoqd/nBXjo3NLZY5deo/snD2JIPs32TUU9uoCO/dL8mwpf1GSvG\r
+ ILpQ==\r
+X-Gm-Message-State:\r
+ ALyK8tLwwIcOBy6KSl8B2Ed4/fcy8aOXetKvDuNILwf0F/yg0+ScvYNvtyspjHeRA9RPSA==\r
+X-Received: by 10.194.114.228 with SMTP id jj4mr4583287wjb.121.1464976232483; \r
+ Fri, 03 Jun 2016 10:50:32 -0700 (PDT)\r
+Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
+ by smtp.gmail.com with ESMTPSA id o4sm6759923wjx.45.2016.06.03.10.50.22\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Fri, 03 Jun 2016 10:50:23 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 2/3] emacs: notmuch-check-exit-status bugfix\r
+Date: Fri,  3 Jun 2016 18:49:54 +0100\r
+Message-Id: <1464976195-23134-3-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1464976195-23134-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1464976195-23134-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 03 Jun 2016 17:51:01 -0000\r
+\r
+This function prints diagnostic information in the event of an\r
+error. However, one of the callers has an optional :stdin-string\r
+keyword argument. This causes the error printing routine to error\r
+itself.\r
+\r
+Rather than reach notmuch-check-exit-status about the possible keyword\r
+arguments (currently only one but could be more in the future) this\r
+commit just tells notmuch-check-exit-status how to print non-string arguments.\r
+---\r
+\r
+This is an existing bug in the emacs library which the postpone code\r
+is liable to hit (if you try to save when the database is locked).\r
+\r
+emacs/notmuch-lib.el | 10 ++++++++--\r
+ 1 file changed, 8 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+index f05ded6..36a7262 100644\r
+--- a/emacs/notmuch-lib.el\r
++++ b/emacs/notmuch-lib.el\r
+@@ -790,9 +790,15 @@ You may need to restart Emacs or upgrade your notmuch package."))\r
+                   (insert-file-contents err-file)\r
+                   (unless (eobp)\r
+                     (buffer-string)))))\r
++         (command-string\r
++          (mapconcat (lambda (arg)\r
++                       (shell-quote-argument\r
++                        (cond ((stringp arg) arg)\r
++                              ((symbolp arg) (symbol-name arg))\r
++                              (t "*UNKNOWN ARGUMENT*"))))\r
++                     command " "))\r
+          (extra\r
+-          (concat\r
+-           "command: " (mapconcat #'shell-quote-argument command " ") "\n"\r
++          (concat "command: " command-string "\n"\r
+            (if (integerp exit-status)\r
+                (format "exit status: %s\n" exit-status)\r
+              (format "exit signal: %s\n" exit-status))\r
+-- \r
+2.1.4\r
+\r