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

Fix Issue #2410 - Unlinked References doesnt work if the org-roam-directory has a space in it. #2411

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vikram-mandyam
Copy link

@vikram-mandyam vikram-mandyam commented Feb 1, 2024

Fix Issue #2410
In the function org-roam-unlinked-references-section the org-roam-directory variable is concated to form the rg_command. This doesn't cover any spaces in the org-roam-directory path.
So if the path is /Users/user123/MyDrive/My Files/org-mode/org-roam, due to the space in My Files rg returns an error:

rg: /Users/user123/MyDrive/My: No such file or directory (os error 2)
rg: Files/org-mode/org-roam: No such file or directory (os error 2)

This is due to the lines here:

(rg-command (concat "rg -L -o --vimgrep -P -i "
                               (mapconcat (lambda (glob) (concat "-g " glob))
                                          (org-roam--list-files-search-globs org-roam-file-extensions)
                                          " ")
                               (format " '\\[([^[]]++|(?R))*\\]%s' "
                                       (mapconcat (lambda (title)
                                                    (format "|(\\b%s\\b)" (shell-quote-argument title)))
                                                  titles ""))
                               org-roam-directory))

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

Successfully merging this pull request may close these issues.

None yet

1 participant