(no title)
entrox | 3 months ago
But that's what tramp is for, it works nicely and is surprisingly well integrated into the rest of Emacs. The only obvious downside is initial performance, but that can be worked around by tweaking SSH settings to keep connections open.
Another hack I use is to initiate a connection from remote to my local Emacs instance. The use case is ssh'ing into a remote shell, typing "remote-emacs <file-xyz>" and having that open the file on my local machine.
I did that by creating a script that gets my local IP from $SSH_CONNECTION, uses that to ssh into my local machine and executes "emacsclient -n /ssh:$HOSTNAME:$FILEPATH" which then in turn opens the remote file using tramp. Pretty useful.
sroerick|3 months ago
I am definitely going to build out that bash script for the second use case, that sounds excellent. Thanks, I had no idea you could do that
entrox|3 months ago
For example, you open a remote dired buffer with C-x C-f /ssh:host:/dir/. Afterwards, opening a file or navigating to a directory will open it remotely as well. You can also use project functions or magit seamlessly. I have plenty of bookmarks remotely etc.
Fundamentally, you just prepend "/ssh:[user@]host:" to any path or file operation and things will magically Just Work (tm).