Doom Emacs : how to upgrade org-roam

What should I do to update org-roam from my Doom Emacs setup?
I’m struggling with the bug, solution for which is already merged to org-roam master

Running .emacs/bin/doom upgrade didn’t work
I guess that’s because org-roam wasn’t upgraded in doom repo

Can I somehow set org-roam to be downloaded from it’s own repo?

In $DOOMDIR/packages.el unpin org-roam:

(unpin! org-roam company-org-roam)

Exit Emacs, run doom sync && doom upgrade


Related to this, should I enable the +roam plugging in $DOOMDIR/packages.el?
Currently, I have the following:
In $DOOMDIR/packages.el:
(unpin! org-roam company-org-roam)
(package! org-roam
:recipe (:host github :repo “jethrokuan/org-roam” :branch “develop”)
and in $DOOMDIR/init.el:
(org ; organize your plain life in plain text
;; +pretty ; expensive!

Is there any improvement to make for the above configuration ?

It’s up to you. The +roam flag adds some keybindings and a few other things. If you decide to use it, then you should remove package! org-roam. You also should not use use-package! org-roam, put your config in an after! form.

The following examples can be used interchangeably but not simultaneously!

;; packages.el
(unpin! org-roam company-org-roam)

;; init.el
;; use the +roam flag
(org +journal ... +roam)

;; config.el
;; configure Org Roam with after!
(after! org-roam 
  (setq org-roam-...))


;; packages.el 
;; Use master branch from org-roam/org-roam repository
;; instead of obsolete jethrokuan/org-roam repository! 
;; You don't need to unpin anything
(package! org-roam
  :recipe (:host github :repo “org-roam/org-roam” :branch “master”))
(package! company-org-roam
  :recipe (:host github :repo “org-roam/company-org-roam” :branch “master”))

;; init.el
(org +journal ...) ;; don't use the +roam flag!

;; config.el
;; configure Org Roam with use-package!
(use-package! org-roam
  :defer t
  :hook ...
  (setq org-roam-...))

(use-package! company-org-roam
  :defer t
  (setq ...))

It’s probably more convenient to use the first example with the +roam flag.

1 Like

Thanks for the detailed help.
By the context and web search, it seems that the semantics of unpin! is to use the latest development version of the package?

(unpin! org-roam company-org-roam)
is already equivalent to
(package! org-roam
:recipe (:host github :repo “org-roam/org-roam” :branch “master”))
(package! company-org-roam
:recipe (:host github :repo “org-roam/company-org-roam” :branch “master”))


You use unpin for a package that you load via a module, which always pins specific versions.

Since org-roam is part of a module …


No, it is not. It may give you the same result in this particular case, but this two macro do very different things and they are not equivalent nor interchangeable.

To use a package in Doom, you must must first declare this intent by writing the declaration (package! ...). There are a lot of different initialization files in Doom called modules that do this for you. You can inspect these files yourself and learn what they are doing. The modules, besides declaring the recipe and initializing and configuring the package with use-package!, also typically pin the package to a specific commit.

You can load all these pre-installed configuration files just by putting something like

(another-module-name +with-flag)

into your init.el. The above means that your Emacs instance will execute

(package! package1 
  :pin commit
  :recipe ...)

(use-package! package1 

You can unpin! the package then in your config! file.

Instead of using the module, you are free to configure the package yourself by using package! and use-package!

1 Like

Thanks for the detailed explanation.

So in my context of wishing to try the latest released features of org-roam, while still taking advantage of the configuration of Doom’s configuration to org-roam, so I should do the following:

  1. Declare my interest in using Doom’s installation receipt and configuration for org-roam at init.el
  2. But in package.el do (unpin org-roam company-org-roam) and add the installation receipts of

(package! org-roam-server :recipe (:host github :repo “org-roam/org-roam-server” :files ("*")))
(package! company-org-roam :recipe (:host github :repo “org-roam/company-org-roam”))

  1. Do nothing special in terms of (use-package! org-roam ...) and (use-packages! company-org-roam)(in order to still using Doom’s configuration for org-roam and company-org-roam)

Is my above understanding more accurate than before?

Thanks again for your help!

NO! You do not need package! org-roam because it has already been defined in the module.

Use what I wrote earlier.

Sure, not at all!