Wilfred / ag.el

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

command not found: ag #93

Closed lethjakman closed 8 years ago

lethjakman commented 9 years ago

Hey, I've installed your plugin however every time I try to run it I get the error "zsh:1: command not found: ag" however ag is properly configured and works everywhere else on the machine.

Wilfred commented 9 years ago

Does the Emacs variable exec-shell match your $PATH? If not, you might find https://github.com/purcell/exec-path-from-shell helps.

lethjakman commented 9 years ago

I don't have an exec-shell, however I have an exec-path that matches my shell's $PATH. The odd thing is that I can run ag from C-!.

Wilfred commented 9 years ago

Weird. Can you run ag from eshell? What value does exec-path have? Where is ag installed?

Also, could you please provide a full traceback? M-x toggle-debug-on-error.

Wilfred commented 8 years ago

This isn't enough information for me to debug I'm afraid. Happy to reopen if you can answer my questions.

speedenator commented 6 years ago

I know this is closed, but for lethjakman --- I just fixed this problem. Turns out (on mac) when emacs is launched from the bar, it doesn't include /usr/local/bin. To fix:

(setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin"))

Note, you need that in addition to exec-path.