I’m interested to know what the future of remove development with emacs might look like. I’m a long time emacs user, and use rust, lsp-mode, magit and projectile heavily. The remote experience with tramp just isn’t very good. I’ve had to work around several bugs that lead to hangs, and even though I’m only ~20millis away from my remote machine performance is pretty bad. I believe I’ve already done everything I can to make it fast (ssh control master, etc.), and I’m still not happy. On the other hand, VSCode (which I’m not familiar with) or IntelliJ make remote development a breeze. I really like how they hide latency, and handle reconnects well. I’ve also tried terminal emacs on the remote machine, but I just can’t deal with the input lag.

It’s remarkable how emacs has been able to adapt over the years, and so I’m interested to hear about some ideas to keep emacs relevant for this usecase.

  • cat-head@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I also use terminal emacs in some cases, but there are a few key bindings which make the graphical version a bit better in some cases. But I mostly only do R/cpp remotely. I don’t know how it is for other languages.

  • nimzobogo@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Sure it can. Why couldn’t it? At worse, you could write a multi-threaded C library and have emacs/emacsclient call into it.

  • nimzobogo@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I almost exclusively use emacs --daemon and then emacsclient to connect to it.

    In my opinion, this model needs to be extended so that emacs daemons can’t accept connections over a network. Maybe piggybacking SSH, or some other socket protocol. Of course, never could administrators would have to enable that port, so there are complications in professional environments.

  • nimzobogo@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    That’s why I said that model needs to be extended. There’s no reason emacs server couldn’t send stuff over a TCPsocket to emacs client. Emacsclient and emacs server are separate OS processes, so they already communicate via external mechanisms.

  • troll-gpt@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Wrong. Vscode server is a binary blob, it only requires glibc. It doesn’t need anything else, like shells. It even brings its own git.

  • marcbowes@alien.topOPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    What do you mean by “stabilise things more”? I’m not sure that my experience is bad because of errors, so I’m probably misunderstanding what you’re saying.

    I think the core issue is that software like magit simply wasn’t designed for high latency. If my remote machine was ~0ms away, I think things would work very well with tramp. It seems to me like this is the core problem, and anything that doesn’t address it won’t fix it. VSCode fixes the issue by letting software like magit simply run on the remote machine. It seems like the choice is between that, or rewriting everything to deal with high latency.

  • jason-reddit-public@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    My previous employer did not allow non public source code on a laptop. My solution was to run emacs inside of a screen session (with screen’s C-a mapped to C-t a trick I learned from a colleague since C-t twiddle character isn’t very useful in emacs). This worked well even using terrible cellular wifi and was much better than remote desktop since the amount of data sent per keystroke will typically be quite small.

    Without screen this almost works but emacs could hang sometimes when the connection got dropped which screen solves.

  • cat-head@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    On the server. You just ssh -X, and call emacs. You can also use emacsclient on the server and then (also on the server) connect to it with the graphical client. This helps when you want to prevent connection los to break your process running. Or emacs -nw also works. There are no special commands used.

  • giant3@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Why not just run emacs -nw on ssh? If latency is bad, use xterm(one of the lowest latency)

  • m0emura@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I may have a few tweaks I can check tomorrow at my work machine, but mine was never that bad. I find the diff is slow and can freeze up for a minute or two if you run a huge multi thousand file diff, but I don’t imagine its that. Have you tried disabling magit-revert mode, or eglot mode? LSP or auto-revert checking the file state are usually culprits of lag for me.

  • nimzobogo@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I’ve submitted a request to have you banned. Look at your history. You contribute nothing and just spew annoying nonsense. Adios.

  • 7890yuiop@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Or did you install Emacs on the server you SSH’d into?

    That one, I believe. Eliminating Tramp from the equation is an easy and effective way to avoid Tramp-based overheads!

    Unless your network connection is very slow or otherwise issue-prone, in which case ssh may not be responsive – at which point Tramp offers significant advantages by only occasionally requiring network activity.