0

i started using the eldritch and mysterious tramp again because a user on here helped me fix it. (thanks michael: tramp runs on odt export --).

i create org mode links to my commonly-used remote conf files. when i click on them my tramp session starts up successfully.

it's possibly a no-brainer, but my question is how can i drop to a shell after i'm done finishing editing my conf file? to like restart a service or similar.

i know i can run shell or eshell and run ssh, but that starts a new connection which is really no different to reaching for the terminal emulator. surely i can magically just shell within my existing tramp connection?

2 Answers 2

2

M-x shell runs always a new shell asynchronously, which means a new connection. If you just need to run a command on the remote host, consider shell-command. Something like (shell-command "hostname") is an example for this.

2

Invoking M-x shell from a buffer with a remote file name should start a shell on the remote host.

The same thing applies to most commands which start a process.

how can i drop to a shell after i'm done finishing editing my conf file?

It sounds like you simply need to use M-x shell in that conf file's buffer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.