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

**URL:** <https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994>\
**Category:** How To\
**Created:** [February 26, 2023, 10:00pm UTC](https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994 "2023-02-26T22:00:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gusgustavsohn](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gusgustavsohn/32/1189_2.png) [@gusgustavsohn](https://org-roam.discourse.group/u/gusgustavsohn)\
**Post date:** [February 26, 2023, 10:00pm UTC](https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994/1 "2023-02-26T22:00:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FFS](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/ffs/32/1286_2.png) [@FFS](https://org-roam.discourse.group/u/FFS)\
**Post date:** [February 27, 2023, 6:01pm UTC](https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994/2 "2023-02-27T18:01:13Z")

</div>

`> %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>`

---

<div class="post-metadata">

**Author:** ![gusgustavsohn](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gusgustavsohn/32/1189_2.png) [@gusgustavsohn](https://org-roam.discourse.group/u/gusgustavsohn)\
**Post date:** [February 27, 2023, 6:35pm UTC](https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994/3 "2023-02-27T18:35:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FFS](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/ffs/32/1286_2.png) [@FFS](https://org-roam.discourse.group/u/FFS)\
**Post date:** [February 27, 2023, 6:45pm UTC](https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994/4 "2023-02-27T18:45:18Z")

</div>

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

```auto
 (setq org-roam-dailies-capture-templates '(("d" "default" entry "* %<%r> %?"
					      :target
					      (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](https://org-roam.discourse.group/t/daily-task-management-with-org-agenda-and-org-roam-dailies/989) if interested in integration.

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

---

<div class="post-metadata">

**Author:** ![gusgustavsohn](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gusgustavsohn/32/1189_2.png) [@gusgustavsohn](https://org-roam.discourse.group/u/gusgustavsohn)\
**Post date:** [February 27, 2023, 6:54pm UTC](https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994/5 "2023-02-27T18:54:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FFS](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/ffs/32/1286_2.png) [@FFS](https://org-roam.discourse.group/u/FFS)\
**Post date:** [February 27, 2023, 6:56pm UTC](https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994/6 "2023-02-27T18:56:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gusgustavsohn](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gusgustavsohn/32/1189_2.png) [@gusgustavsohn](https://org-roam.discourse.group/u/gusgustavsohn)\
**Post date:** [February 27, 2023, 7:02pm UTC](https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994/7 "2023-02-27T19:02:38Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![FFS](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/ffs/32/1286_2.png) [@FFS](https://org-roam.discourse.group/u/FFS)\
**Post date:** [February 27, 2023, 7:05pm UTC](https://org-roam.discourse.group/t/how-to-automatically-include-day-name-in-org-roam-dailies-title/2994/8 "2023-02-27T19:05:26Z")

</div>

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.
