Zero to Emacs and Org-roam: a step-by-step guide on Windows 10

As :hook (after-init . org-roam) works on my PC, I think it’s unlikely that the cause of your issue is Org-roam, or Use-package, or this part of your config.

Questions would be:

  • Did you change anything else around 1 week ago when you started experiencing the issue?
  • Do you have any other config that uses :hook (after-init) or (add-hook 'after-init-hook)?

Something else seems to be interfering with your after-init-hook (both variations of the syntax are equivalently calling some functions in this hook). We seem to need to go outside of this section of your config to see what this “something” is.

Practically speaking, if I were you, I would see two options: (1) live with this issue (as it is minor); (2) go vanilla Emacs to identify the cause.

I would choose option (1) in this case (in fact, I always call Org-roam manually, since I don’t use it at the start of the day).

But if you have time, you could choose option (2). This would usually involve taking a backup of your config file, strip down your config to bare minimum, and then add your config back one section at a time… Time consuming. Some people call it “config bankrupt” and start all over from scratch (I don’t think your situation calls for it).

Just a minor point to add: the variable exec-path must be a list of
directories where you find relevant .exe files. So… it should not be set to your org-roam.db file, but should be like this: (add-to-list 'exec-path “path/to/sqlite3-dir”).