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

Use ripgrep if installed #119

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion org-fc-awk.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ Matches all .org files ignoring ones with names don't start with
a '.' to exclude temporary / backup files.
With the '-L' option, 'find' follows symlinks."
(format
"find -L %s -name \"*.org\" -not -name \".*\" -print0"
(if (and org-fc-use-ripgrep (executable-find "rg"))
"rg ^:FC_CREATED: -L -l --null -g '[^.]*.org' %s"
"find -L %s -name \"*.org\" -not -name \".*\" -print0")
(mapconcat
(lambda (path) (shell-quote-argument (expand-file-name path)))
paths " ")))
Expand Down
5 changes: 5 additions & 0 deletions org-fc-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ Used to generate absolute paths to the awk scripts.")
:type 'function
:group 'org-fc)

(defcustom org-fc-use-ripgrep nil
"Use ripgrep instead of find."
:type 'boolean
:group 'org-fc)

;;;; Org Tags / Properties

(defcustom org-fc-type-property "FC_TYPE"
Expand Down