akermu / emacs-libvterm

Emacs libvterm integration
GNU General Public License v3.0
1.7k stars 136 forks source link

Directory tracking not working with mosh #454

Open greened opened 3 years ago

greened commented 3 years ago

I've been using emacs-libvterm successfully for a while with ssh. Recently I tried mosh and suddenly remote directory tracking doesn't work. find-file doesn't recognize that I'm on a remote host and doesn't present a TRAMP remote path. I have not changed my prompt.

I'm pretty sure this isn't a libvterm problem per se, but I'm not sure how to go about diagnosing the issue. Any suggestions?

Sbozzolo commented 3 years ago

Directory tracking has to be configured on the remote server as well. To do this, you have to print out your username, hostname, and folder with the escape code 51;A. This is the same for (ansi-)term, so if you find some examples for that, it should work here as well.

greened commented 3 years ago

I have done all that and it works great with ssh. Switching to mosh causes it to fail.

Sbozzolo commented 3 years ago

Sorry, my bad. I got confused about what mosh is. A quick search brings me to this PR: https://github.com/mobile-shell/mosh/issues/637 This would add support to OSC 51 (I think), which is what we need.

greened commented 3 years ago

Doesn't that issue talk aabout OSC 52, not 51?

I also filed an issue with mosh about this and will update it with your information. Thanks!

Sbozzolo commented 3 years ago

Yes, the issue is for OSC 52, but (very) quickly looking at the code in the first post my impression is that other OSC would be implemented as well.

On Tue, Nov 24, 2020 at 7:36 AM David Greene notifications@github.com wrote:

Doesn't that issue talk aabout OSC 52, not 51?

I also filed and issue https://github.com/mobile-shell/mosh/issues/1122 with mosh about this and will update it with your information. Thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/akermu/emacs-libvterm/issues/454#issuecomment-733013620, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACF6E7MSX5XU2EHW53F3YLDSRPAFNANCNFSM4T64VAIQ .

greened commented 3 years ago

I'm going to try to take a crack at implementing it in mosh.

greened commented 3 years ago

And...I got stuck right away. I took the existing patch in mobile-shell/mosh#637 but like the author, don't know how to actually send the OSC through to the terminal.