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

(refactor)org-roam-unlinked-references-section: make steps advisable #2417

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

okomestudio
Copy link

@okomestudio okomestudio commented Feb 4, 2024

Motivation for this change

This PR implements a proposed refactoring of the org-roam-unlinked-references-section function, so that

  • The word boundary regex is supplied via the custom variable org-roam-unlinked-references-word-boundary-re to allow more complex logic
  • The functions org-roam-unlinked-references-title-regex, org-roam-unlinked-reference-apply-word-boundary-re, org-roam-unlinked-references-file-glob-args, and org-roam-unlinked-references-result-filter-p are refactored out to allow targeted advising for custom behavior
  • The org-roam-unlinked-references-max-results-count custom variable limits result to avoid “freezing” when too many results are matched
  • The inner loop rendering the preview line is passed the values for file, row number, and col number from the previous iteration to allow more controlled rendering, in case when the matched term appears multiple times within the same line

The overall behavior of the refactored function does not change. The rationale for this change is described in #2416.

@Delapouite Delapouite linked an issue Jul 2, 2024 that may be closed by this pull request
1 task
@Delapouite Delapouite added 1. enhancement Requests to add new functionality 2. buffer Issues relating to Org-roam buffer labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. enhancement Requests to add new functionality 2. buffer Issues relating to Org-roam buffer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor unlinked references section code for more customizability
2 participants