aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/elisp/search.el
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2025-11-04 16:41:52 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2025-11-04 16:41:57 +0000
commitd46304378c03482ffdfb96fe582a95796b1db194 (patch)
treed16586d46c1bdca469d30e4b042b681e6229b428 /Emacs/.config/emacs/elisp/search.el
parentfe0c756636c88baeeb0b80ac3e8817b7049fe4b1 (diff)
downloaddotfiles-d46304378c03482ffdfb96fe582a95796b1db194.tar.gz
dotfiles-d46304378c03482ffdfb96fe582a95796b1db194.tar.bz2
dotfiles-d46304378c03482ffdfb96fe582a95796b1db194.zip
Small changes
Diffstat (limited to 'Emacs/.config/emacs/elisp/search.el')
-rw-r--r--Emacs/.config/emacs/elisp/search.el6
1 files changed, 4 insertions, 2 deletions
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)