mhayashi1120 / Emacs-wgrep

Writable grep buffer and apply the changes to files
GNU General Public License v3.0
661 stars 43 forks source link

broken compatibility with Ag.el #30

Closed jasonm23 closed 8 years ago

jasonm23 commented 8 years ago

Ag has recently updated the default format of the search result output, and groups file lines under a single heading.

This breaks compatibility with Wgrep, so wgrep-ag will need patching.

Added a note to the relevant commit on Ag.el https://github.com/Wilfred/ag.el/commit/192422bdee8887d26f9926c72a8109f5806182d6#diff-60680ffddce95e7b6ade86dd5ca068eaR53

@wilfred @albertodonato I hope you guys can help too.

jasonm23 commented 8 years ago

@mhayashi1120 - is it possible simple, given the current implementation of wgrep to match a group of lines as per the updated wilfred/ag.el - see below.

Original ungrouped result form

original result form

New, grouped, result format

screen shot 2016-08-03 at 6 05 08 pm

gambo commented 8 years ago

Came across this and found a quick work around. Place the following in ~/.emacs or similar.

(setq ag-arguments '("--smart-case" "--noheading" "--nobreak" "-F"))

We set the ag arguments to make sure the output is as close to grep as possible.

I havent had time to dig in and write a patch, this just gets me by in the meantime.

DamienCassou commented 8 years ago

I confirm the problem.

NicolasPetton commented 8 years ago

I confirm the issue too.

mhayashi1120 commented 8 years ago

Very sorry for the late response everyone. Please try this version. And thanks for your interest to this program.