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

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

Open
vikram-mandyam opened this issue Feb 1, 2024 · 1 comment

Comments

@vikram-mandyam
Copy link

Description

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))

Steps to Reproduce

Set the org-roam-directory to a directory containing spaces like shown above.

org-roam-diagnostics

Copy info below this line into issue:

  • Emacs: GNU Emacs 28.2 (build 2, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build 23C71))
    of 2024-01-09
  • Framework: N/A
  • Org: Org mode version 9.4.6 (9.4.6-796-ge68375.dirty-elpa @ ....)
  • Org-roam: 2.2.2- sqlite-connector: sqlite
@vikram-mandyam
Copy link
Author

I have created a pull request for fixing this - please have a look #2411

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