Skip to content

Commit

Permalink
feat: Show full paths in org-node-grep
Browse files Browse the repository at this point in the history
  • Loading branch information
meedstrom committed Aug 24, 2024
1 parent 853acfc commit 02681b3
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions org-node.el
Original file line number Diff line number Diff line change
Expand Up @@ -3070,17 +3070,19 @@ In case of unsolvable problems, how to wipe org-id-locations:
(fboundp 'consult--grep-make-builder)
(fboundp 'consult--ripgrep-make-builder)
(boundp 'consult-ripgrep-args))
(let ((consult-ripgrep-args (concat consult-ripgrep-args " --type=org")))
(if (executable-find "rg")
(consult--grep "Ripgrep in all known Org files: "
#'consult--ripgrep-make-builder
(org-node--root-dirs (org-node-list-files t))
nil)
;; Old, much slower
(consult--grep "Grep in all known Org files: "
#'consult--grep-make-builder
(org-node-list-files)
nil)))))
(cl-letf (((symbol-function #'file-relative-name)
(lambda (name &optional _dir) name)))
(let ((consult-ripgrep-args (concat consult-ripgrep-args " --type=org")))
(if (executable-find "rg")
(consult--grep "Ripgrep in all known Org files: "
#'consult--ripgrep-make-builder
(org-node--root-dirs (org-node-list-files t))
nil)
;; Much slower, no --type=org means must target files and not dirs
(consult--grep "Grep in all known Org files: "
#'consult--grep-make-builder
(org-node-list-files)
nil))))))

(defvar org-node--linted nil
"List of files linted so far.")
Expand Down

0 comments on commit 02681b3

Please sign in to comment.