Next: , Up: FAQ   [Contents]


18.1 How do I have more than one Org-roam directory?

Emacs supports directory-local variables, allowing the value of org-roam-directory to be different in different directories. It does this by checking for a file named .dir-locals.el.

To add support for multiple directories, override the org-roam-directory variable using directory-local variables. This is what .dir-locals.el may contain:

((nil . ((org-roam-directory . ".")
         (org-roam-db-location . "./org-roam.db"))))

All files within that directory will be treated as their own separate set of Org-roam files. Remember to run org-roam-db-build-cache from a file within that directory, at least once.