-
Notifications
You must be signed in to change notification settings - Fork 27
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
how to customize readtags path for a remote machine? #120
Comments
Actually I don't have a remote machine so I can't answer this question. I test TRAMP using local files. To the best of my knowledge, TRAMP uses remote programs when visiting remote files. |
You are right. So I want to know how to config different path? |
What about this: (defun set-remote-ctags-env ()
"Set readtags path according to host name."
(when-let* ((remote-host (file-remote-p (buffer-file-name) 'host)))
(setq-local citre-readtags-program
(pcase remote-host
;; Put your pair of hostname and readtags path here
("remote-host-1" "readtags-program-path-1")
("remote-host-2" "readtags-program-path-2")))))
(add-hook 'find-file-hook #'set-remote-ctags-env) |
Lines 58 to 65 in 1c0ca63
|
Hi: Related to this, the oficial emacs solution for these problems is to use connection-local-variables. https://www.gnu.org/software/emacs/manual/html_node/elisp/Connection-Local-Variables.html I made the gtags-mode implementation for emacs with full tramp support and I use them to enable full remote executable detection and some memoization (to avoid the impact of calling executable-find more than needed) but at the same time it checks when gtags is not available remotely to avoid nasty errors https://github.com/Ergus/gtags-mode Just my 5 cents |
They should be "string" because they can also be the name (not the path) of the executable, if it's in the PATH. See #120 (comment).
@Ergus Thanks very much, and sorry for the late response. I think I understand the overall approach, but I have trouble understanding your implementation. To me it seems like all the things we should do is wrapping the codes that start a process in Also, as I don't have a remote machine, I cannot test the code or write a user document explaining how to customize executable paths on remote machines. What we need is a TRAMP user to help use write the code and documentation. |
the question is when I use tramp for remote dev, it use the remote readtags or the local readtags? and how can I config the readtags located in remote machine for citre to use?
thanks!
The text was updated successfully, but these errors were encountered: