From d46304378c03482ffdfb96fe582a95796b1db194 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 4 Nov 2025 16:41:52 +0000 Subject: Small changes --- Emacs/.config/emacs/elisp/search.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Emacs/.config/emacs/elisp') diff --git a/Emacs/.config/emacs/elisp/search.el b/Emacs/.config/emacs/elisp/search.el index eccc050..cdcaff7 100644 --- a/Emacs/.config/emacs/elisp/search.el +++ b/Emacs/.config/emacs/elisp/search.el @@ -47,7 +47,9 @@ Returns a list of files with the directory preprended to them." (defun +search/find-file () (interactive) - (find-file (completing-read "Find file: " (+search/get-all-candidates) nil t))) + (let* ((cands (+search/get-all-candidates)) + (choice (completing-read "Find file: " cands nil t))) + (find-file choice))) (defun +search/-format-grep-candidates () (thread-last (+search/get-all-candidates) @@ -57,7 +59,7 @@ Returns a list of files with the directory preprended to them." (defun +search/search-all () (interactive) - (let ((term (read-string "Search for: " (thing-at-point 'symbol))) + (let ((term (read-string "Search for: ")) (candidates (+search/-format-grep-candidates))) (thread-last candidates (format "grep --color=auto -nIHZe \"%s\" -- %s" term) -- cgit v1.2.3-13-gbd6f