A big redesign is on the way for how [[org-roam]] works - lots of discussion here. The biggest change seems to be a move to use id links rather than file links.
Lots of people in the thread seem happy about this. A couple of things that I’m concerned about:
will this work fine with org-publish?
are you then more dependent on org / org-roam to view these files?
I think things will probably work with org-publish fine, as id links are a long-standing org-mode thing in their own right, not a thing new to org-roam.
The second point bugs me a bit. I sometimes read my private wiki in orgzly / orgro on my phone. I wonder how this will be affected. Also I just like file links as being slightly more software-agnostic.
Hey ho. I’ll try using id links for a bit now. They work already in org-roam v1 from what I understand, as well as file links.
Some snippets I’ll add to my config:
(setq org-id-link-to-org-use-id t)
(setq org-id-method 'ts)
(setq org-roam-prefer-id-links t)
and
(defun ngm/org-hide-properties ()
"Hide org headline's properties using overlay."
(save-excursion
(goto-char (point-min))
(while (re-search-forward
"^ *:PROPERTIES:\n\\( *:.+?:.*\n\\)+ *:END:\n" nil t)
(overlay-put (make-overlay
(match-beginning 0) (match-end 0))
'display ""))))
(add-hook 'org-mode-hook #'ngm/org-hide-properties)
Unable to resolve link: "20210326T231455.451131"
during publish in the gitlab pipeline. But weirdly, it’s working locally if you do org-publish-current-file
.
Here’s one thing that might help get things published (via https://github.com/syl20bnr/spacemacs/issues/13387)
Hmm, actually, it also doesn’t work locally if I run make republish
rather than org-publish-current-file. Is there a difference between publish current file and publish project?
I wonder if it’s something do with relative links. Weird though.
It seems like maybe org-publish just only works with file links for linking between files? https://orgmode.org/manual/Publishing-links.html#Publishing-links However, still confused as to why org-publish-current-file
works.
I note here Jethro’s use of org-id-extra-files
in his export process:
(let ((org-id-extra-files (find-lisp-find-files org-roam-directory "\.org$")))
(org-hugo-export-wim-to-md))
I wonder if this would resolve the issue I was having with org ids and exports? From what I can tell of Jethro’s export he does not use org-publish, he loops through his files one-by-one from his Ninja build and calls export on each file from there. But still, I imagine this might help.
Test id link: [[org-roam]].
^ This appears to work! During processing, when it hit this id link, org-publish-project output
1452 files scanned, 9 files contains IDs, and 34 IDs found.
It took a while. Presumably it would only occur once per publish.
OK, so I’ve been pushed to do the update.
M-x org-roam-migrate-wizard
. No errors. It was fairly quick, maybe 15-20 minutes. (For reference, I have ~2000 note files).Various problems.
https://org-roam.discourse.group/t/v2-error-running-org-roam-dailies-find-today/1511/7
I was using a custom org-roam-dailies-capture-templates
, in order to allow a different dailies folder. Just removing that seems fine, as the new built-in one works with org-roam-dailies-directory
it seems.
I guess the spacemacs layer needs updating.
Dunno why.
From here:
https://org-roam.discourse.group/t/org-roam-v2-org-id-id-link-resolution-problem/1491/4
(org-id-update-id-locations (org-roam–list-all-files))
org-roam v2 has reverted from emacs-sqlite3 to emacs-sqlite. This gets built during installation I believe, which requireds gcc. My gitlab pipeline didn’t have this.
I added:
apt-get --yes --force-yes install build-essential
in order for it to work.
see: https://gitlab.com/ngm/commonplace/-/commit/d661df58e2b9801cbdad420160d17161b001f1d8
You now need to use org-roam-db-sync
.
see: https://gitlab.com/ngm/commonplace/-/commit/b4c257b251e0377ee9935b9323e12d4dd301ce3b
backlinks function was failing.
org-roam--org-roam-file-p
has become org-roam-file-p
.
That stops the build failing.
But I think something has also changed in the actual query itself, as no backlinks are being included. I’ll have to come back to that.
Rendering context...