Symlinked subdirectory: links and backlinks

Hi, I’m trying something a little different from usual. I have two org roam directories, and I’ve symlinked one into the other.

ln -s ~/santafe/ /home/joe/exp2exp.github.io/src/

When I “check out” the santafe directory (and ignore the other one), then backlinks work as desired:

However, when I check out the other “parent level” directory, then backlinks are no longer working in “child level” nodes:

Regular forward links work fine in both cases.

As indicated in the upper-right of the *org-roam* buffer, the included file is accessed via a relative path:

../../santafe/gather_data_via_stack_exchange_apis

I’m wondering whether there’s a possible work around, because symlinked subdirectories would offer a nice workflow for collaboration!

OK, I did find a work-around level solution which is:

(setq org-roam-link-file-path-type 'absolute).

That works! It does require any downstream users to put the files in the same place on their directory but that’s not a major issue.

However, links are not showing up properly with org-roam-graph or Org Roam Server (I’ve documented the latter issue in a bug report: https://github.com/org-roam/org-roam-server/issues/102).

Here there should be links from “Joe’s Santa Fe Institute proposal (Redux)” to other nodes in the santafe subdirectory. But only a link to Top is shown.

#+title: Joe’s Santa Fe Institute proposal (Redux)
#+roam_tags: CDN
#+CATEGORY: PERS

This is some content trying to build a linear plan.

From within the Hyperreal Enterprises repo this should connect to
[[id:744b12b2-b93c-4ad9-9fd1-5f649eac548f][Top]]

M1      [[file:~/santafe/gather_data_via_stack_exchange_apis.org][Gather data via Stack Exchange APIs]]
M2      [[file:~/santafe/argumentation_theoretic_analysis.org][Argumentation-theoretic analysis]]
M3      [[file:~/santafe/process_model_analysis.org][Process model analysis]]
M4      [[file:~/santafe/ml_nlp_bootcamp.org][ML/NLP bootcamp]]
M5      [[file:~/santafe/initial_ml_baseline_e_g_match_q_a.org][Initial ML baseline, e.g., match Q-A]]
M6      [[file:~/santafe/hierarchical_ml_for_content_extraction.org][Hierarchical ML for content extraction]]

You may well be aware of this change:

  • #1109 Org-roam now does not resolve symlinks.

Perhaps you can look at the code before this change, and override the current with the old?

Temporarily, what I’ve done is move things to a subdirectory (no symlinks) and also made sure to explicitly set these variables in the subdir:

file: ~/exp2exp.github.io/src/subdir/.dir-locals.el

((nil . ((org-roam-directory . "~/exp2exp.github.io/src/")
         (org-roam-db-location . "~/exp2exp.github.io/src/org-roam.db"))))

That’s not perfect but it seems to work, and I can copy things around, rather than linking them (at least for the time being!).

1 Like