Wilfred / ag.el

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

Might be good for ag to fail with a nicer error when a search of a Tramp filesystem is attempted #115

Closed feoh closed 8 months ago

feoh commented 8 years ago

On my machine, the output of ag --version is: ag version 0.32.0 Features: +jit +lzma +zlib

My Emacs version is: GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.4.0, NS appkit-1404.46 Version 10.11.4 (Build 15E65)) of 2016-04-28

I'm using: OSX El Capitan

The error I get is this:

-*- mode: ag; default-directory: "/scp:cpatti.aka.corp.amazon.com:/home/cpatti/workspace/MagnolioLasso/src/MagnolioLasso/lib/lasso/" -*-
Ag started at Tue Jun  7 12:59:36

ag --nocolor --literal --line-number --smart-case --nogroup --column --stats -- logger .
/bin/sh: line 2: ag: command not found

Ag exited abnormally with code 127 at Tue Jun  7 12:59:37

It would be awesome if ag.el could detect this and say something like "Can't search a remote filesystem!".

Fuco1 commented 8 years ago

Rather, coded properly it should just open the search remotely. Grep can do that so I suppose it's just some bad quoting in this package.

Emacs is rather transparent when it comes to TRAMP (the T there gives a hint) :) It would certainly be nice, in fact, that's the reason I fallback to grep on remote searches.

Fuco1 commented 8 years ago

Actually, it works for me just fine. Your problem is that you don't have ag installed on the other end. Quite naturally it has to run there and not on your machine.

My problem was actually related to dired and that also seems to be fixed.