redguardtoo / counsel-etags

Fast, energy-saving, and powerful code navigation solution
174 stars 15 forks source link

Issue with creating a TAGS file when in Tramp mode #67

Closed cwinsnes closed 4 years ago

cwinsnes commented 4 years ago

I've found that counsel-etags seems to have an issue with creating a TAGS file when in Tramp mode, even though exuberant/universal ctags is installed on the remote machine.

After experimenting for a bit, I've found that it fails for me because the ctags arguments that are being run on the local machine does not get local paths to the .gitignore and such in the exclude list.

The error message I get is (with many irrelevant excludes removed):

Failed to create tags file. Error=exited abnormally with code 1
 CLI=ctags -e <many other excludes here>  --exclude="@/ssh:<user>@<remote>:/home/<user>/testing/.gitignore"  -R 

while changing it to

CLI=ctags -e <many other excludes here>  --exclude="@/home/<user>/testing/.gitignore"  -R 

makes it work fine.

I have created a fork with a few modifications which seems to solve the issue for me, but I figured this might affect others as well: https://github.com/cwinsnes/counsel-etags/commit/0f05605f0a03548d70881ba9292ba58dcf90ebe2

redguardtoo commented 4 years ago

Thanks. Could you do more test and send me pull request?

Could you also fix a few minor coding style issues:

cwinsnes commented 4 years ago

Fixed with https://github.com/redguardtoo/counsel-etags/pull/68