I'd like to create two keybindings for helm-do-ag-project-root
or helm-project-ag
where one would have (setq helm-ag-insert-at-point nil)
and one would have (setq helm-ag-insert-at-point 'symbol)
So that I can selectively use word at-point for search.
Below is my attempt but not working.
(use-package helm-projectile
:ensure t
:config
(defun my-helm-grep-do-git-grep ()
(setq helm-ag-insert-at-point nil)
(helm-projectile-ag)
)
(global-set-key (kbd "C-c g") 'my-helm-grep-do-git-grep)
(defun my-helm-grep-do-git-grep-at-point ()
(setq helm-ag-insert-at-point 'symbol)
(helm-projectile-ag)
)
(global-set-key (kbd "C-c k") 'my-helm-grep-do-git-grep-at-point)
)