Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make org-roam aware of org links in non-org text-mode files and comments in prog-mode files. #2422

Open
hab25 opened this issue Mar 1, 2024 · 0 comments

Comments

@hab25
Copy link

hab25 commented Mar 1, 2024

Brief Abstract

Make org-roam aware of org links in non-org text-mode files and comments in prog-mode files.

Long Description

Use case: for programming projects where all team members use org-roam (e.g. personal projects), it is useful to link to org-roam nodes instead of writing the text in the comment itself; org-roam nodes have much more useful functionality than a programming language comment.

Though #'org-roam-node-insert is already possible in a non-org file, after invoking it the resultant link will not be considered by org-roam, such that it won't show up as a backlink in the node's org-roam buffer and could would become stale if the org-roam node's id were to change or cease to exist.

Proposed Implementation (if any)

The following is based on uninformed guesswork:

When building the index for storage in the db, consider all files in org-roam-directory, not just ones ending in one of org-roam-file-extensions.
For non-org text-mode files, the current mechanism that is used to detect links in org files probably just works.
For prog-mode files, restrict to comments only by consulting the syntax table, then "treat each comment as a text-mode buffer" and apply the above detection mechanism.

Please check the following:

  • [ x ] No similar feature requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant