From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri D'Elia Newsgroups: gmane.emacs.bugs Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Date: Mon, 03 Apr 2023 11:19:19 +0200 Message-ID: <874jpx1fn4.fsf@wavexx.thregr.org> References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35680"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.0; emacs 30.0.50 Cc: 62614@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 03 11:26:25 2023 Return-path: Envelope-to: geb-bug-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 1pjGSH-00099j-2J for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Apr 2023 11:26:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjGS2-0005hW-Bp; Mon, 03 Apr 2023 05:26:10 -0400 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 1pjGRv-0005gl-3H for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2023 05:26:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjGRu-0006tk-Pf for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2023 05:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjGRu-0007gq-Fi for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2023 05:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuri D'Elia Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 09:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs Original-Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.168051394029533 (code B ref 62614); Mon, 03 Apr 2023 09:26:02 +0000 Original-Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 09:25:40 +0000 Original-Received: from localhost ([127.0.0.1]:43350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjGRY-0007gH-5y for submit@debbugs.gnu.org; Mon, 03 Apr 2023 05:25:40 -0400 Original-Received: from erc.thregr.org ([46.43.2.63]:59086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjGRW-0007g7-D4 for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 05:25:39 -0400 Original-Received: from [37.163.233.240] (helo=localhost) by erc.thregr.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1pjGRY-000qbv-09 (envelope-from ); Mon, 03 Apr 2023 11:25:40 +0200 In-reply-to: <87pm8lqs69.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259163 Archived-At: On Mon, Apr 03 2023, Michael Albinus wrote: > Tramp behaves like with local lock files. Imagine, you have a local file > ~/test with a lock file (a symbolic link) ~/.#test -> something. Set > create-lock-files to nil. Start editing the local file ~/test, and save > it. The local lock file ~/.#test is removed. > > And that's also what's documented, see (info "(elisp) File Locks") > > -- User Option: remote-file-name-inhibit-locks > You can prevent the creation of remote lock files by setting the > variable =E2=80=98remote-file-name-inhibit-locks=E2=80=99 to =E2=80= =98t=E2=80=99. > > > It speaks only about creation of remote lock files, and not about > removal. Mmmh, maybe it should be mentioned explicitly. For me, "inhibit-locks" meant inhibiting both creation and removal. But even for local files, why the unlock is done? For cleanup? > One possible workaround for you would be to eval the following form, > additionally to your settings: > > (fset #'tramp-handle-unlock-file #'ignore) Looking at the definition of #'tramp-handle-unlock-file, it does actually look the most reasonable thing to do, but somehow having to fset an internal function doesn't feel right, but I don't have a better proposal since we don't have any setting that inhibit lock handling completely. I went with this configuration for a long time, actually. I never noticed this behavior, because I never had remote lock files to begin with. Only recently with the warning buffer displayed on errors I started to see it.