Searching

In emacs, among other packages, you can use org-capture and org-roam to store information.

Below is a hydra with functions you can use to retrieve information you stored.

Search Hydra



(setq search-key (with-octicon "search" "Bookmarked Directories") )

(setq find-files-title (with-octicon "search" "Search Files And Text With The Silver Searcher"))
;generate hydra
(pretty-hydra-define Search-Files (:title find-files-title :quit-key "q" :color teal )
(
"A"

(
;   
    ("i" counsel-ibuffer "Counsel iBuffer (no manage)")
    ("I" ibuffer "Edit buffer list (manage)")
    ("c" counsel-org-capture "Counsel Capture (C-o t follow)" )
    ("o" counsel-org-goto "Search Org *s Buffer")
    ("b" counsel-bookmark "Search Bookmarks C-c f")
    ("d" counsel-bookmarked-directory  "Search Bookmarked dirs C-c d")
    ("r" counsel-buffer-or-recentf "Search Recent Files and buffers" )
;    ("R" counsel-buffer-or-recentf "Search Recent Files" )
    ("H" counsel-imenu "Search Org Headings")
    ("O" counsel-org-goto-all "Search Open Org *")
    ("A" counsel-org-agenda-headlines "Search Org Agenda *")
    ("j" poseidon/bm-counsel-find-bookmark  "Counsel Bkmark C-c j")
;    ("o" ag-kill-other-buffers "Delete Other Ag Buffers")
    
);end theme

"B"

(
    
    ("s" isearch-forward "isearch forward" )
    ("J" counsel-file-jump "Search Subdirectories For File")
    ("L" pos-counsel-locate "Locate Everything" )
    ("@" ag "Search With Ag")
    ("|" ag-files "Ag Search Text in Files")
;    ("p" ag-project "Ag Search Text In Projects")
;    ("P" counsel-projectile-ag "Counsel Search Project Ag")
    ("0" helm-org-rifle  "Helm Org Rifle Orgs")
;    ("1" ag-project-regexp "Search Regex In Projects")
    ("2" ag-regexp "Regex  Ag Search")
    ("3" helm-org-rifle-current-buffer "Helm Org Rifle Buffer")
    ("4" helm-org-rifle-agenda-files "Rifle agenda files")
    ("5" helm-org-rifle-directories "Helm Org Rifle Buffer")
);end specific

"C"
(
    ("l" counsel-find-library "Counsel Find Library")
    ("f" counsel-describe-function "Counsel Describe Function C-h f" )
    ("x" counsel-M-x "Search and Call Functions" )
    ("v" counsel-describe-variable "Counsel Describe Variable C-h v" )
    ("M" helpful-macro "Helpful Describe Macro" :color amaranth)
    ("K" helpful-macro "Helpful Describe Key" :color amaranth)
    ("#" counsel-descbinds "Counsel Describe Bindings" )
    ("B" describe-personal-key-bindings "Describe Personal Bindings" )
    ("F" counsel-describe-face "Counsel Describe Face" :color amaranth)
    ("D" list-faces-display "List Faces Display")
;    ("<F1>" ivy-mode "Ivy Mode" :color amaranth)
;    ("<F2>" ivy-rich-mode "Ivy Rich Mode" :color amaranth)
;    ("<F3>" counsel-mode "Counsel Mode" :color amaranth)
;    ("<F4>" helm-mode "Helm Mode" :color amaranth)
    ("h" hydra-helm/body "Return To Helm" :color blue )
    ("<SPC>" nil "Quit" :color blue )
);end library searches
);end hydra body
);end pretty-hydra-find-files
(bind-key "<C-m> s" 'Search-Files/body)

Windows Default Find Program

On Windows, you should change the default find program. You can move git.exe to a folder with a path you like and set it as the emacs default



(setq git-find-p "C:/ProgramData/relocatedPrograms/find.exe")
(setq find-program git-find-p)

Silver Searcher

You can use ag.exe instead of ack instead of grep.


(setq ag-executable-p "C:\\ProgramData\\chocolatey\\bin\\ag.exe")

;find expressions in files in directories using ag

(use-package ag
:commands (ag-files ag-regexp ag-project ag-project-files ag-project-regexp)

:config
(setq ag-executable ag-executable-p)
;(next-error-follow-minor-mode t)
;(automatically-display-search-results-at-point t)
(setq ag-highlight-search t)
(setq ag-reuse-buffers t)
(setq ag-reuse-window t)
;:bind
;("M-s a" . ag-project)
);end ag