I see it in everyone’s configurations. The standard ‘ref’ template is something like:
'(("r" "ref" plain (function org-roam-capture--get-point)
"%?"
:file-name "${slug}" ...
I understand that filenames aren’t supposed to matter in this system, and two references will never have the same name, but nevertheless what’s the harm in keeping a timestamp?
Considering that one of the important ideals here is to keep everything plain-text and platform-agnostic, I think having a timestamp is advantageous when you browse your knowledgebase from a non-Emacs ecosystem. I can easily remember the date when I created something and that’s useful for finding files. Why get rid of it?
(Why do I feel ridiculous for asking this?)
This is funny and strange. I looked at my capture template for ref and it looks like this:
("r" "ref" plain
#'org-roam--capture-get-point
"%?"
:file-name "%<%Y%m%d%H%M%S>-${slug}"
:head "#+title: ${title}\n#+roam_key: ${ref}"
:unnarrowed t)
Now the strange thing is:
- If I capture via
org-roam-capturre
then I will have a timestamp in the filename.
- If I capture via the JavaScript bookmarklet using org-protocol, then my notes don’t have any timestamp in the filename.
Again I’m surprised by this behaviour and at the moment I can’t explain why this happens.
I can’t reproduce this:
This is the code of the bookmark in Firefox:
javascript:location.href = 'org-protocol://roam-ref?template=r&ref=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title)
Latest Org-roam/Org-mode/Doom on Emacs 27.1.
Strange. Just updated all packages that can be updated:
javascript:location.href = 'org-protocol://roam-ref?template=r&ref=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title) + '&body=' + encodeURIComponent(window.getSelection())
The only difference seems to be that I’m not using Doom.
Ok, now I see the difference. Its between org-roam-capture-templates
and org-roam-capture-ref-templates
!
1 Like