org-roam / org-roam-server

A Web Application to Visualize the Org-Roam Database
MIT License
639 stars 51 forks source link

Straight org-roam links not supported? #128

Open agzam opened 3 years ago

agzam commented 3 years ago

It doesn't seem to work for links like:

[[roam:foo]]

Even though backlinks appear in org-roam buffer. Only if the link is vanilla org link such as:

[[file:20210108200947-foo.org]]

Then it shows it on the page. Seems it doesn't work with org-roam-link-auto-replace set to nil

goktug97 commented 3 years ago

Added a custom variable org-roam-server-link-auto-replace. By default it is set to t. It will replace Org-roam's roam links with file links.

https://github.com/org-roam/org-roam-server/commit/0dddb3c63483ea194e014f53f9f1955da73374f0 https://github.com/org-roam/org-roam-server/commit/c7793202e9929dc2a415482779141e7b429421ce

agzam commented 3 years ago

I still can't make it work. Is there something I'm missing? So I have:

And that did not work for me. Graph shows all the notes that lead to "Foo" scattered around like miserable orphans.

goktug97 commented 3 years ago

I only fixed the html export, I forgot about the graph. I will look into it when I got some time.

goktug97 commented 3 years ago

The problem is edges for those links are filtered by the sql query in the graph function because they are not stored as file in the database. Query results are file -> file but the actual link for roam-link is id -> file. During the database creation adding org-roam-link-replace-all won't help either because the database isn't created yet so it can't replace the org-roam links. I also tested with org-roam-graph and the result is the same.

@jethrokuan do you have any suggestions?

jethrokuan commented 3 years ago

Might have to rethink the whole caching and interaction mechanism in Org-roam, I think this will come back to bite us later on. Will post up some redesign plans soon-ish.

agzam commented 3 years ago

Also, while we at it (I'm not sure if this is related), can we please discuss the possibility of including links to headings (i.e.: [[roam:filename*Heading]] type of links) in the graph at some point?