The Org-roam v2 Great Migration

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?

It’s probably more useful to consider “install” separate from “load” or “require”.

Installing is just storing a file in your file system, and maybe tell Emacs where it is (e.g. with load-path). This does not tell Emacs to use it. To do so, you use require, load-file, load-library, etc.

For Doom, think of it in terms of the difference between package.el (install via straight and doom sync) and use-package! in config.el (load).

Org-protocol gets installed as part of Org but not loaded automatically. You will need to load org-protocol and org-roam-protocol (e.g. require them).

2 Likes

Thanks for your response @nobiot. Since I don’t do anything myself in Doom to load org-protocol (including anything like +protocol, I didn’t realize that it wasn’t always loaded. And now that you have me looking for it, I see the function +org-init-protocol-lazy-loader-h in Doom that loads org-protocol.

So I will try setting up org-roam-protocol to load after org-protocol is lazily loaded.

Thanks :slight_smile:

1 Like

I’m trying to migrate using the great wiki post made by @nobiot, but i hit some difficulties with doom.

Just to be sure, into init.el :

(org +roam)

Into package.el

(package! org-roam
  :recipe (:host github :repo "org-roam/org-roam" :branch "v2"))

(unpin! org-mode)
(unpin! org-roam)

Into config.el

(use-package! org-roam
  :after org
  :commands
  (org-roam-buffer
   org-roam-setup
   org-roam-capture
   org-roam-node-find)
  :config
  (setq org-roam-directory (file-truename "~/Notes/2ndBrain/")
      org-roam-db-location (file-truename "~/Notes/org-roam.db")
      org-roam-link-title-format "%sº"
      org-roam-prefer-id-links t
      org-roam-index-file "20200626221151-index_para.org")
(org-roam-setup))

After doom sync -u I have an error during emacs dooms load :

Error in private config: config.el, (wrong-number-of-arguments (0 . 0) 1)
Error (org-load-hook): Error running hook "+org-init-roam-maybe-h" because: (wrong-number-of-arguments (0 . 0) 1)

:sob: everything is broken now …

I suggest to remove +roam; it’s for v1.

Much better thanks, now i try to convert my old v1 file using one script…

I really like having interactive graphing capabilities such as org-roam-graph or the org-roam-server package. Do we know when these will be supported in org-roam v2? This is really holding me back from switching to it

Not a direct answer but you will see what’s happening: State of Org-roam v2 support · Issue #161 · org-roam/org-roam-server · GitHub and can track the status.

You could offer your help if you have skills and time to accelerate the process.

I would love to help with this project as I definitely have time, but sadly I doubt I have the skills to help. I am no programmer and the only elisp I know is what I have learned through configuring emacs (and thats probably the programming language I know the best sadly) so I would probably only detriment the process.

Thanks for the link, though. Can’t wait for this!

1 Like

By the way, the graph (not form the server) is supported now. See this screen shot in a comment in this other issue: org-roam is undergoing a major redesign, will this affect org-roam-server · Issue #135 · org-roam/org-roam-server · GitHub

2 Likes

An extra note for those interested in getting org-roam-server work with org-roam v2

State of Org-roam v2 support · Issue #161 · org-roam/org-roam-server · GitHub

3 Likes

Cool! So it’s going to be a new React app (is this an accurate way to characterise it?)?

Correct. A new React app backend by the server running inside Emacs (or at least that’s the plan).

1 Like

Thanks! Looking forward to it

Thanks again for all the work on roam.

I’ve finally gotten the migrate script to work on my 7k notes. It runs to completion.

Some questions:
1 - is there a template for a standard note + ID expectation that I can set up? (see example file, that doesn’t get picked up below)
2 - Is there a similar project to org-roam-server that might’ve taken off in the last 6 months?

#+title: qubit
#+HUGO_BASE_DIR: ../export/hugo
#+roam_alias: "qubits"
#+roam_tags: compsci

Quantum bit (short form of) - defined by [[file:20200708103309-benjamin_schumacher.org][R:Benjamin Schumacher]]. A [[file:20200708103201-qubit.org][R:qubit's]] [[file:20200708105003-qubit_state.org][R:qubit state]] is represented as a vector.