(fix)org-roam-file-p: don't exclude org-roam-directory#2178
Merged
jethrokuan merged 2 commits intoorg-roam:mainfrom May 2, 2022
Merged
(fix)org-roam-file-p: don't exclude org-roam-directory#2178jethrokuan merged 2 commits intoorg-roam:mainfrom
jethrokuan merged 2 commits intoorg-roam:mainfrom
Conversation
Don't exlude the org-roam-directory even if it matches org-roam-file-exclude-regexp. Should fix [org-roam#2165].
Contributor
Author
|
When I'm looking at it again, I think it would probably be better to have |
Refactor PR org-roam#2178 to avoid recalculating (file-relative-name path org-roam-directory) multiple timess.
Member
|
Thanks! |
jethrokuan
added a commit
that referenced
this pull request
May 16, 2022
Merged
jethrokuan
added a commit
that referenced
this pull request
May 16, 2022
hpfr
added a commit
to hpfr/system
that referenced
this pull request
Jun 27, 2022
This was changed upstream in org-roam/org-roam#2178
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't exlude the org-roam-directory even if it matches
org-roam-file-exclude-regexp.
Should fix #2165.
This makes
org-roam-file-pcompareorg-roam-file-exclude-regexponly with files and subdirectories withinorg-roam-directory, not the entire path.Motivation for this change
When someone has an
org-roam-directorythat contains a (sub)string that is a part oforg-roam-file-exclude-regexp, the entire org-roam directory is excluded, and all files removed from the database.For example, when
org-roam-directoryis "~/data/org-roam/" andorg-roam-file-exclude-regexpis "data/", the entire roam directory is exluded, and no files are found.