From 3ccd481d04155b4602d44b68ba8dd25d80202215 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 8 Apr 2015 15:16:25 +0200 Subject: Update org capture templates --- emacs/.emacs.d/site-lisp/org-init.el | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'emacs/.emacs.d/site-lisp/org-init.el') diff --git a/emacs/.emacs.d/site-lisp/org-init.el b/emacs/.emacs.d/site-lisp/org-init.el index ddfd4c7..ac2b3cc 100644 --- a/emacs/.emacs.d/site-lisp/org-init.el +++ b/emacs/.emacs.d/site-lisp/org-init.el @@ -67,6 +67,15 @@ (file-name-base (directory-file-name desktop-dirname)))) "\n %?")) +(defun taiga-org-task-template () + "Turn taiga task TASK into an org task." + (let* ((project (taiga-read-project)) + (user-story (taiga-read-userstory (alist-get 'id project))) + (task (taiga-read-task (alist-get 'id project) + (alist-get 'id user-story)))) + (concat + "* " (alist-get 'subject task) "\n"))) + (defun oni:org-maybe-outline-path () (let ((outline-path (org-format-outline-path (org-get-outline-path)))) (unless (string= outline-path "") @@ -112,10 +121,10 @@ (setq org-capture-templates `(("t" "Task" entry (file+headline "~/documents/org/tasks" "Inbox") "* TODO %? %(org-init-get-tag-name)" - :empty-lines-before 1) + :empty-lines 1) ("T" "Linked task" entry (file "~/documents/org/tasks" "Inbox") "* TODO %? %(org-init-get-tag-name)\n\n %a" - :empty-lines-before 1) + :empty-lines 1) ("a" "Appointment" entry (file "~/documents/org/tasks" "Inbox") "* %?\n %^T\n\n %a" :empty-lines-before 1) @@ -124,6 +133,12 @@ :empty-lines-before 1) ("l" "Log entry" entry (file+datetree "~/documents/org/log.org") "* %<%c>\n <%<%Y-%m-%d %H:%M>>\n\n %?" + :empty-lines-before 1) + ("d" "10 things to do today" entry (file+datetree "~/documents/org/dailies.org") + "* %<%R> [0/10]\n\n - [ ] %?\n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] " + :empty-lines-before 1) + ("w" "Taiga task" entry (file+headline "~/documents/org/tasks" "Inbox") + (function taiga-org-task-template) :empty-lines-before 1))) (setq org-contacts-files '("~/documents/org/misc/contacts.org")) (setq org-agenda-show-outline-path nil) -- cgit v1.2.3-54-g00ecf