Hi All,
tl;dr
How does one setup an org-roam directory / database on multiple machines/devices?
The Objective
I am moving from a markdown notes system that I originally started in OneNote, moved to Obsidian, moved to VSCodium (where I discovered org-mode and then saw that the VSCode package was very limited), and am wanting to go forward solely using emacs with org-mode/org-roam. My notes system is a directory with subdirectories, which I will explain further below.
How should I setup up my org-roam folder?
What Iâve Been Using
I have my markdown files , templates, and some org-mode TODO
lists that I sync, using Syncthing, between my home Linux PCs, Android devices (Orgzly), and my work Windows 11 PC. I currently have a directory similar to the following: ~/Syncthing/Notes/
for Linux AND "C:\Users\USER$\Documents\Syncthing\Notes\"
on Windows.
In my Notes
directory, I have Work
and Personal
subdirectories. On my home PCs, I can access everything. On my work PC, I only can access the Work
subdirectory. I donât want my personal notes accessible on a work PC that I donât own.
Where Iâm Stuck
I would like to continue using Syncthing to sync my org-roam directory, likely with the .stignore
file to have each local machine update itâs own .db file. On Linux and Android machines I think I should be able to use ~/Syncthing/org-roam
or something to that effect and have org-roam find the files via (org-roam-db-location "~/Syncthing/org-roam/org-roam.db")
and (setq org-roam-directory ("~/Syncthing/org-roam"))
. I am wondering how to marry up the Linux/Android and Windows systems. Where do I place the syncâd folder and how to let emacs/org-roam point to the correct path on Windows?
Table of What I Think Should be Executed
PC | User | Syncthing | Access |
---|---|---|---|
Linux Desktop | zonsopkomst | ~/Syncthing/org-roam | Work & Personal subdirectories |
Linux Laptop | zonsopkomst | ~/Syncthing/org-roam | Work & Personal subdirectories |
Android Tablet | zonsopkomst | /storage/emulated/0/Syncthing/org-roam | Work & Personal subdirectories |
Android Phone | zonsopkomst | /storage/emulated/0/Syncthing/org-roam | Work & Personal subdirectories |
Windows 11 Desktop | My real name, nobody calls me zons⌠| C:\Users\USER$\Documents\Syncthing\org-roam | Work subdirectory ONLY |
Org-roam init.el Section
(use-package org-roam
(org-roam-directory "~/Syncthing/org-roam/")
: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))
:config
(org-roam-setup))
Warning on Windows 11
Error (use-package): Failed to parse package org-roam: Wrong type argument: symbolp, (org-roam-directory "~/Syncthing/org-roam/") Disable showing Disable logging
gcc
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\WINDOWS\system32> MSYS2
PS C:\WINDOWS\system32>
Opens MSYS2:
USER$@DESKTOP- MSYS ~
# pacman -S gcc
resolving dependencies...
looking for conflicting packages...
Packages (8) binutils-2.41-3 isl-0.26-1 mpc-1.3.1-1 msys2-runtime-devel-3.4.9-2
msys2-w32api-headers-11.0.1.r0.gc3e587c06-1
msys2-w32api-runtime-11.0.1.r0.gc3e587c06-1 windows-default-manifest-6.4-1
gcc-13.2.0-2
Total Download Size: 45.52 MiB
Total Installed Size: 346.28 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
msys2-w32api-headers-11.0.... 5.2 MiB 672 KiB/s 00:08 [###############################] 100%
binutils-2.41-3-x86_64 5.5 MiB 672 KiB/s 00:08 [###############################] 100%
msys2-runtime-devel-3.4.9-... 339.2 KiB 614 KiB/s 00:01 [###############################] 100%
mpc-1.3.1-1-x86_64 78.5 KiB 167 KiB/s 00:00 [###############################] 100%
windows-default-manifest-6... 1388.0 B 1022 B/s 00:01 [###############################] 100%
isl-0.26-1-x86_64 745.0 KiB 672 KiB/s 00:01 [###############################] 100%
msys2-w32api-runtime-11.0.... 2.0 MiB 1129 KiB/s 00:02 [###############################] 100%
gcc-13.2.0-2-x86_64 31.7 MiB 4.56 MiB/s 00:07 [###############################] 100%
Total (8/8) 45.5 MiB 2.59 MiB/s 00:18 [###############################] 100%
error: failed retrieving file 'gcc-13.2.0-2-x86_64.pkg.tar.zst' from mirror.msys2.org : Failed to connect to mirror.clarkson.edu port 443 after 10013 ms: Timeout was reached
error: failed retrieving file 'msys2-w32api-runtime-11.0.1.r0.gc3e587c06-1-x86_64.pkg.tar.zst' from mirror.msys2.org : Failed to connect to mirror.clarkson.edu port 443 after 10005 ms: Timeout was reached
error: failed retrieving file 'isl-0.26-1-x86_64.pkg.tar.zst' from mirror.msys2.org : Failed to connect to mirror.clarkson.edu port 443 after 10018 ms: Timeout was reached
warning: too many errors from mirror.msys2.org, skipping for the remainder of this transaction
(8/8) checking keys in keyring [###############################] 100%
(8/8) checking package integrity [###############################] 100%
(8/8) loading package files [###############################] 100%
(8/8) checking for file conflicts [###############################] 100%
(8/8) checking available disk space [###############################] 100%
:: Processing package changes...
(1/8) installing binutils [###############################] 100%
(2/8) installing isl [###############################] 100%
(3/8) installing mpc [###############################] 100%
(4/8) installing msys2-runtime-devel [###############################] 100%
(5/8) installing msys2-w32api-headers [###############################] 100%
(6/8) installing msys2-w32api-runtime [###############################] 100%
(7/8) installing windows-default-manifest [###############################] 100%
(8/8) installing gcc [###############################] 100%
:: Running post-transaction hooks...
(1/1) Updating the info directory file...
USER$@DESKTOP- MSYS ~
# where gcc
C:\tools\msys64\usr\bin\gcc.exe
Okay, looks good so far, and added C:\tools\msys64\usr\bin\gcc.exe
to my Windows Environmental variables. But I still cannot run âM-x org-roam-db-autosync-modeâ as there is no command in emacs and is probably occuring because I have no org-roam directory or org-roam database yet.
I appreciate any advice that you can provide!
Thank you,
zons