emacs.d

bloated emacs configuration
git clone git://git.ckyln.com/~cem/emacs.d.git
Log | Files | Refs | README

commit e55df92c8482dd4207bb1a6c51e022795218415e
parent cbc01964636ea7c4a85eee8206caeffbc90396ec
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon,  3 Aug 2020 15:24:52 +0300

doct: add package for simple management of org capture templates

Diffstat:
Minit.org | 61++++++++++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 44 insertions(+), 17 deletions(-)

diff --git a/init.org b/init.org @@ -330,23 +330,6 @@ section. (org-refile-use-outline-path t) (org-outline-path-complete-in-steps nil) (org-refile-allow-creating-parent-nodes 'confirm) - (org-capture-templates - '(("t" "todo" entry (file "~/Org/refile.org") - "* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t) - ("r" "respond" entry (file "~/Org/refile.org") - "* NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t) - ("n" "note" entry (file "~/Org/refile.org") - "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t) - ("j" "Journal" entry (file+datetree "~/Org/diary.org") - "* %?\n%U\n" :clock-in t :clock-resume t) - ("w" "org-protocol" entry (file "~/Org/refile.org") - "* TODO Review %c\n%U\n" :immediate-finish t) - ("m" "Meeting" entry (file "~/Org/refile.org") - "* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t) - ("p" "Phone call" entry (file "~/Org/refile.org") - "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t) - ("h" "Habit" entry (file "~/Org/refile.org") - "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n"))) (org-todo-keyword-faces '(("TODO" :foreground "orange red" :weight bold) ("NEXT" :foreground "cyan" :weight bold) @@ -387,6 +370,50 @@ I am quite serious on this vim stuff now. I want it everywhere. Now that we have initialized those packages, let's configure them some further. + +*** doct + +DOCT (declarative org capture templates) is a tool for easily managing capture +templates. It makes it much simpler to read and edit templates. + +#+BEGIN_SRC emacs-lisp + (use-package doct + :after org + :straight t + :config + (setq org-capture-templates + (doct '(("todo" + :keys "t" + :file "~/Org/refile.org" + :clock-in t + :template ("* %{todo-state} %^{Description}" + ":PROPERTIES:" + ":Created: %U" + ":END:" "%?") + :children (("todo" + :keys "t" + :todo-state "TODO") + ("next" + :keys "n" + :todo-state "NEXT"))) + ("note" + :keys "n" + :file "~/Org/refile.org" + :clock-in t + :template ("* %? :NOTE:" + "%U" + "%a")) + ("phone" + :keys "p" + :file "~/Org/refile.org" + :template ("* PHONE %? :PHONE:" "%U")) + ("journal" + :keys "j" + :file "~/Org/diary.org" + :datetree t + :template ("* %?" "%U")))))) +#+END_SRC + ** Magit I like magit, it is quite useful when you don't want to leave emacs and you have