Open cpitclaudel opened 8 years ago
I set ag-group-matches
to nil
.
M-x customize-variable RET ag-group-matches RET
That's a neat workaround, thanks! But still, it's be nice to be able to use the grouping.
@Wilfred - Please consider rolling back the format/grouping change until things don't break, With wgrep and next error both borked. Obviously there's a workaround, but I don't think any of your hardcore users are bothered by the grouping, and TBH it just wastes space.
the new grouped format is actually awesome and improved my ag.el experience in a very significant positive way.
i argue it does not waste space at all. actually it saves a lot of space, allowing me to actually see the filename and match data, which i could not before for deep source directory trees, since the file name part on each line already used up the vertical space. with the new format, the match lines show
some/very/long/path/to/file.ext
line:col: actual code is here
line:col: more code
this is much better than
some/very/long/path/to/file.ext:line:col: actual code is here
some/very/long/path/to/file.ext:line:col: more code
less repetition, easier to look at.
The real issue is tool breakage. Putting "actually awesome" changes in for aesthetic pleasantness is great and all, but breaking workflow is bad.
Unless working compatibility is achieved defaults should not be altered.
@wbolster I'm not sure a bug report about interaction with wgrep is the right place to discuss the aesthetics of this :) I don't have strong feelings about grouping vs. no grouping, but the change broke a significant part of ag.el for me.
Hmm, I came across this issue just today! Turns out I didn't need to use wgrep
for quite many months! :)
@koshigoe's workaround works for me too.
Someone on reddit today was confused with how all search results are prefixed with File:
because ag-group-matches
defaults to t
.
My suggestion would be to set ag-group-matches
to nil
, and add --group
to ag-arguments
by default.
Update: Turns out someone has already posted this issue: https://github.com/Wilfred/ag.el/issues/122, and https://github.com/Wilfred/ag.el/issues/120
Recently (days/weeks?) ago, the listing format changed from a grep-like filename-on-every-line format to a grouped listing. THis seems to have broken wgrep editing of results.
Repro:
package-install
ofag
andwgrep
ag
with some search textwgrep-change-to-wgrep-mode
in results bufferC-x C-s
yields(No changes to be performed)
Expected:
C-x C-s
saves the changes to the corresponding files (which works find withrgrep
and used to work fine with ag).Thanks for the awesome package, btw!