help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to switch off autobackup for files loaded from tramp?


From: Steinar Bang
Subject: Re: How to switch off autobackup for files loaded from tramp?
Date: Tue, 30 Jan 2024 12:40:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

>>>>> Manuel Giraud via Users list for the GNU Emacs text editor 
>>>>> <help-gnu-emacs@gnu.org>:

> Good.  You are closer to your solution now ;-)

I have this now in my emacs:

    ;; Avoid doing autosaves when modifying remote files
    (setq auto-save-visited-predicate (lambda () (not (file-remote-p 
buffer-file-name))))

And this setting works the way I expected, i.e. if i do
    M-x : (funcall auto-save-visited-predicate)
in a file loaded from remote I get nil.

Unfortunately emacs still autosaves the file in the buffer...:-/

But... rummaging through emacs' files.el that 'C-h v' sent me to, I
found this:

(defcustom remote-file-name-inhibit-auto-save-visited nil
  "When nil, `auto-save-visited-mode' will auto-save remote files.
Any other value means that it will not."
  :group 'auto-save
  :type 'boolean
  :version "29.1")

I'll try using this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]