Org-roam deleting and recreating most of the files in it's database on save?

Hi there,

I’m still trying to work out what exactly isn’t quite right sorry. Please bear with me.

I have over 500 org-roam files. I can change one or more files and then I do my normal save with org-save-all-org-buffers, or trigger a org-babel-tangle. Then I often see this:

(org-roam) Processed 0/1 modified files...
(org-roam) total: Δ3, files-modified: Δ1, ids: Δ0, links: Δ11, tags: Δ0, titles: Δ1, refs: Δ0, deleted: Δ516

The next time I save org-roam then starts the idle timer and, often while I’m still doing something, starts processing the, in this case, 516 modified files.

I might then do a couple more saves, and it will process the individual file, before deleting the 516 files from the database (?) again and recreating them again on the next save.

Any idea what’s going on? I’m still trying to nail down a definite set of actions that always causes the issue but it’s happening on repeat at the moment.

1 Like

It seems to have had something to do with a new sub-directory I created in my org-roam directory. I had added a couple of new org files in there. org-roam-find-file was also defaulting to searching that new sub-directory. Removing the files from that directory, and putting them into the main original directory seems to have solved the issue.

I’ll see if this remains stable.

Would that mean that we can’t reliably create subdirectories in our org-roam directory? I am new in org-roam, I had thought that subfolders are possible (would help to avoid too much clutter).

Honestly, knowing my luck, it’s probably something just with my setup.

Ahhh I finally figured out what was happening.

I’m tangling code blocks spread across my org-roam files together to create a DOT file. Doing so requires that I create a new org file of all the pieces first ( before tangling out the resulting DOT file. I have been creating in a subdirectory in order to keep it separate from my org-roam files, however doing so breaks all of the org-roam links between each of the files because those links point to files that are in the parent folder of

Creating in the same folder as my org-roam files leaves all of these links working and thus org-roam doesn’t say that all of the files have been modified in its database. Now it only updates what I change, rather than everything every time I tangle out a new file.

1 Like