How to automatically include day name in org-roam-dailies title?

I’m using org-roam-dailies with no capture template, just invoking org-roam-goto-today and typing away there at the end of my day. When I do that, the org file that gets created has a title with YYYY-MM-DD format, e.g. “2023-02-25”. Now from browsing through previous days entries I’ve realized that it could be very helpful if the file’s title would rather be “2023-02-25 Sunday”. Is there a way to make it so the automatically generated title includes the day name?

Thanks in advance for all your help.

> %Y-%m-%d %a --> 2023-02-25 Sat

> %Y-%m-%d %A --> 2023-02-25 Saturday

To know more about how timestamp is generated read about the function org-format-time-string

%a is the locale’s abbreviated name of the day of week, %A the full name.

You may want to try something like below to show not only this but what week you are in the year and what day of the year too to keep an eye on the flying time.

#+TITLE: %<%Y-%m-%d %A | week %W | day %j>

Thanks @FFS for your reply. I’m quite interested in your suggestion of including also the week and the day of the year in the title. However, I’m not sure I follow where I should put this part that you cite

#+TITLE: %<%Y-%m-%d %A | week %W | day %j>

in order for the title in org-roam-dailies files to be automatically changed/generated following that format.
Would you be so kind as to explain that? I’m sorry if this is a trivial question, I’m still taking my first steps in emacs coming from vim and there’s plenty of details that I might -most surely- be missing.

Thanks again for all your help.

include this in the config file (init.el) of your org-roam package and you will be all set.

 (setq org-roam-dailies-capture-templates '(("d" "default" entry "* %<%r> %?"
					      (file+head "%<%Y-%m-%d>.org" "#+TITLE: %<%Y-%m-%d %A | week %W | day %j>\n"))))

This is very basic setup and would be enough for journaling. There are more complicated setups like to integrate org-roam-dailies with the famous org-agenda setup, this is advanced use. See this post if interested in integration.

Then when you hit C-c n j you get a capture template to be completed.

1 Like

Thanks a lot! I’m sure this would do it, for the moment I don’t need integration between dailies and agenda.

I’m receiving this error message whenever I try to go to a new date (org-roam-dailies-goto-date or org-roam-dailies-capture-date), though, would you happen to know why? Or how to debug it?

org-roam-capture--prepare-buffer: Wrong type argument: integer-or-marker-p, nil [4 times]

It happens both for days with entries and for days not yet created.

Thanks again.

I edited the code, sorry its my bad. file+head there. It should work by now, try it out.

1 Like

Wow, now it works like a charm.

Thanks a lot @FFS, not just for your help but also for your patience in guiding me.

I’ll take a look at that post you mentioned, although for the moment I believe that this solution you offered is more than enough for me.

Thanks again!

Glad to know it worked. Yes, I think the integration is great, this is one of the great setups I have seen based on a very interesting interview cited there too.

1 Like