Wilfred / ag.el

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

Grouped results sometimes omit the "File", and break next-error #120

Open tomjakubowski opened 8 years ago

tomjakubowski commented 8 years ago

Here's an example:

File: tests/MetabolizerTest.C
171:5:    switch (how)
186:5:    switch (how)
201:5:    switch (how)
220:5:    switch (how)
236:5:    switch (how)
252:5:    switch (how)
276:5:    switch (how)

File: UrDrome.C
703:3:{ switch (fdwCtrlType)

VideoSource.h
349:45:   * In any case, it's a mode -- on or off. Switching modes may
350:25:   * fail. For example, switching to live mode on a pool without an

Moving between locations in tests/MetabolizerTest.C and UrDrome.C using M-g p and M-g n (previous-error and next-error) works fine. But when I move to the location in UrDrome.C and then hit M-g n to jump to 349:45 in VideoSource.h, it instead jumps to that location in UrDrome.C.

If it helps, the equivalent lines of output from running ag (taken from the ag command at the top of the buffer) are:

tests/MetabolizerTest.C
171:5:    switch (how)
186:5:    switch (how)
201:5:    switch (how)
220:5:    switch (how)
236:5:    switch (how)
252:5:    switch (how)
276:5:    switch (how)

UrDrome.C
703:3:{ switch (fdwCtrlType)

VideoSource.h
349:45:   * In any case, it's a mode -- on or off. Switching modes may
350:25:   * fail. For example, switching to live mode on a pool without an

On my machine, the output of ag --version is: ag version 0.31.0

My Emacs version is: GNU Emacs 25.0.92.1

I'm using: Mac OS X 10.11.4

jasonm23 commented 8 years ago
M-x customize-variable RET ag-group-matches RET

Set the value to nil

The default is grouped. (it's a new change which borks a few things. I'm hoping it won't be the default for much longer!)