]> git.eshelyaron.com Git - emacs.git/commit
Add tramp support
authorBrian Cully <bjc@kublai.com>
Tue, 2 Mar 2021 21:13:07 +0000 (16:13 -0500)
committerJoão Távora <joaotavora@gmail.com>
Sat, 6 Mar 2021 16:26:27 +0000 (16:26 +0000)
commit2076d345655206254f6749cf710c150dfec313dd
tree57efa24ad4eea75868f021527f8f2e453e253d63
parenta6229c50e8e00b895eed733f2626e6209043f504
Add tramp support

Also close https://github.com/joaotavora/eglot/issues/463, close https://github.com/joaotavora/eglot/issues/84.

Thanks to Brian Cully for the original simple idea.  The basic
technique is to pass :file-handler t to make-process, then tweak
eglot--uri-to-path and eglot--path-to-uri, along with some other
functions, to be aware of "trampy" paths".

Crucially, a "stty hack" was needed.  It has been encapsulated in a
new a new eglot--cmd helper, which contains a comment explaining the
hack.

Co-authored-by: João Távora <joaotavora@gmail.com>
* eglot.el (eglot--executable-find): Shim two-arg executable-find
function only available on Emacs 27.
(eglot--guess-contact): Use eglot--executable-find.
(eglot--cmd): New helper.
(eglot--connect): Use eglot--cmd.  Use :file-handler arg to
make-process.
(eglot--connect, eglot--path-to-uri): Be aware of trampy file
names.

* eglot-tests.el (eglot-tests--auto-detect-running-server-1): New helper.
(eglot--guessing-contact): Better mock for executable-find.
(eglot--tramp-test): New test.

* NEWS.md: mention TRAMP support.

* README.md: mention TRAMP support.

GitHub-reference: close https://github.com/joaotavora/eglot/issues/637
lisp/progmodes/eglot.el