From 188692cd8d9706b1186791cae89ea62a8e800b86 Mon Sep 17 00:00:00 2001 From: Patrick Winter Date: Wed, 4 Sep 2019 21:27:05 +0200 Subject: [PATCH] Only store link of org-mode link not description --- taskwarrior.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/taskwarrior.el b/taskwarrior.el index afa53db..62d1053 100644 --- a/taskwarrior.el +++ b/taskwarrior.el @@ -145,10 +145,15 @@ (when (string-match "^.*Created task \\([0-9]+\\)\\.*$" output) (message (match-string 1 output)))) +(defun taskwarrior--parse-org-link (link) + (string-match org-bracket-link-regexp link) + (list + (match-string 1 link) + (match-string 3 link))) (defun taskwarrior-capture (arg) (interactive "P") - (let* ((link (org-store-link arg)) + (let* ((link (car (cdr (taskwarrior--parse-org-link (org-store-link arg))))) (description (read-from-minibuffer "Description: ")) (id (taskwarrior--parse-created-task-id (shell-command-to-string (format "task add %s" description)))))