From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus 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 10:35:42 +0200 Message-ID: <87pm8lqs69.fsf@gmx.de> References: <87pm8mv2ex.fsf@wavexx.thregr.org> 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="18923"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62614@debbugs.gnu.org To: Yuri D'Elia Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 03 10:36:16 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 1pjFfk-0004fe-FN for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Apr 2023 10:36:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjFfY-0003Rn-RJ; Mon, 03 Apr 2023 04:36:04 -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 1pjFfW-0003Ra-Uv for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2023 04:36:03 -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 1pjFfW-0002Ef-Kp for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2023 04:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjFfW-0006EE-5J for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2023 04:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 08:36: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.168051095623924 (code B ref 62614); Mon, 03 Apr 2023 08:36:02 +0000 Original-Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 08:35:56 +0000 Original-Received: from localhost ([127.0.0.1]:43326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjFfO-0006Dk-KX for submit@debbugs.gnu.org; Mon, 03 Apr 2023 04:35:56 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:45765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjFfK-0006DS-6b for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 04:35:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1680510943; i=michael.albinus@gmx.de; bh=v1f4UqZ0iEHw/SvgJIEjY81xtOSQo5nvEoO/AskjiQ8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=clKZNADWNB1ObaFSY9+hF5Ni+akER5fyIT4IQ4FTQdTDmf0bolyYovgx23thsvhJ9 v/yDhpKAT+UUr53nyz103Nfj1ceWXsBkEG7Pmpj99gH8OLWgQ2JwDhMOLThODFR/Z0 1m+Hkv0hIlMO/BFGhUStggHvxdeCkw9UAEdDAt5nKu11R2t2TlON0lViH0vkP+8UWo gNVXO6ImaNXR0mMMSx4e9qnDMuKWo+0C4tt2PpnfNrt3V416AFyFgwng051PMwdiPb 1JhNV3V+x/6TR1Po7MMzGDJ1oB01W6NFB6APpHNhuoFTtR1G6EowErz/Gc7Tn1ktpW ycdz/DG7Ri/ng== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.0]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MtfJX-1qYaUi2o0N-00v8aR; Mon, 03 Apr 2023 10:35:43 +0200 In-Reply-To: <87pm8mv2ex.fsf@wavexx.thregr.org> (Yuri D'Elia's message of "Sun, 02 Apr 2023 15:28:21 +0200") X-Provags-ID: V03:K1:wQuqkCMW7hUJFmAokeS2Nw0O4IEqGd0WVFHfTu/P5wAwhIyyXrh 7D1AagYKLfiGs9Km1lQtcsow6g1Zd7rurPU90iQv+IKS2icd0KvXJO9EJ8zBC0wJ4J4K43E HH5hw3YVaJup9gmkh1YZXFw/x9sHml0OBJ3kHds7m91lxjiNOqslcC7o60auVU1ZTqTCc3G ur9Mr+wEDFiKxJjDdL2MQ== UI-OutboundReport: notjunk:1;M01:P0:v983TzwavzI=;typOX4mjJ3kdynaHAdTKmHBI1eR RALyWjKA+CgjnfyoDAiUGAT4G4JV+5g0C1MmWO63WSej5IvNyUCHWlMl7EZwTe99cwJhnx25e HG3BFde+UFPVN0C3yYEvXt9W1JXk8ZUWZ5bPo9T6xpqihf0Xd4pQTEEXI+8DgUE1CgdtOvSg/ SHBwI+l6xX5cfSBRpT+haGfIMwjTh1BzoIrl+NZlWrjEQq9akeKJnjZPNGoQBhch3Bl3JhN/I M1OxRkrJCGyh7WH3gHEl/5c9bK4kdL+rKxD/EppY1QRdXIZwfY+taVP+kJJWC1BKa2ySwDSNT NBUQe5NDDkxQUK/GRlAJ/z+IZirxady6OHPCIugs7TGX13thwNqXtBPd004Y5UA5M9UM9BofG NwpGf3xCZurVlQBki2yIG4pz2rQ7/s5wqwjFnhPu+67ijgDnyKbVkNG+i3fjm5DRo+3XDNhuA L17BPzwmORdpiAAg/Bn3cOCVjODyjQXcErjd9Q4ItNZMQyvzVfzXhcHbsftBwJxgbMMoYklGL ttzQ0HKfmOvyy0eCaHbLR8DsYbGdmCHOp5difCi4KyQug2x3gdVru+KWGHNdsX+OdjRkqJEuH dENZhb3fB+r61ee9BcoWfz1pjqRb2JLYtTjgjROXY8FkKy45mRQPG/0De14YQ8msNvmiDwVUu 3RiPueyLBntsnpqau38zB5KktA4uoTRHUun5PAZyIlaaiPkZw7eKTB8TvVHXGwlC0ZdprnjVR PWQSUm+DsxQ+vbs5qytXSnFRBKm+rQPqHJUJp/0KyqhCGOBKXaPEgWPhIL4wLi+tH5fzxb+y 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:259162 Archived-At: Yuri D'Elia writes: Hi Yuri, > I have the following configuration to reduce remote latency while > saving, where the interesting tidbit is 'remote-file-name-inhibit-locks: > > (setq tramp-ssh-controlmaster-options "-o ControlMaster=3Dauto" > remote-file-name-inhibit-cache 300 > remote-file-name-inhibit-locks t) > > While editing a remote file via /scp:remote:test.txt I see the following > warning pop up: > > Warning (unlock-file): Cannot remove lock file for /scp:remote:test.txt, = ignored > > because the lock file hasn't been created in the first place. I guess we > shouldn't attempt to unlock if there was no lock to begin with. 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") --8<---------------cut here---------------start------------->8--- -- 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=98= t=E2=80=99. --8<---------------cut here---------------end--------------->8--- It speaks only about creation of remote lock files, and not about removal. One possible workaround for you would be to eval the following form, additionally to your settings: --8<---------------cut here---------------start------------->8--- (fset #'tramp-handle-unlock-file #'ignore) --8<---------------cut here---------------end--------------->8--- Best regards, Michael.