elpy icon indicating copy to clipboard operation
elpy copied to clipboard

elpy fails to determine the project root when working with files via TRAMP.

Open feoh opened this issue 9 years ago • 7 comments

I get "No definition found".

I suspect this has to do with the function elpy uses to determine the project root, but I'm not sure.

feoh avatar Jul 28 '16 20:07 feoh

Hello, and thanks for the report! I'm afraid Elpy does not support Tramp at all.

jorgenschaefer avatar Jul 29 '16 06:07 jorgenschaefer

How hard, in your estimation, would be to support tramp? I can already open remote python, which works flawlessly.

aadis avatar Dec 31 '16 09:12 aadis

How hard, in your estimation, would be to support tramp?

No idea. Tramp regularly fails for me, in any use case. I dislike it, and avoid it like the plague.

jorgenschaefer avatar Dec 31 '16 09:12 jorgenschaefer

No worries, and thanks for the excellent work on elpy.

aadis avatar Dec 31 '16 09:12 aadis

If you want to work on it, feel free. The biggest problem will be path translation between Emacs Lisp and Python, which probably should be handled on the Emacs side. And I expect a whole lot of corner cases and performance problems (Emacs needs to send the contents of the whole buffer to the Python process regularly; Elpy optimizes this for a certain buffer size by writing the buffer to the file system, which will be slower over tramp. Such things.)

jorgenschaefer avatar Dec 31 '16 09:12 jorgenschaefer

I usually do development on a VM on my macbook, so the network is pretty fast: it feels pretty native. I think with containers and remote boxes it's becoming more and more popular.

elpy already does 90% of what I want remotely, except for goto-definition.

My feeling is the python processes should be handled on the remote end exclusively (i.e., running rope and jedi on the remote side). start-file-process and bunch of functions already support tramp translation based on default-directory, so that code could be adapted.

I'll try to hack it this & next weekend to see if it works.

aadis avatar Dec 31 '16 10:12 aadis

BTW tramp using ssh method has been pretty rock solid for me. All it needs is OpenSSH controlmaster to be set (so doesn't open new connections every time). Then it's pretty blazing fast, and usable for files up to 10MB in size.

aadis avatar Dec 31 '16 10:12 aadis