Org-roam: `rg` returns bad paths for Windows users

Created on 28 May 2020  路  3Comments  路  Source: org-roam/org-roam

Description

As reported by @nobiot , the return results from the rg shell-out aren't nice paths, and cause downstream issues.

image

rg was installed via scoop in this case.

Environment

Commit 214f9df
Windows 10
Emacs: GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 (via org-roam-diagnostics)

prioritp1

Most helpful comment

@jethrokuan I did comparison of elisp and rg on my Windows machine; you might be able to take it further, if you are interested.

https://org-roam.discourse.group/t/what-does-it-feel-like-to-work-with-10-000-notes-in-org-roam-benchmarking-org-roams-search-methods/227

All 3 comments

@jethrokuan, thanks for keeping this as a separate issue. Much appreciated. 馃憤

@jethrokuan

735 looks good with Windows 10.

image
Figure 1. org-roam--shell-command-files still returns with \\; however...

image
Figure 2. Canonicalizing works :)

Environment:

  • Windows 10
  • Emacs 26.3
  • Commit b2594b8

Procedure

  1. Merge with latest master branch

  2. Check org-roam works before using rg (i.e. elisp still works)

  3. Change
    (setq org-roam-list-files-commands '(rg elisp))

  4. Test
    edebug-defun on for org-roam--list-files-rg to doubly sure org-roam uses rg.
    Run org-roam-db-build-cache.

    Title change.
    Create/delete a new backlink.
    Create/delete a new cite backlink.
    Check C-c n i (org-roam-insert)
    Check alias works for org-roam-insert
    Create a note in an external editor while Emacs is on, run `org-roam-db-build-cache, see if a backlink are created from the newly created file

@jethrokuan I did comparison of elisp and rg on my Windows machine; you might be able to take it further, if you are interested.

https://org-roam.discourse.group/t/what-does-it-feel-like-to-work-with-10-000-notes-in-org-roam-benchmarking-org-roams-search-methods/227

Was this page helpful?
0 / 5 - 0 ratings