diff options
author | Tom Willemse | 2021-04-06 11:00:08 -0700 |
---|---|---|
committer | Tom Willemse | 2021-04-06 11:00:08 -0700 |
commit | a1f9243cf049ee4260d41a4c71db91b2c79ff89a (patch) | |
tree | 5dda76cc1f57435a951e6d9cf57bbdae149558bd | |
parent | 1b6972b09f2ca76a1d2d263475d4a0c2830b8ade (diff) | |
download | emacs-config-a1f9243cf049ee4260d41a4c71db91b2c79ff89a.tar.gz emacs-config-a1f9243cf049ee4260d41a4c71db91b2c79ff89a.zip |
[org-roam] Add capture templates for reading
-rw-r--r-- | oni-org-roam.el | 36 |
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) |