Wilfred / ag.el

An Emacs frontend to The Silver Searcher
http://agel.readthedocs.org/en/latest/
525 stars 61 forks source link

ag.el could make the default value more discreet #90

Closed cpitclaudel closed 9 years ago

cpitclaudel commented 9 years ago

The suggestions that ag.el gives (ag/dwim-at-point) are pretty good, but I find it slightly inconvenient that it pre-fills the minibuffer, forcing one to remove that text before typing their own search should the symbol at point not be what you want to search for.

The default rgrep does this in a nicer way; it tells you what the default will be if you press RET right away, but if you want something else you don't have to empty the minibuffer first.

I locally edited the source to use (grep-read-regexp) for myself, and I find it to work very nicely.

Wilfred commented 9 years ago

Ooh, I think that's a good idea. It's the same number of keystrokes if you want to use the symbol at point, but slightly fewer if you want a different input. It does increase the number of keystrokes if you want to search for a slight variant on the symbol at point, but I think that's much rarer.

cpitclaudel commented 9 years ago

Yup, I think wanting to change the input is less common, and it's just one more keystroke (M-n or downn arrow)

cpitclaudel commented 9 years ago

This is brilliant :) Thanks!