1
0
Fork 0

[org-roam] Add capture templates for reading

This commit is contained in:
Tom Willemse 2021-04-06 11:00:08 -07:00
parent 1b6972b09f
commit a1f9243cf0

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2021.0328.113628 ;; Version: 2021.0404.224750
;; Package-Requires: (oni-org org-roam nroam) ;; Package-Requires: (oni-org org-roam nroam)
;; This program is free software; you can redistribute it and/or modify ;; 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/")) (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) (add-hook 'org-mode-hook 'nroam-setup-maybe)
(org-roam-mode) (org-roam-mode)