From f1dac129a7f61d3a607c9be17cad7d12410fca7a Mon Sep 17 00:00:00 2001 From: Daniel Ma Date: Thu, 12 Apr 2018 15:40:18 -0700 Subject: [PATCH] Show only text of links Fixes #2 --- magit-org-todos.el | 12 ++++++++---- todo.org | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/magit-org-todos.el b/magit-org-todos.el index b9cae21..56a031d 100644 --- a/magit-org-todos.el +++ b/magit-org-todos.el @@ -59,11 +59,15 @@ (magit-insert-section (org-todos-wrapper) (magit-insert-heading "Todos:") (dolist (todo todos) - (let ((keyword (org-element-property :todo-keyword todo)) - (title (org-element-property :raw-value todo))) + (let* ((keyword (org-element-property :todo-keyword todo)) + (title (org-element-property :title todo))) (magit-insert-section (org-todos title) - (insert (concat "* " (propertize keyword 'face 'org-todo) " " title)) - (insert ?\n)))) + (insert (concat "* " (propertize keyword 'face 'org-todo) " ")) + (dolist (el title) + (if (and (listp el) (eq (car el) 'link)) + (insert (car (last el))) + (insert el))))) + (insert ?\n)) (insert ?\n))))) ;;;###autoload diff --git a/todo.org b/todo.org index abd61a8..7a1b40f 100644 --- a/todo.org +++ b/todo.org @@ -1,2 +1,2 @@ -* TODO add interactivity +* TODO add interactivity [[https://feedly.com/][the link]] * TODO tweet about it