Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent update to output format seems to have broken wgrep #119

Open
cpitclaudel opened this issue Jul 10, 2016 · 8 comments
Open

Recent update to output format seems to have broken wgrep #119

cpitclaudel opened this issue Jul 10, 2016 · 8 comments

Comments

@cpitclaudel
Copy link

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-installof ag and wgrep
  • ag with some search text
  • wgrep-change-to-wgrep-mode in results buffer
  • Edit one results line
  • C-x C-s yields (No changes to be performed)

Expected: C-x C-s saves the changes to the corresponding files (which works find with rgrep and used to work fine with ag).

Thanks for the awesome package, btw!

$ ag --version
ag version 0.32.0
In GNU Emacs 25.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2016-06-26 built on clem-w50-mint
Repository revision: 431437b6593320dc5a7a8aac9c911c778a656117
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description: Linux Mint 17.3 Rosa
@cpitclaudel cpitclaudel changed the title Recent update to ouput format seems to have broken wgrep Recent update to output format seems to have broken wgrep Jul 10, 2016
@koshigoe
Copy link

I set ag-group-matches to nil.

M-x customize-variable RET ag-group-matches RET

@cpitclaudel
Copy link
Author

That's a neat workaround, thanks! But still, it's be nice to be able to use the grouping.

@jasonm23
Copy link

jasonm23 commented Aug 4, 2016

@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.

@wbolster
Copy link

wbolster commented Aug 8, 2016

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.

@jasonm23
Copy link

jasonm23 commented Aug 8, 2016

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.

@cpitclaudel
Copy link
Author

@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.

@kaushalmodi
Copy link

kaushalmodi commented Oct 10, 2016

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.

@kaushalmodi
Copy link

kaushalmodi commented May 27, 2017

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: #122, and #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants