[org-roam] Add capture templates for reading
This commit is contained in:
parent
1b6972b09f
commit
a1f9243cf0
1 changed files with 35 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue