From 56f6f467fef508f1e5e2d3b6538da4bb2f2dd27a Mon Sep 17 00:00:00 2001 From: Chris Barrett Date: Wed, 12 Oct 2022 16:06:16 +1300 Subject: [PATCH] Always apply --json flag for ripgrep search --- lisp/org-roam-search.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-roam-search.el b/lisp/org-roam-search.el index e9390c6..706addc 100644 --- a/lisp/org-roam-search.el +++ b/lisp/org-roam-search.el @@ -63,8 +63,8 @@ :group 'org-roam-search :type 'string) -(defcustom org-roam-search-ripgrep-flags '("--follow" "--smart-case" "--json") - "The flags to apply when searching via ripgrep." +(defcustom org-roam-search-ripgrep-extra-flags '("--follow" "--smart-case") + "Extra flags to apply when searching via ripgrep." :group 'org-roam-search :type '(list string)) @@ -167,7 +167,7 @@ would be excluded." (defun org-roam-search--ripgrep-for-nodes (query) (let ((reporter (make-progress-reporter "Searching nodes")) (files (ht-create)) - (ripgrep-args (append org-roam-search-ripgrep-flags (list query org-roam-directory)))) + (ripgrep-args (append org-roam-search-ripgrep-extra-flags (list "--json" query org-roam-directory)))) (async-wait (apply 'async-start-process "ripgrep" org-roam-search-ripgrep-program (lambda (_)