rougier / nano-emacs

GNU Emacs / N Λ N O - Emacs made simple
GNU General Public License v3.0
2.52k stars 195 forks source link

Add support for vterm default-directory tracking #32

Closed dangom closed 3 years ago

dangom commented 3 years ago

This PR adds support for vterm. If remote is configured to pass default-directory info to vterm, then nano-emacs is capable of picking that up:

Screen Shot 2020-12-17 at 12 34 43

I'm opening the PR, but perhaps it shouldn't be accepted just yet, as I haven't tested it with multi-hopping. It seems that that causes issues with tramp for some reason.

rougier commented 3 years ago

Nice ! Thank you. I'm waiting for your go to merge then.

dangom commented 3 years ago

Yes, for some obscure reason I cannot yet explain this seems to make Emacs hang and cause Tramp to fail if the remote directory is a multi-hop and not a direct ssh connection. I think it may be worked around by having users configure tramp-default-proxies-alist, but this should not be merged as is. Perhaps made optional and default OFF, so users could have it at their own risk?

Up to you whether you think this contribution makes sense. If not feel free to close the PR as well.

rougier commented 3 years ago

The header-line is updated quite regularly such that if you issue a ssh connection each time to get the remote host, this might make emacs to hang. Can't you use an init hook on vterm to get the host only once?

rougier commented 3 years ago

Any update on this ?

dangom commented 3 years ago

None. I had to stop using it because it was hanging on double hops and I couldn't figure out how to make that stop (didn't invest that much time though). I'll close the PR and reopen if I ever find a fix