How to rename a note with everything updated at the same time?

For example, I have a note named AAA. It was linked by a note BBB. And now I want to rename AAA to ABC. But if I rename it in the file manger. It will not be updated in the org-roam-find-file buffer.

What is the correct way to rename the note and update the filename and the links together?

Rename it within emacs using eg. dired. Org-roam notices when renaming happens within emacs and will update your links accordingly. If you do it through a file editor, it has no idea!

Thank you for your reply. I tried your way.

  1. I rename a file AAA to BBB in Dired.
  2. I org-roam-db-build-cache.
  3. I org-roam-find-file. There still the is AAA listed.\

I don’t know why.

Is this because the title is still AAA?

Rename the #+TITLE in your file and you should see the change in org-roam-find-file. You shouldn’t need to run org-roam-db-build-cache.

If you want the description of links in all of your org-roam files to reflect the TITLE change as well as the filename change – [[][AAA]] to [[][ABC]] – looking in the code I think if you rename TITLE first, and then rename the file through dired, your link descriptions should be updated also.

1 Like

Yes, it works. Thank you very much for the help. And I wish it will be mentioned in the future documentation.

1 Like

Yes. I do not know I need to rename the tiltle. So, I think the recommended rename procedure is as follows:

  1. Rename the #+TITLE
  2. Rename the filename in Emacs(such as dired)