xref--process-file-region takes shell-file-name, that should depend on the remote system. I could use something like (with-parsed-tramp-file-name default-directory d (tramp-get-method-parameter d 'tramp-remote-shell)) but it seems that `with-parsed-tramp-file-name' is not used outside of tramp, and byte-compiling triggers a warning. Is there some better way to do this? > To get you started, here's one example of this feature's usage: > https://github.com/company-mode/company-mode/blob/c25f1fbc3850e36e6521b77fa1641d5583365d8b/company-gtags.el#L71-L96 > > And you can search in Emacs's own repository, of course, for other examples. -- Philip Kaludercic