helm-projectile icon indicating copy to clipboard operation
helm-projectile copied to clipboard

Make helm-projectile-ag provide a default search input like helm-proj…

Open Chobbes opened this issue 2 years ago • 1 comments

…ectile-grep.

When using helm-projectile-grep the search term will automatically be populated with the symbol at point, or the selected region. These changes make helm-projectile-ag do the same thing.


Before submitting a PR make sure the following things have been done (and denote this by checking the relevant checkboxes):

  • [ ] The commits are consistent with our contribution guidelines (Not sure this exists??)
  • [x] The new code is not generating bytecode or M-x checkdoc warnings
  • [ ] You've updated the changelog (if adding/changing user-visible functionality)
  • [ ] You've updated the readme (if adding/changing user-visible functionality)

Thanks!

Chobbes avatar Oct 17 '22 14:10 Chobbes

Apparently there is already an option for this within helm-ag itself...

(setq helm-ag-insert-at-point 'symbol)

That said, I do wonder if it should follow helm-projectile-set-input-automatically. The documentation for helm-projectile-set-input-automatically does mention this:

Applies to ‘helm-projectile-grep’ and ‘helm-projectile-ack’ only. If the ‘helm-ag’ package is installed, then automatic input behavior for ‘helm-projectile-ag’ can be customized using ‘helm-ag-insert-at-point’.

So maybe this has all been considered before... Still, it seems an odd default for helm-projectile-ag. Thoughts?

Chobbes avatar Oct 20 '22 15:10 Chobbes