Somehow I never twigged that you wrote Ardour and JACK. Thanks for JACK! (My audio editing needs are very modest and so I haven't actually tried Ardour.)
first search ts, tsx, js, jsx files in the current project. Exclude .git, node_modules...
then search node_modules with the ts.. extensions, still exclude .git
finally search the whole tree for .py files still exclude .git, /dist...
This is coupled with consult-find-grep. I basically want to find a string in the most relevant file type. I never want a result from node_modules first in the results. It took some work, but the results are quite nice!
(find "$projroot" -name .git -prune -o -name node_modules -prune -o \
\( -name '*.[tj]s' -o -name '*.[tj]sx' \) -print0 ;
find "$projroot"/node_modules \
\( -name '*.[tj]s' -o -name '*.[tj]sx' \) -print0 ;
find "$projroot" -name .git -prune -o -name dist -prune -o \
\( -name '*.py' \) -print0 ) |
xargs -0 grep /dev/null "$search_pattern"
And, although that approach does work (and maybe even that script will work without any bug fixes) it probably goes a substantial distance toward showing why fd was written.Doing the three searches separately and exiting after one succeeds is only slightly more code.
and
https://github.com/paddymul/emacs-from-scratch/blob/master/p...
The emacs-lisp for changing the behaviour of consult-grep was quite complex and took a while to write.
Ardour has around 800k lines of code, and ag (not even the fastest of the new greps) can search it all more or less faster than I can type.
The idea of some system that analyzes/caches/indexes the code just isn't necessary anymore.