Open saccohuo opened 8 years ago
--line-number
.--vimgrep
but only solve my problem partly.I added a pull request that handles ag-highlight-search
on Windows https://github.com/Wilfred/ag.el/pull/116
You can also use it as I do in https://github.com/evgeniysharapov/DotEmacs/commit/c8dfe4fb1d7fdd4299a8d6deec726b9f119ff544
I am using emacs on Windows currently, I have the same problem about the actual search result not being coloured with
(setq ag-highlight-search t)
However, search result being coloured works fine in helm's grep, but it doesn't utilize the ag package.
(setq helm-grep-default-command "ag --vimgrep -z %p %f"
helm-grep-default-recurse-command "ag --vimgrep -z %p %f")
My ag version is 0.29.1, Windows 7 x64 OS, Emacs 24.5.1(i686-pc-mingw32).
If I set
ag-highlight-search
tot
, there will be some problems(if it is set tonil
, there is no problem). It prompt that "No error here no filename" when I press RET to see the result file. I have searched in issues of this repo, find some similar issues, but with some different point.There is no filename display in the ag result buffer, as shown below.
If I just add
--vimgrep
toag-arguments
, though I setag-highlight-search
tot
, there will be no problem but maybe without highlight(I did not know what is the state of ag's highlight, but it shows the same as I setag-highlight-search
tonil
). When I useM-:
to set(setq ag-arguments (append '("--vimgrep") ag-arguments))
, the result is shown as below.So how can I highlight the results without the "No error here no filename" problem?