jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.9k stars 261 forks source link

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

Open feoh opened 8 years ago

feoh commented 8 years ago

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.

jorgenschaefer commented 8 years ago

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

aadis commented 7 years ago

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

jorgenschaefer commented 7 years ago

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.

aadis commented 7 years ago

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

jorgenschaefer commented 7 years ago

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.)

aadis commented 7 years ago

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 commented 7 years ago

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.