I very recently came across org-roam and wanted to evaluate it for my needs (I’ve been using org-mode for some time). It looks very promising and after some reading and trying I thought to test the new branch v2. For what I think I will need, I guess v2 is the way to go and since I’m anyway starting new, I wanted to give it a shot. However, I kind of got stuck and after I have been meddling with this for the better part of a week now without significant progress I dearly hope someone here can help me.
-
Using this config from Jethro,
(use-package! org-roam :init (map! :leader :prefix "n" :desc "org-roam" "l" #'org-roam-buffer-toggle :desc "org-roam-node-insert" "i" #'org-roam-node-insert :desc "org-roam-node-find" "f" #'org-roam-node-find :desc "org-roam-ref-find" "r" #'org-roam-ref-find :desc "org-roam-show-graph" "g" #'org-roam-show-graph :desc "org-roam-capture" "c" #'org-roam-capture :desc "org-roam-dailies-capture-today" "j" #'org-roam-dailies-capture-today) (setq org-roam-directory (file-truename "~/.org/braindump/org/") org-roam-db-gc-threshold most-positive-fixnum org-id-link-to-org-use-id t) (add-to-list 'display-buffer-alist '(("\\*org-roam\\*" (display-buffer-in-direction) (direction . right) (window-width . 0.33) (window-height . fit-window-to-buffer)))) :config (setq org-roam-mode-sections (list #'org-roam-backlinks-insert-section #'org-roam-reflinks-insert-section ;; #'org-roam-unlinked-references-insert-section )) (org-roam-setup) (setq org-roam-capture-templates '(("d" "default" plain "%?" :if-new (file+head "${slug}.org" "#+title: ${title}\n") :immediate-finish t :unnarrowed t))) (setq org-roam-capture-ref-templates '(("r" "ref" plain "%?" :if-new (file+head "${slug}.org" "#+title: ${title}\n") :unnarrowed t)))
I can make v2 working with doom on MacOS. As I’m used to spacemacs and I like the theme for org better as for doom (I know, probably not the best reason
) I tried to make v2 work with spacemacs without luck.
This is my minimalistic relevant configuration part:(add-to-list 'load-path "~/.emacs.d/private/org-roam") (require 'org-roam) ; (require 'org-roam-graph) (require 'org-roam-protocol) (setq org-roam-directory "~/data/Notes/roam/"
For capture I get an error
Could not read org-id-values from /Users/ben/.emacs.d/.cache/.org-id-locations. Setting it to nil. only after I manually call org-roam-setup can the new note be found with org-roam-node-insert
The note only shows up after I manually doorg-roam-db-sync
.
The backlink buffer also doesn’t work as expected unlike in doom:
So my question is if there’s anyone out there who’s got a similar config as the one posted for doom working for spacemacs?
-
I also tried to install doom on a recent Ubuntu 20.04 with even less success. I tried the shipped emacs 26.3 and a self-compiled 27.2.
org-roam-setup
crashed with a cryptic error message:Debugger entered--Lisp error: (void-function file) file(nil) org-roam-db-sync() org-roam-setup() eval-buffer(#<buffer *load*-973080> nil "/home/amelie/.doom.d/config.el" nil t) ; Reading at buffer position 15058 load-with-code-conversion("/home/amelie/.doom.d/config.el" "/home/amelie/.doom.d/config.el" t t) load("/home/amelie/.doom.d/config" t nomessage) (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load- error e (expand-file-name "config" doom-private-dir) doom-private-dir))) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name "config" doom-private-dir) doom-private-dir))) (load custom-file (quote noerror) (not doom-debug-mode))) (progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing user config" 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name "config" doom-private-dir) doom-private-dir))) (load custom-file (quote noerror) (not doom-debug-mode)))) (if init-p (progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing user config" 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name "config" doom-private-dir) doom-private-dir))) (load custom-file (quote noerror) (not doom-debug-mode)))) nil) (let* ((init-p (and t (condition-case e (let (file-name-handler-alist) (load (expand-file-name doom-module-init-file doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name doom-module-init-file doom-private-dir) doom-private-dir)))))) (if init-p (progn (if doom-debug-p (progn (let ((inhibit-message ...)) (message #("DOOM Initializing user config" 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name "config" doom-private-dir) doom-private-dir))) (load custom-file (quote noerror) (not doom-debug-mode)))) nil)) (progn (setq doom-init-modules-p t) (if no-config-p nil (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing core modules" 0 5 (face font-lock-comment-face)))))) (doom-initialize-core-modules)) (let* ((init-p (and t (condition-case e (let (file-name-handler-alist) (load ... t ...)) ((debug doom-error) (signal ... ...)) ((debug error) (doom--handle-load-error e ... doom-private-dir)))))) (if init-p (progn (if doom-debug-p (progn (let (...) (message #("DOOM Initializing user config" 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load ... t ...)) ((debug doom-error) (signal ... ...)) ((debug error) (doom--handle-load-error e ... doom-private-dir))) (load custom-file (quote noerror) (not doom-debug-mode)))) nil))) (if (or force-p (not doom-init-modules-p)) (progn (setq doom-init-modules-p t) (if no-config-p nil (if doom-debug-p (progn (let ((inhibit-message ...)) (message #("DOOM Initializing core modules" 0 5 (face font-lock-comment-face)))))) (doom-initialize-core-modules)) (let* ((init-p (and t (condition-case e (let ... ...) (... ...) (... ...))))) (if init-p (progn (if doom-debug-p (progn (let ... ...))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let ... ...) (... ...) (... ...)) (load custom-file (quote noerror) (not doom-debug-mode)))) nil)))) doom-initialize-modules(nil) (progn (setq doom-init-p t) (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing Doom" 0 5 (face font-lock-comment-face)))))) (setq-default exec-path doom--initial-exec-path load-path doom--initial-load-path process-environment doom--initial-process-environment) (condition-case e (load (string-remove-suffix ".el" doom-autoloads-file) nil (quote nomessage)) (file-missing (if (locate-file doom-autoloads-file load-path) (signal (quote doom-autoload-error) e) (signal (quote doom-error) (list "Doom is in an incomplete state" "run 'doom sync' on the command line to repair it"))))) (if (or (display-graphic-p) (daemonp)) (doom-load-envvars-file doom-env-file (quote noerror))) (require (quote core-modules)) (autoload (quote doom-initialize-packages) "core-packages") (eval-after-load (quote package) (function (lambda nil (require (quote core-packages))))) (eval-after-load (quote straight) (function (lambda nil (doom-initialize-packages)))) (add-hook (quote doom-first-buffer-hook) (function gcmh-mode)) (add-hook (quote after-change-major-mode-hook) (function doom-run-local-var-hooks-h)) (add-hook (quote emacs-startup-hook) (function doom-load-packages-incrementally-h)) (add-hook (quote window-setup-hook) (function doom-display-benchmark-h)) (doom-run-hook-on (quote doom-first-buffer-hook) (quote (after-find-file doom-switch-buffer-hook))) (doom-run-hook-on (quote doom-first-file-hook) (quote (after-find-file dired-initial-position-hook))) (doom-run-hook-on (quote doom-first-input-hook) (quote (pre-command-hook))) (if doom-debug-p (doom-debug-mode 1)) (doom-initialize-modules force-p)) (if (or force-p (not doom-init-p)) (progn (setq doom-init-p t) (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing Doom" 0 5 (face font-lock-comment-face)))))) (setq-default exec-path doom--initial-exec-path load-path doom--initial-load-path process-environment doom--initial-process-environment) (condition-case e (load (string-remove-suffix ".el" doom-autoloads-file) nil (quote nomessage)) (file-missing (if (locate-file doom-autoloads-file load-path) (signal (quote doom-autoload-error) e) (signal (quote doom-error) (list "Doom is in an incomplete state" "run 'doom sync' on the command line to repair it"))))) (if (or (display-graphic-p) (daemonp)) (doom-load-envvars-file doom-env-file (quote noerror))) (require (quote core-modules)) (autoload (quote doom-initialize-packages) "core-packages") (eval-after-load (quote package) (function (lambda nil (require (quote core-packages))))) (eval-after-load (quote straight) (function (lambda nil (doom-initialize-packages)))) (add-hook (quote doom-first-buffer-hook) (function gcmh-mode)) (add-hook (quote after-change-major-mode-hook) (function doom-run-local-var-hooks-h)) (add-hook (quote emacs-startup-hook) (function doom-load-packages-incrementally-h)) (add-hook (quote window-setup-hook) (function doom-display-benchmark-h)) (doom-run-hook-on (quote doom-first-buffer-hook) (quote (after-find-file doom-switch-buffer-hook))) (doom-run-hook-on (quote doom-first-file-hook) (quote (after-find-file dired-initial-position-hook))) (doom-run-hook-on (quote doom-first-input-hook) (quote (pre-command-hook))) (if doom-debug-p (doom-debug-mode 1)) (doom-initialize-modules force-p))) doom-initialize() eval-buffer(#<buffer *load*> nil "/home/amelie/.emacs.d/init.el" nil t) ; Reading at buffer position 2110 load-with-code-conversion("/home/amelie/.emacs.d/init.el" "/home/amelie/.emacs.d/init.el" t t) load("/home/amelie/.emacs.d/init" t t) #f(compiled-function () #<bytecode 0x1e0f4d>)() command-line() normal-top-level()
I’m pretty clueless as to why this would not even work at all. Btw, manually calling
org-roam-setup
creates a database but it’s empty. The setup is the same as on the Mac.
My apologies if it’s something obvious, but I stopped seeing the trees in the forst.
Thank you very much in advance and any help is much appreciated.
Best
Ben