While I configure my Org-roam capture templates, I fail to understand 2 points:
Why is there 2 templates for each entries in the variable org-roam-capture-templates
How to define same expansion in both templates but been only asked once for a value
In the documentation, and the doctsring of org-roam-capture-templates, it’s explained that the 4 th element of each entries is a “template used for creating the capture item”.
The docstring also say that for the option :target, if I set the value (file+head "path/to/file" "head content"), the “head content will be inserted if the node is a newly captured one”.
So why is there 2 templates ? Which one do I need to use ?
If I define the 2 templates, and add an expansion like ${Title} in each of them: During a new capture I got asked twice Title: in the mini-buffer. How can I do to be only asked once for the title ?
I have searched on the web and on this forum, but cannot found an answer to my questions.
And here is the content of “~/Roam/templates/literature.org”:
* ${Title}
:PROPERTIES:
:Author: ${Author}
:Publisher: ${Publiser}
:Release_year: ${Year}
:URL: ${URL}
:END:
# If I have the numeric copy of the book, attach it
** Synopsis
%?
** Notes
# Use Org-noter if numeric book is attached
And here is the result I would obtain after a capture:
:PROPERTIES:
:ID: 6fba454a-a1c8-44da-a0db-a6037b5ed452
:END:
#+title: 2024, Mickey Petersen: Demystifying Emacs’s Window Manager
#+filetags: :literature:
* Demystifying Emacs’s Window Manager
:PROPERTIES:
:Author: Mickey Petersen
:Publisher: Mastering Emacs
:Release_year: 2024
:URL: https://www.masteringemacs.org/article/demystifying-emacs-window-manager
:END:
# If I have the numeric copy of the book, attach it
** Synopsis
** Notes
# Use Org-noter if numeric book is attached
PS: I still search for a better way to do a literature notes which also contain enough information to retrieve the book or article and who work with Org-noter.
And finally, I replaced each ${key} with %^{key}, so I can use %\1, %\2, etc to reuse asked values.
With this, I finally have a simple literature note capture. With only one template where I define everything. Where I can have expansions for which I am asked only once for their values and where I can reuses the values multiple time in my note.
Maybe it’s not the optimal way of using Org-roam, but that what I have understand.
If I made a mistake, do note hesitate to tell me.
This is how I add entries to my bibtex file and make org notes. I should follow your advice and make it a template. So far, I keep a file per entry.
run doi-add-bibtex-entry
It adds the paper as a reference
to to org-file where you want to make the notes
insert the citation using org-ref-cite-insert-ivy [[cite:&kudrjavets-2023-are-we]]
or by hand. at this point you can type return and the org-ref menu appears. The hydra will give all the options without having to memorize the commands, including adding notes, adding pdf, etc.