Org-roam-dailies: New features

Here’s a quick demo of the new features for Org-roam-dailies which will be merged with #978:

10 Likes

Looks great, will it support the use of file templates?

Yes, via the :head keyword.

1 Like

This is a bit confusing. The video suggests this feature is available in v1.2.1, which is what I have installed via Melpa. But the new dailies features are only available in the scratch branch. Would you recommend I switch to follow the git repo, and if so, which branch for beginners? “Scratch” suggests perhaps more ‘alpha’ than I might like while I’m getting started.

The video is simply a preview written when Org-roam was in v1.2.1, the branch should be merged soon.

Aeons later, the PR has been merged. Enjoy!

3 Likes

Please help me out with this one (Windows10, ORG9.4-31, Org-Roam1.2.3):

snip config
(setq org-roam-directory (file-truename “C:/Users/JochenBurkhardi/CloudDrive/Cloud~com~appsonthemove~beorg/org/”))
(setq org-roam-dailies-directory “dailies”)

  • Whatever I try, my org-roam-dailies land only in ~/org but NOT in the - existing - ~/org/dailes folder
  • I even tries the directory-name “~/org/dailies/” with and without “/”
  • Yes, my HOME is set correctly in Windows to the above folder (without the /org of course)
  • So I figured, it might have to do with Windows file and folder syntax?

Thank you in advance for your kind support and have a sunny day,
Jochen

To quote the manual:

Make sure that org-roam-dailies-directory appears in :file-name for your notes to be recognized as daily-notes. You can have different templates placing their notes in different directories, but the one in org-roam-dailies-directory will be considered as the main one in commands. [emphasis added]

So, you need to mention the org-roam-dailies-directory inside the template (:file-name).

Thank you very much for this quick answer.
But how is this done (see my snippet):
(setq org-roam-capture-templates
'((“d” “default” plain (function org-roam-capture–get-point)
“%?”
:file-name “{slug}" :head "#+TITLE: {title}\n#+CREATED: %<%Y-%m-%d>\n#+ROAM_ALIAS:\n#+ROAM_TAGS:\n\n* What’s on?”
:unnarrowed t)
))
(setq org-roam-dailies-capture-templates
'((“a” “daily” plain #'org-roam–capture-get-point “”
:immediate-finish t
:file-name “%<%Y-%m-%d>”
:head “#+TITLE: %<%A, %e %B %Y>\n#+CREATED: %<%Y-%m-%d>\n#+ROAM_ALIAS:\n#+ROAM_TAGS:\n\n* What’s on?”
:unnarrowed t)
))

(setq org-roam-capture-templates
      '(("d" "default" plain (function org-roam-capture–get-point)
         "%?"
         :file-name "{slug}"
         :head "#+TITLE: {title}\n#+CREATED: %<%Y-%m-%d>\n#+ROAM_ALIAS:\n#+ROAM_TAGS:\n\n* What’s on?"
         :unnarrowed t)))

(setq org-roam-dailies-capture-templates
      '(("a" "daily" plain #'org-roam–capture-get-point ""
         :immediate-finish t
         :file-name "dailies/%<%Y-%m-%d>" ; <---------
         :head "#+TITLE: %<%A, %e %B %Y>\n#+CREATED: %<%Y-%m-%d>\n#+ROAM_ALIAS:\n#+ROAM_TAGS:\n\n* What’s on?"
         :unnarrowed t)))
1 Like

That was simple. Thank you soo much.
One more thing: Will it now be possible to move all dailes to the dailies/ folder?
Tried it before and all links where “red”, meaning not recognized.
Anything I can do to make that work?

You’d have to move them inside Emacs (i.e. with dired) so that we can catch the renames and fix all your links accordingly.

Sure, that’s what I did.
And now that:

That’s not normal, and you might want to repeat the migration after restarting your Emacs and Org-roam.

1 Like

Meaning:

  • Moving all daily files to dailies/
  • Restarting Emacs?
  • Please note, that I before only moved the November files to dailies/

No, move them back to their originating directory (where the links would presumably work), restart Emacs, and try again.

Ok. Sounds like a good idea, on it:
(org-roam) total: Δ570, files-modified: Δ116, ids: Δ98, links: Δ1318, tags: Δ102, titles: Δ118, refs: Δ0, deleted: Δ116
BUT, unfortunately each and any link in the 116 dailies/ org-files is red (file:<filename.org> and not something like …/<filename.org>

I’m hesitant to move daily notes into a subfolder to avoid breaking links. Is using org-roam-dailies in the main note folder supported?

If not, I currently have org-roam-rename-file-on-title-change set to nil (because I have issues renaming titles during capture). Do I need to revert it to t for moving daily notes?

Not as is. The way we find daily-notes right now is by listing the files in org-roam-dailies-directory, which is not helpful for anything that is outside of it. I’ll work something out in the near future, but I need to rethink how we use subfolders with org-roam first.

No. The renaming that happens in the background is independent of that value.

So I’m giving it a try, and when I move a daily note from the main folder to the daily subfolder, every link it contains is now broken, and backlinks to this daily note are also broken.

This is not surprising as these links as of the form file:…, and they don’t mention the directory change.

Am I doing something wrong, or is this a bug?