From f52461117e16b8c24bfe0a2594629b9d62c6cddb Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Wed, 19 Sep 2018 10:47:26 +0200 Subject: [PATCH] Fix the Org capture template definitions --- configuration.org | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/configuration.org b/configuration.org index b4a4dc3..e5341fe 100644 --- a/configuration.org +++ b/configuration.org @@ -2404,17 +2404,21 @@ This is a big one; I use a lot of customisation here. (trans . ""))) org-src-window-setup 'current-window) :config + ;; Load the markdown exporter (require 'ox-md) + + ;; Make sure we have 'org-capture-templates` defined (unless (boundp 'org-capture-templates) (setq org-capture-templates nil)) + + ;; Set up capture templates for blog posts and GT2 related notes (add-to-list 'org-capture-templates - '("p" "Blog post" - entry (file+olp+datetree (concat org-directory "blog.org")) + '("p" "Blog post" entry + (file+olp+datetree (lambda () (concat org-directory "blog.org"))) "* %^{Title} :blog:\n :PROPERTIES:\n :on: %T\n :END:\n %i%?")) (add-to-list 'org-capture-templates - '("g" "GT2 note" - entry (file+headline (concat org-directory "gt2-notes.org") - "Captures") + '("g" "GT2 note" entry + (file+headline (lambda () (concat org-directory "gt2-notes.org")) "Captures") "** %^{Title}\n :PROPERTIES:\n :on: %T\n :END:\n %i%?")) (add-hook 'ediff-select-hook 'f-ediff-org-unfold-tree-element) (add-hook 'ediff-unselect-hook 'f-ediff-org-fold-tree)