# Symlinked subdirectory: links and backlinks

**URL:** <https://org-roam.discourse.group/t/symlinked-subdirectory-links-and-backlinks/879>\
**Category:** Troubleshooting\
**Created:** [October 17, 2020, 9:54pm UTC](https://org-roam.discourse.group/t/symlinked-subdirectory-links-and-backlinks/879 "2020-10-17T21:54:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![holtzermann17](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/holtzermann17/32/377_2.png) [@holtzermann17](https://org-roam.discourse.group/u/holtzermann17)\
**Post date:** [October 17, 2020, 9:54pm UTC](https://org-roam.discourse.group/t/symlinked-subdirectory-links-and-backlinks/879/1 "2020-10-17T21:54:09Z")

</div>

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:

 ![Screenshot from 2020-10-17 22-51-19](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/9d84ec9b1baeaf60af2010eb9bea90f0ada9f9fa.png)

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

 ![Screenshot from 2020-10-17 22-47-25](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/8a7a6cac256d31b1eb00b3b3d3469eb8f2e36c52.png)

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!

---

<div class="post-metadata">

**Author:** ![holtzermann17](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/holtzermann17/32/377_2.png) [@holtzermann17](https://org-roam.discourse.group/u/holtzermann17)\
**Post date:** [October 17, 2020, 10:11pm UTC](https://org-roam.discourse.group/t/symlinked-subdirectory-links-and-backlinks/879/2 "2020-10-17T22:11:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![holtzermann17](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/holtzermann17/32/377_2.png) [@holtzermann17](https://org-roam.discourse.group/u/holtzermann17)\
**Post date:** [October 17, 2020, 10:29pm UTC](https://org-roam.discourse.group/t/symlinked-subdirectory-links-and-backlinks/879/3 "2020-10-17T22:29:02Z")

</div>

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](https://github.com/org-roam/org-roam-server/issues/102)).

 ![Screenshot from 2020-10-17 23-27-35](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/3379d70a1ec4434b00123d520e2083bdd1de4f15.png)

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]]
```

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 18, 2020, 5:01pm UTC](https://org-roam.discourse.group/t/symlinked-subdirectory-links-and-backlinks/879/4 "2020-10-18T17:01:46Z")

</div>

You may well be aware of this change:

- [#1109](https://github.com/org-roam/org-roam/pull/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?

---

<div class="post-metadata">

**Author:** ![holtzermann17](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/holtzermann17/32/377_2.png) [@holtzermann17](https://org-roam.discourse.group/u/holtzermann17)\
**Post date:** [October 18, 2020, 5:41pm UTC](https://org-roam.discourse.group/t/symlinked-subdirectory-links-and-backlinks/879/5 "2020-10-18T17:41:18Z")

</div>

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!).
