Search code examples
emacstramp

how to disable autosave for tramp buffers in emacs?


autosave for tramp buffers is very annoying, every time it cost dozens of seconds.

I can disable it by using Alt-X auto-save-mode, Is there any way I can do to automatic disable it? maybe by using some kind of hook?


Solution

  • You can set tramp-auto-save-directory to a local directory.

    (setq tramp-auto-save-directory "~/emacs/tramp-autosave")
    

    Update: In your case, you may set tramp-auto-save-directory to /tmp.