Hacker News new | ask | show | jobs
by NoThisIsMe 872 days ago
You can get all of that with just Emacs tho
1 comments

I guess but tmux is installed on every system I connect to, and emacs is not.

Some systems only have ancient versions of emacs available in repos, limiting packages I could install.

You don't need emacs on the other end to get those features, connect over SSH with TRAMP.
I really want to use TRAMP. Basic editing works but I had a lot of trouble getting lsp based programming modes, like rustic, working.

Maybe I should try again. Terminal mode works but requires a lot of workarounds and copy/paste integration isn't perfect.

I also really really want to use TRAMP by default but there are some issues that keep it from being painless.

The problem with getting lsp modes working in things like docker containers is:

- docker containers set PATH - tramp doesn't use PATH by default - even using `(add-to-list 'tramp-remote-path 'tramp-own-remote-path)` doesn't work

tramp-own-remote-path doesn't work because:

         *Note* that this works only if your remote ‘/bin/sh’ shell supports
     the login argument ‘-l’.
For whatever reason this doesn't work in many docker containers or perhaps is a NixOS issue... not totally sure.

I need to revisit this at some point, because otherwise you have to update your tramp connections every time the PATH in the docker file changes, which for many make it a non-starter.

I'm sympathetic to the security first approach of why tramp doesn't just use PATH or the behavior of `tramp-own-remote-path` by default, but it makes working with the insecure by default rest of the IT ecosystem more difficult.

Related threads:

https://www.mail-archive.com/tramp-devel@gnu.org/msg05953.ht... https://github.com/NixOS/nixpkgs/issues/220187

But emacs running remotely in tmux will far outline the emacs on my laptop.
Outlive right? Session handling is one thing I recall being the best feature of tmux/emacs.

The solutions are better these days for session handling in emacs with save-place-mode and one of:

persp-mode bufler (using bookmarks)

However one of the biggest advantages for me is also having things like eshell or vterm get restored. That's arguably a less emacs friendly way of doing things than say using a compile buffer or async-shell-command with proper history, but... can't change over everything all at once :)