aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oni-org-roam.el36
1 files changed, 35 insertions, 1 deletions
diff --git a/oni-org-roam.el b/oni-org-roam.el
index da93d69..7a95090 100644
--- a/oni-org-roam.el
+++ b/oni-org-roam.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2021.0328.113628
+;; Version: 2021.0404.224750
;; Package-Requires: (oni-org org-roam nroam)
;; This program is free software; you can redistribute it and/or modify
@@ -30,6 +30,40 @@
(setq org-roam-directory (expand-file-name "~/documents/org/"))
+(defvar oni-org-roam-file-name-format "%<%Y%m%d%H%M%S>-${slug}")
+
+(defvar oni-org-roam-book-head "#+title: ${title}
+
+- book ::
+- chapter ::
+- url ::
+- tags ::
+
+")
+
+(add-to-list 'org-roam-capture-templates
+ `("B" "Bookclub book" plain (function org-roam-capture--get-point)
+ "* What do I want to say about this chapter?
+
+- %?
+
+* What did I learn from this chapter?
+
+-
+
+* What did I want to talk about in this chapter?
+
+-"
+ :file-name ,oni-org-roam-file-name-format
+ :head ,oni-org-roam-book-head
+ :unnarrowed t))
+
+(add-to-list 'org-roam-capture-templates
+ `("b" "Book" plain (function org-roam-capture--get-point) "%?"
+ :file-name ,oni-org-roam-file-name-format
+ :head ,oni-org-roam-book-head
+ :unnarrowed t))
+
(add-hook 'org-mode-hook 'nroam-setup-maybe)
(org-roam-mode)