I’m rearranging things. For example, I’m moving a bunch of files into a public/ subdirectory of my org-roam-directory. My process is that I launch dired while visiting the file I want to move, rename the file, and close the dired buffer. At this point I often make further edits to the file. The path of the file shows correctly as ~/org/roam/public/filename.org. When trying to save, however, I see the following:
It’s as if org-roam thinks the renamed file is a new file with the same ID. I then need to run org-roam-db-sync, open the file using find-file, make an edit, and save. Only then does org-roam know about it.
If I delete the buffer immediately after renaming, then reopen it before making edits, I don’t see the error. I’d rather not have to remember this, though. Is this expected behavior?
I’ve tested this with a non-doom config and the error doesn’t occur when saving the moved file’s buffer. I should maybe mention it to the Doom folks. Debugging things like this is not something I’m great at :).