Hacker News new | past | comments | ask | show | jobs | submit login

Wait, you can use scp as a protocol?!

Emacs' Tramp supports multiple protocols https://www.gnu.org/software/emacs/manual/html_node/tramp/Qu...

For example, to run a remote command using an inline org-mode source block:

    src_sh[:dir /ssh:host:]{some command}
Or to run code using a remote Jupyter kernel within Org-mode in Emacs:

  #+BEGIN_SRC jupyter-julia :session /ssh:ec2:/run/user/1000/jupyter/kernel-julia-0.6.json

Oh, that remote execution is a neat trick. Thanks!

To cover the more trivial point for the non-Emacs readers: Tramp in Emacs makes it so that there's almost no difference between opening a file (C-x C-f) like this:

and like this:

and like this, if you need superuser rights:

The subsystem in Emacs called Tramp makes this almost transparent; you edit your remote files as if they were local. There are occasional kinks with path translation in corner-case situations, like local Emacs editing remote source files and trying to load them into remote REPL, but those are rare and can be configured away. Dired (directory manager in Emacs) also works transparently over Tramp, so this essentially replaces SCP and graphical SFTP tools for me. You can even run GDB remotely over Tramp, which is a nice trick.

wow, that's incredible. learn something new everyday.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact