Open sagittarian opened 8 years ago
The ag-group-matches
custom is what causes this behavior. Toggling if off restored next-error
/ previous-error
functionality for me.
I have same issue, I think it is not related to ag-group-matches
. It should improve it.
I had the same issue, and setting ag-group-matches
to nil
as @michaelbartnett suggested worked fine for me.
I actually ended up removing the "File: "
from the corresponding line in my local copy
https://github.com/Wilfred/ag.el/blob/d00aa65ec2da6944f1ed81da440ad7a9024cfbf0/ag.el#L647-L650
But then I realized it's conditional to ag-group-matches
so yes indeed setting it to nil
works.
But this leads me to question this behaviour of the tool. Why is grouping same-file results under one file name more important to jumping to the result's location? @Wilfred ?
It would be nice if the compilation buffer could succesfully jump to the file even if "File: " is prepended to the start of the line. There probably is a way to achieve this but my emacs-lisp foo is not good enough.
Each match starts with "File: ", and compile-goto-error interprets that as part of the file name, so it can't find the file. I found where it does that in ag-filter, removed it and recompiled ag.el, and now it the result buffer works for me.
On my machine, the output of
ag --version
is: ag version 0.31.0My Emacs version is: GNU Emacs 24.5.1
I'm using: Ubuntu 16.04