I have some of the console commands I would like to use from Emacs, namely ag
. It works great in CMD
or Far Manager. However when I use it from Emacs shell
or eshell
I run into a problem which may be (slight chance, though) ag
-specific.
When I run shell
and then run ag
it returns result (help screen) immediately. If I run it searching for a line in files inside directory as ag needle
, it hangs and doesn't return anything.
If I run it as ag needle .
it returns result immediately, however missing file names and lines numbers, --color
and -nogroup
options do not affect the printed result in this case.
When I run it via shell-command
it returns the correct result (with file names and line numbers). eshell
has the same problem.
What do I need to do to make these commands work in shell
and/or eshell
?
It's been noted in the answers to this question that Win32 has issues with subprocess buffering. Is there a way to fix it?