counsel.el: Make find-program customizable
Instead of adding a new user option counsel-find-program (whose :type should be file, not string BTW), why don't you customise find-program directly?
Instead of adding a new user option
counsel-find-program(whose:typeshould befile, notstringBTW), why don't you customisefind-programdirectly?
Customizing find-program directly will break some builtin packages such as project.el which uses find-program with hard coded find arguments like this:
(defun project--files-in-directory (dir ignores &optional files)
(require 'find-dired)
(require 'xref)
(defvar find-name-arg)
(let* ((default-directory dir)
;; Make sure ~/ etc. in local directory name is
;; expanded and not left for the shell command
;; to interpret.
(localdir (file-local-name (expand-file-name dir)))
(command (format "%s %s %s -type f %s -print0"
find-program
localdir
(xref--find-ignores-arguments ignores localdir)
(if files
(concat (shell-quote-argument "(")
" " find-name-arg " "
(mapconcat
#'shell-quote-argument
(split-string files)
(concat " -o " find-name-arg " "))
" "
(shell-quote-argument ")"))"")
)))
(project--remote-file-names
(sort (split-string (shell-command-to-string command) "\0" t)
#'string<))))
Using a new user option is to keep those still workable.
Customizing
find-programdirectly will break some builtin packages such asproject.elwhich usesfind-programwith hard codedfindarguments like this:
Please report this with M-x report-emacs-bug RET if there is no such issue already on the Emacs issue tracker.
Using a new user option is to keep those still workable.
Thanks, SGTM.
Please report this with
M-x report-emacs-bug RETif there is no such issue already on the Emacs issue tracker.
Thanks for advice, I will report it after a while.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44210
Sorry for late reporting...
Thanks, no need to apologise.
Hello, how can I use fd with counsel now?
Is it enough to change the find-program variable?