Org-roam: Automatically suggest backlinks

Created on 10 Nov 2020  路  3Comments  路  Source: org-roam/org-roam

Brief Abstract

Automatically suggest backlinks to a node by searching eligible files in org-roam-directory.

Long Description

Currently, all backlinks listed in the backlinks buffer must be manually-created links to the current node from other nodes in org-roam-directory. It would be nice if there were also the option (or a command at least) to suggest backlinks to the current node automatically by searching your org-roam files for occurrences of the title (and #+ROAM_ALIAS if applicable). This search should only look in body text of the files (i.e., not titles or headlines), and should not search in existing link text (whether the link refers to an Org Roam file or not). These automatically-suggested backlinks should be listed in a separate heading in the backlinks buffer, and should be populated asynchronously after the initial manual backlinks have been populated.

Proposed Implementation (if any)

I'm not sure how Roam searches for existing manual backlinks, but presumably we'd piggyback on that process, using different search criteria (i.e., a different regex).

Please check the following:

  • [x] No similar feature requests

I didn't see anything, but I don't know what the standard terminology for this is.

enhancement

Most helpful comment

although I'm not sure if it also searches for the aliases

It does.

All 3 comments

We already have org-roam-unlinked-references which does what you want, although I'm not sure if it also searches for the aliases. Try it out and see if it works for your use-case.

although I'm not sure if it also searches for the aliases

It does.

Thanks, that's exactly what I want. The command was initially always giving me no results without any error because my rg didn't have PCRE2 support - I've attempted to fix this in #1243.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Donkeyfish87 picture Donkeyfish87  路  4Comments

grzm picture grzm  路  4Comments

cantao picture cantao  路  5Comments

tmalsburg picture tmalsburg  路  6Comments

rasendubi picture rasendubi  路  3Comments