]> rtime.felk.cvut.cz Git - notmuch.git/commitdiff
emacs: notmuch-check-exit-status bugfix
authorMark Walters <markwalters1009@gmail.com>
Sat, 3 Sep 2016 22:59:38 +0000 (23:59 +0100)
committerDavid Bremner <david@tethera.net>
Sun, 4 Sep 2016 11:22:30 +0000 (08:22 -0300)
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

index 1781af48d4de1da4476321f864281f5dcfb36c57..2f015b0d29b0d007136b711354f503e9d86f1c62 100644 (file)
@@ -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))