From e92708ae9ad98d7e1bfaad4173bf02645877351c Mon Sep 17 00:00:00 2001 From: Patrick Winter Date: Tue, 9 Apr 2019 13:38:15 +0200 Subject: [PATCH] Don't print shell command results to minibuffer The message function interprets it's input as a format string. So if the output of the shell command contains a % will result into an error... --- taskwarrior.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/taskwarrior.el b/taskwarrior.el index f908de5..a29d044 100644 --- a/taskwarrior.el +++ b/taskwarrior.el @@ -157,7 +157,7 @@ (defun taskwarrior-add (description) (interactive "sDescription: ") - (message (taskwarrior--shell-command "add" "" description)) + (taskwarrior--shell-command "add" "" description) (when (eq (buffer-name) taskwarrior-buffer-name) (taskwarrior-update-buffer))) @@ -167,7 +167,7 @@ (let ((id (taskwarrior-id-at-point)) (confirmation (read-from-minibuffer "Done [y/n]?: "))) (when (string= confirmation "y") - (message (taskwarrior--shell-command "done" id)) + (taskwarrior--shell-command "done" id) (taskwarrior-update-buffer)))) (defun taskwarrior-delete () @@ -176,7 +176,7 @@ (let ((id (taskwarrior-id-at-point)) (confirmation (read-from-minibuffer "Delete [y/n]?: "))) (when (string= confirmation "y") - (message (taskwarrior--shell-command "delete" id "" "" "yes")) + (taskwarrior--shell-command "delete" id "" "" "yes") (taskwarrior-update-buffer)))) ;; Setup a major mode for taskwarrior