Org-Roam from opening all nodes on startup, bypassing org-mode hooks

I am having a similar issue to the one posted by another user here:

Org-Roam opens all of my nodes in buffers on startup, which on it’s own is a minor quirk. The issue is that several minor modes that I have hooked to Org-Mode (org-superstar-mode, mixed pitch mode, org-bars-mode) do not load and I have to restart-org-mode in each buffer to get the minor modes to load.

The aforementioned minor modes load fine when I open org documents outside of my org-roam-directory.

Is Org-Roam supposed to be opening all of my nodes on startup? Is there a way I can prevent this behaviour? or should I hook the above minor modes to something else to ensure that they load properly in my nodes on startup?

Thanks!

No, it is not. Mine does not do it, and this is probably the first report of this issue in this forum.
For this issue, my suggestions are:

  1. Try without using emacsclient
  2. Try with no config other than Org-roam

For this issue, I suspect it might be your loading sequence.

I suggest you review your configuration and see if you set up your hooks for minor modes after org-roam-autosync-mode (or whatever causing notes buffers to open – org-roam is not supposed to keep them open); if so, move org-roam-autosync-mode after all the hooks set up for the minor modes.

Thanks nobiot, you are correct this was not an Org-Roam issue, but rather Org-Agenda is opening all my nodes because I have my agenda files set to my org-roam directory. I think this is normal behavior for that package once triggered (it opens at startup because I am using the emacs dashboard package).

The only issue I am seeing now is that the hooks do not trigger in consult previews (via vertico completion module in doom) or when opening nodes via consult-org-agenda.

At any rate this is not an Org-Roam issue, though I am still unsure why vertico preview and completion wont trigger the hooks.

If you get Org Agenda to open notes in org-roam-directory in your init, it’s still possible that this is done before your hooks are set in init – the same point as my second one above (loading sequence).

If you’re certain that Org Agenda opens these buffers after hooks are set, then I’m not sure what’s happening – it does not sound like consult is relevant if Org Agenda opens the buffers.

For posterity I just wanted to say that this is definitely not an org-roam issue (at least not as I was experiencing it) and I was able to fix this for org-agenda by changing the loading sequence.

Regarding consult, I think I was confused by the fact that consult preview loads limited hooks to maintain the speed of preview? It’s possible to add hooks but this seriously degraded the speed of previews for me.