wincent/ferret

Search gives a list of seemingly correct search results in an error message

amagee opened this issue · 4 comments

If I run :Ack main_view, I get a response that looks like this:

app.py:42:42     from {{ project_name }}.views import main_view
[a bunch more lines with valid search results]
Search for `main_view` failed: press ENTER to continue

I never get a quickfix opened or anything interactable. Not really sure where to start in debugging this.

I have ag version 0.31.0 on an Ubuntu 16.04 machine.

Strange. What version of Vim are you running? And what other plug-ins do you have installed?

Ok I managed to narrow down the problem to the following line in my .vimrc:

autocmd BufRead *.py set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m

I don't actually need this line so everything is fine if I remove it. I don't know so much about how the efm setting works but maybe it would be better if ferret would make a copy of the setting, set its own desired value, then set it back when finished? (I'm just guessing the problem is that ferret is making assumptions about the setting's value that weren't true in my case.)

Ah, thanks for digging in to that. I don't think I would have discovered that myself.

Probably a good idea about temporarily overriding 'efm' (or at the very least validating it for compatibility). I'll see if I can repro the issue by setting 'efm' like you have it, and figure out how to make Ferret do the right thing.

Thanks for the report @amagee. Should be fixed on the next branch.