Wilfred / ag.el

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

editable default #123

Open wbolster opened 7 years ago

wbolster commented 7 years ago

it would be great if ag.el had a customizable option to make the default "dwim" that uses the word at point as a default actually editable when i call (ag) and related commands like (ag-project).

right now it's like this:

Search string (default foo):

which is great if you want to type something yourself.

the option i would like to have would change this to

Search string: foo

i.e. 'foo' is already filled in and editable.

this breaks some workflows so a customizable flag makes sense.

thoughts? i may come up with a pr if you agree this is a useful add-on to this otherwise awesome package.

Wilfred commented 7 years ago

This should already be possible: press M-n. It's not very discoverable I know.

Striking the right balance between allowing editing of the input, and minimising keystrokes, is tricky. There's an open issue to try to improve further.

wbolster commented 7 years ago

see also #112 where i posted a hack that sort-of implements this.