Wilfred / ag.el

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

Support for ag grouped output #104

Closed albertodonato closed 8 years ago

albertodonato commented 8 years ago

This adds support to match file/line/column in the compile filter with ag --grouped output, which can be toggled setting 'ag-group-matches'.

It also adds an 'ag-context-lines' custom for adding context to the match, without the need to change ag-arguments.

Wilfred commented 8 years ago

Ooh, this is really cool. I've been wanting to have grouped output for a while. However, I think v1.0 is going to solve this better. See my screenshot in #99.

albertodonato commented 8 years ago

Ah, I didn't see that, nice! Yeah grouped output is really useful (it's the main reason I was previously using full-ack.el). When will 1.0 be ready? :)

Any chance you can incorporate some of my changes so you don't need to customize the ag command line?

Btw, thanks for ag.el, it's really neat :)

Wilfred commented 8 years ago

OK, I've changed my mind about this, and I think this is worth merging. v1.0 isn't something I'm actively working on, and this is definitely an improvement.

However, #109 already added support for specifying the context, so would you mind removing ag-context-lines from this PR?

stardiviner commented 8 years ago

Any updated on this? Looks like ag.el not merged yet. Waiting for change on ag-context-lines?

albertodonato commented 8 years ago

@Wilfred WDYT about about keeping ag-context-lines as fallback default in case the prefix is not used? ag-context-lines is nil by default so it wouldn't change the existing behavior, but it allows setting a default if context is always desired.

albertodonato commented 8 years ago

I made the proposed change in this branch, please consider it for merging.

albertodonato commented 8 years ago

Hi, any chance this can get merged?

sparkiegeek commented 8 years ago

@Wilfred this would be great to have, can it be merged?

Wilfred commented 8 years ago

Merged, thank you!

I think we should look at enabling grouped output by default soon too.