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?

1

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.

| improve this answer | |
1

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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