Taking org-roam everywhere with logseq

Updated: 2022-08-03

I love org-roam. It lets me take notes in a way that matches how I think. It makes it easy to recall what I have learned and find connections between ideas. But there has always been one big problem with org-roam: it ties me to the desktop. When I am on the go and all I have is my phone, I don’t have access to my notes.

There are some stop gap solutions to try and fix this. Beorg is iOS app that supports editing org files on mobile. However, it is more focused on task management than note taking. It does not offer text search, has no way to insert “org-roam-links”, and does not supported nested directories of org files. Organice is another org mobile solution that can be used as PWA. However, it suffers from the same limitations as beorg, and has a poor editing experience (when you switch away from the app it will close your text box, making it hard to take notes on something you are reading). In the end, I was not satisfied with anything that I found: nothing allowed the same workflow I had on desktop.

Then I happened upon logseq. It is open-source, privacy-centric note taking app inspired by org-mode and roam-research. It has native support for the org mode format. Since both org-roam and logseq are based around roam itself, I can use the same workflow on both apps. It has all the features you would expect of a roam replica, including full text search, page links, inline images/video’s, etc. As a bonus, it is fairly easy to make it work with org-roam.

Configuring logseq

Logseq has an app for iOS and Android (beta). These will use some shared or local storage on your device to access the notes. For me, I store my notes on iCloud Drive, which is available on both my Mac and my iPhone.

Once the org-roam files have been moved to the correct place, we need to setup logseq. First open the settings:

We need set Preferred file format to Org and Preferred workflow to TODO/DOING.

From there we need update some of the advanced settings to work with org-roam.

We are going to add 1 line here. :org-mode/insert-file-link? true

Configuring org-roam

For the emacs-side config we need to make sure that org-roam follows the same directory structure as logseq. The important part of org-roam-capture-templates is that new files are created in pages/ and that org-roam-dailies-directory is journals/. The rest can be customized as you like. This can be done with the config below.

(use-package org-roam
  :custom
  (org-roam-directory "<path to logseq root>")
  (org-roam-dailies-directory "journals/")
  (org-roam-capture-templates
   '(("d" "default" plain
      "%?" :target
      (file+head "pages/${slug}.org" "#+title: ${title}\n")
      :unnarrowed t))))

One other issue is that when logseq creates a link, it will do so using a file link. But when org-roam creates a link it will do using a id link. Org-roam doesn’t see file links as backlinks and logseq doesn’t see id links as backlinks. It’s kind of a moose juice and goose juice situation. To fix this, there is this awesome bit of elisp from Bill Burdick that will turn notes you created with logseq into org-roam nodes. I highly recommend using that.

Taking org-roam on the go

With org-roam and logseq setup, I can now access my notes anywhere. When I am around my computer I have Emacs open and take notes in org-roam. When I am out on the go, I have logseq. I finally have access to my notes everywhere and don’t have to be tied to my PC. They are a perfect match.

Screenshot