Only store link of org-mode link not description
This commit is contained in:
parent
d5baaacda9
commit
188692cd8d
1 changed files with 6 additions and 1 deletions
|
@ -145,10 +145,15 @@
|
||||||
(when (string-match "^.*Created task \\([0-9]+\\)\\.*$" output)
|
(when (string-match "^.*Created task \\([0-9]+\\)\\.*$" output)
|
||||||
(message (match-string 1 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)
|
(defun taskwarrior-capture (arg)
|
||||||
(interactive "P")
|
(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: "))
|
(description (read-from-minibuffer "Description: "))
|
||||||
(id (taskwarrior--parse-created-task-id
|
(id (taskwarrior--parse-created-task-id
|
||||||
(shell-command-to-string (format "task add %s" description)))))
|
(shell-command-to-string (format "task add %s" description)))))
|
||||||
|
|
Loading…
Reference in a new issue