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

    (defun my-helm-grep-do-git-grep ()
      (setq helm-ag-insert-at-point nil)
    (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)
    (global-set-key (kbd "C-c k") 'my-helm-grep-do-git-grep-at-point)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.