Replies: 2 comments 1 reply
-
From: jtpavlock ***@***.***>
Date: Sun, 22 Sep 2024 15:23:31 -0700
How can I define an org-capture template with a specified subdirectory?
For example, I'd like to create a "reference" org-capture template
that automatically selects the "reference" subdirectory without
prompting me for it.
Try this:
(with-eval-after-load 'org-capture
(add-to-list 'org-capture-templates
'("r" "New reference (with Denote)" plain
(file denote-last-path)
(function
(lambda ()
(let ((denote-use-directory "reference"))
(denote-org-capture))))
:no-save t
:immediate-finish nil
:kill-buffer t
:jump-to-captured t)))
…--
Protesilaos Stavrou
https://protesilaos.com
|
Beta Was this translation helpful? Give feedback.
1 reply
-
From: jtpavlock ***@***.***>
Date: Tue, 24 Sep 2024 08:15:02 -0700
Thank you! This was exactly what I was looking for!
You are welcome!
I tweaked your solution slightly as it didn't seem to recognize
subdirectories, so I just had to give it the full directory path:
[... 15 lines elided]
Very well!
…--
Protesilaos Stavrou
https://protesilaos.com
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I define an org-capture template with a specified subdirectory?
For example, I'd like to create a "reference" org-capture template that automatically selects the "reference" subdirectory without prompting me for it.
Beta Was this translation helpful? Give feedback.
All reactions