The Org-roam v2 Great Migration

… because you haven’t submitted a PR to fix it yet :wink: (that link should take you right to line 5079 but for some reason it doesn’t)

That repo doesn’t accept PRs. Seems like there’s a different procedure for contributing to Org. But the site that’s pointed in the contributing guide ( is down.

Actually, now that I read it more carefully, it says:

Properties can be inserted on buffer level. That means they apply before the first headline and can be inherited by all entries in a file. Property blocks defined before first headline needs to be located at the top of the buffer, allowing only comments above.

Properties can also be defined using lines like:
#+PROPERTY: NDisks_ALL 1 2 3 4

A bit confusing for beginners, but it’s there.

1 Like

All the discussions, bug reports and other requests happen by posting to Org’s mailing list. Pull requests are submitted in the form of patches emailed to the list. Unless one has already contributed to GNU software, there is an additional burden for newcomers with larger patches (>15 lines of code) in that one has to sign a copyright transfer agreement.

1 Like
(use-package! org-roam
  :after org
  (setq org-roam-capture-templates
      '(("d" "default" plain "%?"
         (file+head "${slug}.org"
                    "#+title: ${title}\n")
         :immediate-finish t
         :jump-to-captured t
         :unnarrowed t))))

Yes I am using org-roam-capture-templates with :

(use-package org-roam
  :after org
  (org-roam-directory "d:/xxx/Documents/org-roam/")
  (org-roam-dailies-directory "d:/xxx/Documents/org-roam/dailies/")
  (org-roam-completion-everywhere t)
  (org-roam-file-extensions '("org"))
   '(("d" "default" entry "* %?"
      :if-new (file+head "${slug}.org"
"#+TITLE: ${title}

      :unnarrowed t)))
   '(("d" "default" entry
     "* %?"
   :if-new (file+head "d:/xxx/Documents/org-roam/dailies/%<%Y-%m-%d>.org" "#+TITLE: %<%Y-%m-%d>\n")
  :bind (("C-c n l" . org-roam-buffer-toggle)
         ("C-c n f" . org-roam-node-find)
         ("C-c n i" . org-roam-node-insert)
         ("C-c n c" . org-roam-capture))

I will try yours

Running the migration script resulted in a number of lines in my roam files like this:


Did that happen to anyone else? Should there be a newline between the : and the # in the middle?

In org-roam-v1, the completion list for org-roam-find-file appeared to be sorted in something like most-recently-accessed order. In org-roam-v2, org-roam-node-find appears to be presenting the nodes in the order they are in the database.

I often found myself choosing from the most recently used files. Now I find that I often have to type more to get where I wanted.

Is the understanding of the before and after behaviors correct? If so, is this the intended or desired behavior?

Do you have an example of the file before the conversion? The empty string is generally not an allowed value for the two properties.

Yes, you understood correctly. I’ve added sort by modification time back in V2 by jethrokuan · Pull Request #1401 · org-roam/org-roam · GitHub.

Great! Thank you, much nicer :slight_smile: I can confirm that it works, when the changes in my nodes/files are saved to disk.

EDIT: Removed a question about a problem I had, which was due to the fact that I didn’t have any call t (org-roam-setup) in my configs.

Is there going to be support for org-roam-server and org-roam-bibtex on v2 eventually ?

1 Like

Not sure exactly the reason, but I did encounter this error. I reported it on OR github issue. It might help other people to migrate.

Looks like there is support for the later at least…

Org-roam-bibtex for Org-Roam v2 - Development - Org-roam

For org-roam-server, refer to this

The package org-roam-server depends on directly from org-roam-graph. The latter was reintroduced to V2 yesterday, so in the near future org-roam-server will be functional again.

Yes!! I had done a little work on that myself, but I really didn’t have the background to make very fast progress beyond getting a basic graph working. Thanks @jethro!

1 Like

Thanks @gcoladon and @jethro for your efforts.

1 Like

When I try to click a link in the org-roam-graph, to get back to Emacs, I get this error:

Directory `//org-protocol:/' does not exist! Create it? (y or n) n

Is this a known problem or do I have something misconfigured?

As far as I could tell, this is/was happening because org-roam v2 doesn’t (require org-roam-protocol) anymore? If my hypothesis is correct, here’s a PR for that one-liner: Add a require for org-roam-protocol back in by gcoladon · Pull Request #1555 · org-roam/org-roam · GitHub

Normally I load it in the config.el (doom style) and works fine for me.

(use-package! org-roam-protocol)

Is this the only component of org-roam that needs to be use-package!ed independently? If so, is it because it depends on some other optional component of or-mode? org-protocol is installed by default, correct? Why not install org-roam-protocol by default as well?