But now I’m thinking, the datetime prefixes make it easier to sort the records. But I don’t care about how they sorted. Probably I don’t care at all how they are organized on the disk. But maybe Roam caching system does? If it gets to a massive number of files (like tens of thousands)? Perhaps I should keep the datetime prefixes in the names? Or it doesn’t really matter?
I don’t think it matters.
Looking at the source code below, Org-roam takes modified time along with other file attributes from the filesystem. This does not rely on the filename to have a time stamp string, as far as I can see.
(defun org-roam-db–insert-meta (&optional update-p)
“Update the metadata of the current buffer into the cache.
If UPDATE-P is non-nil, first remove the meta for the file in the database.”
(let* ((file (or org-roam-file-name (buffer-file-name)))
(attr (file-attributes file))
(atime (file-attribute-access-time attr))
(mtime (file-attribute-modification-time attr))
(hash (org-roam-db–file-hash)))
It makes the filename unique even when you have the same title. Saying that, nevertheless, I would not say that is a benefit.
It will come to personal preference, I think, like you prefer not to have timestamps.
Personally, I prefer timestamp-only without the slug (I don’t want a long title cluttering my file names). I like to be able to sort files in my OS by timeline (I prefix most of my files’ name with a timestamp especially the ones I use for work — Word, PPT, Excel).
It makes search with Windows Explorer very easy. It seems that human memory is good at remembering sequence of events in time (not sure scientifically evidenced, but i read about it somewhere) I can roughly remember when I made the file. I just apply the same concept to Emacs.
I believe having the timestamp in the filename (or the timestamp as the entire filename) is a deliberate approach of some digital Zettelkasten systems, although I can’t recall what the reason is.
Personally I also removed the timestamp. I’ve not noticed any problems yet.
I didn’t find any benefit to it, and the main reason for me to remove it was as a simple way to avoid having the timestamp in the URL when I publish via org-publish. For something I consider to be a personal wiki, for me it doesn’t make sense to have the creation date in the URL.
(There may be a way to have the timestamp in the filename, but remove it when publishing - that could be useful.)
I chanced upon them around 2011. Since then, I have “more or less” kept my files (notes, images, work related files) with timestamps.
From about 10 years of this practice (!), I can say I would not use my PC without it.
Is this the only way? No, I don’t think so.
Is this objectively better than “no timestamps”? I do not know. Like I said, I believe it’s a matter of personal preference. But timestamps as a prefix (not suffix, because that way, you cannot sort by timeline) have been essential for my sanity.
I might add the “slug” back in the filename – it seems to make the file content easier to browse in a list (Windows Explorer, or Emacs Dired)…
It’s fine I got to work the ting I was asking for was this line (setq org-roam-capture-templates `(("d" "default" plain "%?" :target (file+head "${slug}.org" "#+title: ${title}"):unnarrowed t)))