From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.help Subject: Re: How to switch off autobackup for files loaded from tramp? Date: Tue, 30 Jan 2024 12:40:37 +0100 Message-ID: References: <87o7d4dlb5.fsf@ledu-giraud.fr> <87r0hztbvf.fsf@ledu-giraud.fr> <87eddzcfso.fsf@dod.no> <87wmrrf7n8.fsf@ledu-giraud.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36254"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 30 12:41:49 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rUmUv-0009E1-MI for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 30 Jan 2024 12:41:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUmUJ-0005yN-Ia; Tue, 30 Jan 2024 06:41:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUmUB-0005xz-95 for help-gnu-emacs@gnu.org; Tue, 30 Jan 2024 06:41:03 -0500 Original-Received: from schwantz.bang.priv.no ([2a01:4f9:c011:82fd::1]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUmU4-000771-MI for help-gnu-emacs@gnu.org; Tue, 30 Jan 2024 06:40:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dod.no; s=sb; t=1706614833; bh=GZ3kxy849bQfznu/8y2eVz88N2sUiJ24EVECi95ld14=; h=From:To:Subject:In-Reply-To:References:Date:From; b=FsLet74m7H5/PgToq9H0o3kKwFUZU/G0Lp0U7JACEWr2hMfkBQgAC6yiG2qmrQF9u mZBIkbPoZKDstxHOknCpJ2EDxB+Q8gMjB3GYmQlUmVhpsytdQlfTZ+rYoo4jVbQXFi lPfCd9ow7hAfLtkI18uC5YRBxRmLMHh4j3cJ3sKI= Original-Received: from AAP-5CG32757DH (unknown [84.210.69.52]) by schwantz.bang.priv.no (Postfix) with ESMTPSA id 495EA429 for ; Tue, 30 Jan 2024 11:40:33 +0000 (UTC) In-Reply-To: <87wmrrf7n8.fsf@ledu-giraud.fr> (Manuel Giraud via Users list for the's message of "Tue, 30 Jan 2024 11:16:43 +0100") Received-SPF: none client-ip=2a01:4f9:c011:82fd::1; envelope-from=sb@dod.no; helo=schwantz.bang.priv.no X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145825 Archived-At: >>>>> Manuel Giraud via Users list for the GNU Emacs text editor : > 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.