Most active commenters

    ←back to thread

    Making TRAMP faster

    (coredumped.dev)
    226 points celeritascelery | 13 comments | | HN request time: 1.299s | source | bottom
    1. josteink ◴[] No.44356722[source]
    For those not into the lingo, Tramp is the Emacs module/package responsible for allowing you to transparently work on remote files and host in your local editor in a way I haven’t seen any other software do.

    And yes, it’s really neat.

    replies(3): >>44356916 #>>44356998 #>>44357028 #
    2. sylens ◴[] No.44356916[source]
    Thank you. I don’t know why more posts like this don’t spend a line or two providing that context
    replies(2): >>44357495 #>>44357567 #
    3. geocar ◴[] No.44356998[source]
    > in a way I haven’t seen any other software do.

    It was novel once upon a time, but almost every internetworked operating system supports network-transparent files. Even my iPhone can do it.

    Linux is a bit weird though: VIM has netrw which is very similar to Emacs; Gnome has a special VFS API that understands URIs, but only in the loosest possible sense of the word, and it can't work with autofs to "un-URI" something into a regular unix path, which is just sad.

    But if you don't care about that, autofs can make it possible to cd /net/{hostname} and get my home directory over ssh on another machine, and works much better than tramp IMO, even under Emacs.

    replies(2): >>44357181 #>>44357309 #
    4. shadowgovt ◴[] No.44357028[source]
    It is a very special piece of work. The closest I've seen is vscode remote editing (and credit where it's due: vscode remote editing is out of the box far more reliable and stable than Tramp... it better be, since it's running its own daemon on the remote machine), but Tramp is far more general-purpose than vscode's solution.

    Editing as another user, editing a remote file, even editing over embedded protocols like adb: Tramp's got you covered.

    5. gray_-_wolf ◴[] No.44357181[source]
    The thing is TRAMP also gives you a shell, not just a file access. When I am in a remote buffer, I can do M-x shell, and I will get a command line running on the remote host. What is more, since the T stands for Transparent, when I want to insert e.g. output of some command into a buffer, the command is executed on the remote host and I do not have to do anything special to achieve that, it just happens auto-magically based on the directory of current file (local vs. remote). I find that useful, and you cannot really do these things with a network drive on Windows.
    6. skydhash ◴[] No.44357309[source]
    It's not only about transparent access. It's about how the whole emacs ecosystem working with the files. So you can bookmark a remote file, and once accessed, you can launch dired (the file manager) for the file's directory, run the shell on the remote,... with the same binding and mechanism you have for local files. No need to alter configuration or launch a special windows for the project.
    replies(2): >>44357649 #>>44357773 #
    7. jerf ◴[] No.44357495[source]
    Because the author had no particular expectation this would be a #1 hit on HN.
    8. scbrg ◴[] No.44357567[source]
    So, here's the first three sentences in the linked article:

    I recently changed jobs and found myself in a position where I would need to do a lot of work on remote machines. Since I am Emacs user, the most common way to do this is using TRAMP (Transparent Remote access, Multiple Protcol). TRAMP is an Emacs package that let’s you treat a remote host like a local system, similar to VSCode Remote Development Extension.

    Doesn't that provide context?

    replies(1): >>44357838 #
    9. marai2 ◴[] No.44357649{3}[source]
    I’ve been using emacs for many years and I had no idea you can bookmark files let alone bookmark remote files! Thanks for educating me today!
    replies(1): >>44359034 #
    10. klik99 ◴[] No.44357773{3}[source]
    Exactly this, it's hard to explain to a non-emacs user why TRAMP is so magical, but the number of times I tried to run something that was meant to run locally on my machine through TRAMP and it just worked is very impressive. It runs so smoothly that you forget you're executing things on a remote machine, and when that leaks through it's typically very easy to diagnose and fix - for instance I have ag (silver searcher) installed on my local machine, tried running a search with ag via tramp and the bin obviously wasn't on the remote machine, a simple apt-get later and I could run my search with all my custom settings remotely.

    If anyones ever used the Plan 9 OS across network, TRAMP is like that for emacs

    11. celeritascelery ◴[] No.44357838{3}[source]
    To be fair, I added that after reading the parent comment. I did a poor job of describing what TRAMP was because I targeting this towards Emacs users.
    replies(1): >>44357855 #
    12. scbrg ◴[] No.44357855{4}[source]
    Ah! That explains my confusion. Thanks for clarifying, and my apologies to sylens.

    Great post, by the way!

    13. skydhash ◴[] No.44359034{4}[source]
    It's a neat feature. I typically bookmark directories on remote hosts, project roots, config files, etc,.. BTW, you can use `list-bookmarks` then annotate each bookmark with `e`, and display all the annotations with `A`.