Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

counsel-rg, counsel-ag don't work with tramp #2160

Closed
li1 opened this issue Jul 23, 2019 · 1 comment
Closed

counsel-rg, counsel-ag don't work with tramp #2160

li1 opened this issue Jul 23, 2019 · 1 comment

Comments

@li1
Copy link

@li1 li1 commented Jul 23, 2019

Issue

I am trying to run counsel-rg / counsel-ag on a remote server using TRAMP.

This doesn't work, as the remote binary apparently isn't being used for searching.

Steps to reproduce:

  • Install rg / ag on remote server (at /usr/bin/rg / /usr/bin/ag)
  • clean emacs init with ivy & counsel installed from melpa: (use-package counsel :ensure t :config (ivy-mode 1)) (ivy 0.12)
  • C-x C-f to tramp into some remote file ssh://...
  • M-x counsel-rg or M-x counsel-ag
  • error message: "no such file or directory, rg" / "required program ag not found in your path"

Notes

  • Commenting out the (counsel-require-program counsel-ag-command) suppresses the error message, but rg / ag remain dysfunctional
  • installing ripgrep on the local machine also passes the file not found error, but obviously leads to other issues as the local binary is being used to search through remote buffers.

Update: I noticed that on long-running tramp sessions, rg and ag start to work. Perhaps the caching just takes a while. Also, at that point I receive an error code if I remove the remote binaries. So it appears that

  1. The check for installed ag/rg is always looking at the local binary even if they should be executed remotely (not a big deal imo)
  2. Initial caching takes a (pretty long) while — not sure what the reason for that might be
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jul 23, 2019

Thanks, please test.

astoff added a commit to astoff/swiper that referenced this issue Jan 1, 2021
If the key-by-key input from user is fast, sometimes the output from
TRAMP comes in and moves the point, which made `ivy-text' longer than
one line. This change should fix it.

Fixes abo-abo#2160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants