Re: Automating remote emacsclient setup
Joel Reicher <[email protected]> Wed, 13 May 2026 19:09:51 +1000
| Newsgroups | gmane.emacs.tramp |
|---|---|
| Message-ID | <[email protected]> |
Michael Albinus <[email protected]> writes: >> I think there is one aspect that is the "responsibility" of >> Tramp, and that is to set the EMACSCLIENT_TRAMP environment >> variable on initialisation of a remote shell. It needs to be >> set to the same remote identifier used to open the shell, >> particularly for an ad-hoc multi-hop sudo. (I can explain why I >> believe this to be the case, if needed.) >> >> What's the easiest way of making that code change? I'm fairly >> sure I'm right about it. > > Something like the appended poatch? I can confirm that worked perfectly! I did a /ssh:host|sudo:: shell, it correctly passed through just the sudo part, and with the command channel established invoking emacsclient in that sudo root shell caused emacs to open the file as root, no problems. Do you need anything (more) from me to commit this to the repo? Thanks and regards, - Joel