branch: externals/org-gnosis
commit 8c3f4ccbcd3f3c067d06a345f1c238d66e19d928
Author: Thanos Apollo <[email protected]>
Commit: Thanos Apollo <[email protected]>
templates: Rewrite as functions.
* Templates should be functions that return a string.
---
org-gnosis.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/org-gnosis.el b/org-gnosis.el
index 51f1425745..5a1fb22066 100644
--- a/org-gnosis.el
+++ b/org-gnosis.el
@@ -48,18 +48,18 @@
:group 'org-gnosis)
(defcustom org-gnosis-journal-templates
- '(("Default" "* Daily Notes\n\n* Goals\n+ []")
- ("Empty" ""))
- "Template for journaling."
+ '(("Default" (lambda () (format "* Daily Notes\n\n* Goals\n%s"
(org-gnosis-todos))))
+ ("Empty" (lambda () "")))
+ "Templates for journaling."
:type '(repeat (cons (string :tag "Name")
- (string :tag "Template")))
+ (function :tag "Template Function")))
:group 'org-gnosis)
(defcustom org-gnosis-node-templates
- '(("Default" ""))
- "Template for nodes."
+ '(("Default" (lambda () "")))
+ "Templates for nodes."
:type '(repeat (cons (string :tag "Name")
- (string :tag "Template")))
+ (function :tag "Template Function")))
:group 'org-gnosis)
(defcustom org-gnosis-journal-dir (expand-file-name "journal" org-gnosis-dir)