From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Yuri D'Elia Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Apr 2023 13:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 62614@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16804421312899 (code B ref -1); Sun, 02 Apr 2023 13:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Apr 2023 13:28:51 +0000 Received: from localhost ([127.0.0.1]:39344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pixlK-0000kh-LR for submit@debbugs.gnu.org; Sun, 02 Apr 2023 09:28:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:32810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pixlH-0000kY-42 for submit@debbugs.gnu.org; Sun, 02 Apr 2023 09:28:49 -0400 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 1pixlG-0000Uc-RF for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 09:28:46 -0400 Received: from erc.thregr.org ([2001:41c9:1:41f::63]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pixlD-0005Cq-RS for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 09:28:46 -0400 Received: from [37.163.214.31] (helo=localhost) by erc.thregr.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1pixlD-000p8Y-0r (envelope-from ) for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 15:28:43 +0200 User-agent: mu4e 1.10.0; emacs 30.0.50 From: Yuri D'Elia Date: Sun, 02 Apr 2023 15:28:21 +0200 Message-ID: <87pm8mv2ex.fsf@wavexx.thregr.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:41c9:1:41f::63; envelope-from=wavexx@thregr.org; helo=erc.thregr.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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=auto" 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. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars) of 2023-04-01 built on t14g2 Repository revision: 4bd1fc59664273c571aba8543940768c68eb336b Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --with-x-toolkit=lucid --with-native-compilation --with-tree-sitter --without-gsettings 'CFLAGS=-O3 -flto -march=native -pipe ' 'LDFLAGS=-fuse-ld=mold -flto'' From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t 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 X-GNU-PR-Keywords: To: Yuri D'Elia Cc: 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.168051095623924 (code B ref 62614); Mon, 03 Apr 2023 08:36:02 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 08:35:56 +0000 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 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 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 From: Michael Albinus In-Reply-To: <87pm8mv2ex.fsf@wavexx.thregr.org> (Yuri D'Elia's message of "Sun, 02 Apr 2023 15:28:21 +0200") References: <87pm8mv2ex.fsf@wavexx.thregr.org> Date: Mon, 03 Apr 2023 10:35:42 +0200 Message-ID: <87pm8lqs69.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:wQuqkCMW7hUJFmAokeS2Nw0O4IEqGd0WVFHfTu/P5wAwhIyyXrh 7D1AagYKLfiGs9Km1lQtcsow6g1Zd7rurPU90iQv+IKS2icd0KvXJO9EJ8zBC0wJ4J4K43E HH5hw3YVaJup9gmkh1YZXFw/x9sHml0OBJ3kHds7m91lxjiNOqslcC7o60auVU1ZTqTCc3G ur9Mr+wEDFiKxJjDdL2MQ== X-Spam-Flag: NO 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+yj oZpAqViWl2Ps6Io79qsl8+8SBb/q/6qBRPhk4Lfkskuu/006gtbH2SGh50XTXmmzH2u3EdG1f 5e/GciKo0EORbDfqEVi5J0qZlngIO2G1PTtqjvv3jAzpDiN9I4MxvSyDIE8eVtvZ/2KSDNbP9 PIg2kjT5r8N4ryxq0WrnnaSimow= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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. From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t 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 X-GNU-PR-Keywords: To: Michael Albinus Cc: 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.168051394029533 (code B ref 62614); Mon, 03 Apr 2023 09:26:02 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 09:25:40 +0000 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 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 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 References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> User-agent: mu4e 1.10.0; emacs 30.0.50 From: Yuri D'Elia Date: Mon, 03 Apr 2023 11:19:19 +0200 In-reply-to: <87pm8lqs69.fsf@gmx.de> Message-ID: <874jpx1fn4.fsf@wavexx.thregr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 09:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Yuri D'Elia Cc: 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.1680515661450 (code B ref 62614); Mon, 03 Apr 2023 09:55:02 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 09:54:21 +0000 Received: from localhost ([127.0.0.1]:43375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjGtJ-00007C-1d for submit@debbugs.gnu.org; Mon, 03 Apr 2023 05:54:21 -0400 Received: from mout.gmx.net ([212.227.15.19]:55755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjGtD-00006q-7w for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 05:54:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1680515649; i=michael.albinus@gmx.de; bh=1U0isG3NBKcZvwW7nT3IN5JPB3mmpBLYA96zlrrVup8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=pZ69/T0N4m2ODrWxWpvsPFJ8YJ5mdi7qeqsSZC2qMY1ngvPdDZMOq39bURHngzr8O qNBPdIqC22e3WkRD8/uUMJfplBhO7kWt5SXNhi7Kpjy89rsX6GDyF9yBa9LL+3eP8G g9GqW14fyctjYr8cVJ5k+Rg2qnL/KHpQoREmPwCsaZqNUSQEPj2oOOEWiQ/fZu3+QZ +eG0Sx/2QuB/T8ue+jQ/+peY3rEBuQp/+zQWL1VP/cyFs7ro3SuZmt07UPaqtW/UFO HMzM5B1OJbMwk0/OtLoDjmxTfNgFsGNs7VgIJjRL+3NDiRmXDKytrLOjXnsCGKAnUj DQMXNd0FUFjjQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.0]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mk0JW-1q7J730hrc-00kORP; Mon, 03 Apr 2023 11:54:09 +0200 From: Michael Albinus In-Reply-To: <874jpx1fn4.fsf@wavexx.thregr.org> (Yuri D'Elia's message of "Mon, 03 Apr 2023 11:19:19 +0200") References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> Date: Mon, 03 Apr 2023 11:54:08 +0200 Message-ID: <87mt3pcmv3.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:STZfm6jnRdEyHf9Zf6ltuCWGO1vtneJpRpvV2Z4yK8HsULmhgMQ GIrXiQqiTzWQAoDPt22KTlCIeIWykXOszEGkw2ImYFgTOwvCUWFaB206tvBFWO79hx9BfUL sC7eneKpZUxO2fpzIrFGBR0RaL1S4Hkxohewv3oJOSl2rJeHLznEuOToQ17jOmPXf4tM3al 93cZ2GlulBEJU0YfqJrvw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:UF0VWsGs5xo=;1i6Vy3euuBbdBXrt9Y9Ox4chDIZ +iY2XWPGuUZcE4SXtqMWKrxsr1Rwq2JmPAD6JzMzGNPByQpeo0AuB3WwGL0ht1oobRu8sOqHC 7FmbWcLCC7GC7sIkk0kVYqyqE65mQTj/czYdgwlIfmnObGAej58IRGQ/rF46R+5DI8xfk9P7i 0TwSLEcypiCqQXLboPd2skNEr9HYvx0xq3QSMDvVShIy3eqtHN5NjbKTCXJ/zJS8fXI4SioGl BJavFUX8XKUKPln89NDLFgXPBRdVHPpKvEYSZqc9+fWr2MYHbQKet9EmcLKmgm9lWiyOdbdNi 1CWAqF+cQaCDHBD595VlZi0kIK1VPgXdpsS7w5ivblG3M21/910+SYuDf3PxVpTN0/B6u7X8+ qypZUc1v0dUPhgB7Azqla+JAW5jgOt0jYhnyCMAE5gJM0FEzXTao+aIZbwPxsMUk/YQ+13lN/ FYSxzpj0OP3vcXvqAOMy9hOQ9XCJhBwsQztJ2N9nvYPJgAWLCKL/kn4pAAadvk2Ee68xzm+Pk H4xFn5CMsV95eU7230KNJEs3TylP9BXeAn7SY5TpTOw8lwifomPXONjs7SWfv1+qV9bruZ/pE Tk6igOnofBpk+3zlaRWNcbPjQuHlXtv2Iax0chx4Bf9Uh2P07Cj9Q1Yak6XQ08PChR50EGze6 DQKDLpc99NLO578H1bLgp25/oytfTh4hVv7cjwVCW0i6uET91Z3rgROriDdV9Q02SinJENSoA SXIjbMC0BP+Y6sNjoRjIxMbH94P9SIk1D4R7g5AX3GlMHotv2nob1IYKbLFHR2/1xmmK867sd xJGj7Ms9AzoXYdQZKrTK18nYWjnY5iVbzGziAkM10Gau9OVaYQxNBFTq2zQkmveE4fVRn6zXX fajOvcajIxclOqvZTRBNqjxO/tAjJSDMTtqHMaLkfJfcCF4oJgR8a494VtPkJg7iEb69Sf1k/ aedepg== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Yuri D'Elia writes: Hi Yuri, > 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? Don't know, this behavior is "since ever" (I don't remember a change here). With Tramp I'm agnostic. Tramp follows the behavior of local files. It could do it differently, the local behavior could change, whatever. Opinions? >> 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. As said, it would be a workaround for your expectations. I won't document it as global solution. Best regards, Michael. From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Yuri D'Elia Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 10:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.16805169232684 (code B ref 62614); Mon, 03 Apr 2023 10:16:02 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 10:15:23 +0000 Received: from localhost ([127.0.0.1]:43380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjHDf-0000hD-0y for submit@debbugs.gnu.org; Mon, 03 Apr 2023 06:15:23 -0400 Received: from erc.thregr.org ([46.43.2.63]:49054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjHDd-0000h3-Ic for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 06:15:22 -0400 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 1pjHDf-000qgu-0b (envelope-from ); Mon, 03 Apr 2023 12:15:23 +0200 References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> <87mt3pcmv3.fsf@gmx.de> User-agent: mu4e 1.10.0; emacs 30.0.50 From: Yuri D'Elia Date: Mon, 03 Apr 2023 12:01:58 +0200 In-reply-to: <87mt3pcmv3.fsf@gmx.de> Message-ID: <87zg7pz2yx.fsf@wavexx.thregr.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, Apr 03 2023, Michael Albinus wrote: > Don't know, this behavior is "since ever" (I don't remember a change here). > > With Tramp I'm agnostic. Tramp follows the behavior of local files. It > could do it differently, the local behavior could change, whatever. > > Opinions? I fully agree with you that it should follow the behavior of local files too, so I wouldn't change anything here _just_ for tramp. From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Yuri D'Elia Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 10:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus , 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.16805172313158 (code B ref 62614); Mon, 03 Apr 2023 10:21:01 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 10:20:31 +0000 Received: from localhost ([127.0.0.1]:43388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjHId-0000os-7V for submit@debbugs.gnu.org; Mon, 03 Apr 2023 06:20:31 -0400 Received: from erc.thregr.org ([46.43.2.63]:60170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjHIa-0000ok-QZ for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 06:20:29 -0400 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 1pjHId-000qhH-2B (envelope-from ); Mon, 03 Apr 2023 12:20:31 +0200 References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> <87mt3pcmv3.fsf@gmx.de> <87zg7pz2yx.fsf@wavexx.thregr.org> User-agent: mu4e 1.10.0; emacs 30.0.50 From: Yuri D'Elia Date: Mon, 03 Apr 2023 12:17:06 +0200 In-reply-to: <87zg7pz2yx.fsf@wavexx.thregr.org> Message-ID: <87v8idz2qc.fsf@wavexx.thregr.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, Apr 03 2023, Yuri D'Elia wrote: > On Mon, Apr 03 2023, Michael Albinus wrote: >> Don't know, this behavior is "since ever" (I don't remember a change here). >> >> With Tramp I'm agnostic. Tramp follows the behavior of local files. It >> could do it differently, the local behavior could change, whatever. >> >> Opinions? > > I fully agree with you that it should follow the behavior of local files > too, so I wouldn't change anything here _just_ for tramp. Thinking loudly, if we inhibit lock creation, what's your opinion on the unlock warning (for the generic local case)? IMHO if lock creation is inhibited, we could still attempt to remove the lock to keep the old behavior, but then the warning shouldn't be generated as you don't expect the lock to exist in the normal case. From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 10:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Yuri D'Elia Cc: 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.16805178284818 (code B ref 62614); Mon, 03 Apr 2023 10:31:02 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 10:30:28 +0000 Received: from localhost ([127.0.0.1]:43402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjHSG-0001Fd-Fn for submit@debbugs.gnu.org; Mon, 03 Apr 2023 06:30:28 -0400 Received: from mout.gmx.net ([212.227.15.18]:45675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjHSC-0001FK-Kk for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 06:30:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1680517818; i=michael.albinus@gmx.de; bh=ODpFmgsZ1KS/nJ1oNpVJIQLJYd+6/XQroAlAEAQ8nYE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=Ynhvjt6aeywMVbB0YZbDvWkv73Vn2cg9VG+cFna439WW9B5ndOMbcHJAtTRh0cHip 9j3vXacOrhIrfmXVvB1zRSLq4Xutc1aVvi2IaScxL5wJDvVm6G01JbwjN4ZTsXb3lM zOxbSUzkDOoEB6zTY+q3jmsDKkyHdvDUnZd1D+xkaXYxBWsaajdRV4TKHptQ2R4Oz+ OURYnvClOYlRFMMuN3WFS0T9Nr9GVB8KQqCAmuZuiFAK1dVtV5+3ysZc0bfQmHNd3x TvDHHthcSCXDCr1HWUNYr6FlN1L7R2eO3Y9szdwyuCX9FsMUG98f4R9XcrgUHqKzvL NW0OrdPkUN98g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.0]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MGhyS-1peJMO2eJ8-00DmHv; Mon, 03 Apr 2023 12:30:18 +0200 From: Michael Albinus In-Reply-To: <87v8idz2qc.fsf@wavexx.thregr.org> (Yuri D'Elia's message of "Mon, 03 Apr 2023 12:17:06 +0200") References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> <87mt3pcmv3.fsf@gmx.de> <87zg7pz2yx.fsf@wavexx.thregr.org> <87v8idz2qc.fsf@wavexx.thregr.org> Date: Mon, 03 Apr 2023 12:30:17 +0200 Message-ID: <87jzytqmva.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:wTt/fnHwbDRSFoHz897SX88qYvJgBhvVomG0yqDD7fCEiKodigp KeqNCOkWcPCMLnSbsI/JwcOBmbXUGrbASZfZo4Zcv6urXOFyw3w44gCEmEH7jpV0IK+uuOw qHsHSalxvQw1akrQMYjrnYTsJ808uy4dYKavBJ1Zsl0sDYRHZ12Zq2viaPYY+HWyjabX553 ylUuWBSJsvxqWz4tC33SQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:W56LviNFSIo=;Q3ZzkuOYmiYNvECv8pr5/y3is1+ r7ZoLh7SjYtJZb7jxSbszIkSKzJzUXiEHjnrV1j43rau4PXWbI5UTRmFyRm+O/TQViDyehlp7 mcvQpneelIf9Ayi9oP5QuZXA5Eb3m7jhcmseXNV6k0SzKQDRBCN+z4PX2Op5OIsKP8PcCe/CZ AQqQAlPz+AmUdi6ElkktzktHqh1v8BJVJ/VvdmrE2qIaPENGiunNf+lWFtiQ1pdVtADMCVYNq IJ+rM724/E5P7ftmuvu8VV8L7SgWgYzQoyt4f41ulDSZxrIhQltmLsrL9EPB0E723p1JjTwgs xu6JJn3mMcDOQXBSCbAwq08WOzNqaN+tdWrbGDRojYcJmaJiH2p5x4nKnLSNFvjg8LL83ojdS +YBGDqfbfOAxIOtZ+Gc6s7qUsm6PuE15JIGNNkIYFNw6FeXkCgbXJu8ziB6yl2Ij9IhRHGT/F JNEU3ENCvGApnpufS62YBLqMxD/WxhSlNWvh2M379FoSOQTAy+oTYqKsBdYrQeGSB4WnTebuD QHh7mvLG6r0+6MhsuHm5I67HcFOu5sUjIn5WZiDFcM5I/E4EnKaSvGVKiaL4AoDLViZ5dVoXI +6CUNMogVRRE2qqeWsiEUCzZfMXA7Yr5SPadIKAMXw4u7bpKY4H5zxR9HpRa1QvmltNsoyOGl 4qRbfajW/bCbeEiWYCxZgTp9Y+mczBkW7A1aUo4eZ87DpOf9nVQmouYhCRJtBlpwOpWEd35Ss uBoW0M5G848qV9ArSkJGyrHHESzKbqrbRd8XLJDjyzUxoAhaQJ4D4BjswdQ+atkiGlqaksx4r GgKyR/RKNZs1iZAp8m1CVXJa8dEf8L4E/xhQOlDCxCLNDdiL6gbEj1nPyuj6UNBmB9rc8FsfT 2beLVcIV4+zJpAGtd/TbZL9OEOjcV5vu9Q750byqr4y9gdD2hSRjaRegZD6iPcgkLMQwCB7q2 4F4eIw== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Yuri D'Elia writes: Hi Yuri, >> I fully agree with you that it should follow the behavior of local files >> too, so I wouldn't change anything here _just_ for tramp. > > Thinking loudly, if we inhibit lock creation, what's your opinion on the > unlock warning (for the generic local case)? > > IMHO if lock creation is inhibited, we could still attempt to remove the > lock to keep the old behavior, but then the warning shouldn't be > generated as you don't expect the lock to exist in the normal case. That might be an option. But it wouldn't fix your use case, where you try to avoid the file locking machinery for remote files at all. Best regards, Michael. From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 14:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Yuri D'Elia Cc: 62614@debbugs.gnu.org, michael.albinus@gmx.de Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.16805310138524 (code B ref 62614); Mon, 03 Apr 2023 14:11:02 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 14:10:13 +0000 Received: from localhost ([127.0.0.1]:44920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjKsv-0002DQ-8B for submit@debbugs.gnu.org; Mon, 03 Apr 2023 10:10:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjKst-0002DB-WB for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 10:10:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjKsn-00026i-N8; Mon, 03 Apr 2023 10:10:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=l91cJOP/lFAAJh21R4To9KkvSZhS6npjtdmbu81jCM0=; b=R0htzoL8Ad9W/787teFD 8dojOllfUg7DjlXa6qwNQW88oY61JBs+4WXuXeJhekhJHZbiesypSvVk2+0sTkWn5XRJLRNqh9p2N /CXqyEBQrW99Sb0ZFXaSIpqsihK8EM3IXWll9dyK5Sv5NVfLzSmZYzHi1NqpNtwxiHowVOCI4lG5w whczjACNaVZ2NBoEBKJMKDQMNthKyt07GjAPkw0pdtSh1gVdJMbz3vwwKRax+cmJKqD9n1hDr/Qce GlqwQMq9mcZUJ9xf/htwFrxenT/IDB/aTVrYwVQ7klEVYaknrGxThIS8S5wt2puS62sDMYhZaRPkj Df6WYH15mKs1Ag==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjKsm-0004UH-Sy; Mon, 03 Apr 2023 10:10:05 -0400 Date: Mon, 03 Apr 2023 17:10:26 +0300 Message-Id: <83wn2tukdp.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <874jpx1fn4.fsf@wavexx.thregr.org> (message from Yuri D'Elia on Mon, 03 Apr 2023 11:19:19 +0200) References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 62614@debbugs.gnu.org > From: Yuri D'Elia > Date: Mon, 03 Apr 2023 11:19:19 +0200 > > 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 ‘remote-file-name-inhibit-locks’ to ‘t’. > > > > > > 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? Yes, because a lock file could be created before the option to avoid them was set. From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 14:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: wavexx@thregr.org, 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.16805312448874 (code B ref 62614); Mon, 03 Apr 2023 14:15:02 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 14:14:04 +0000 Received: from localhost ([127.0.0.1]:44927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjKwd-0002J2-V5 for submit@debbugs.gnu.org; Mon, 03 Apr 2023 10:14:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjKwc-0002IP-7L for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 10:14:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjKwW-00030P-Dq; Mon, 03 Apr 2023 10:13:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+M2QTcExH+sddSSpLyDWaFDRcbPrdec9DirJO1iJl/0=; b=eRAQVtv6434V hlqiHKlro195Buxvp2+aGTnUxC5UqK0GEXTmUZgX0wvd0VonqInD6CUFDmLQ8xbg2maAXs4k9/Yfx 4tOTCOzhQ+Tou88q8E1crjXVf09NZtWY26F5vw4IoBLu0GyGIs5VZJBSkmrSBGRXQYbo/MTjbyQwx Q+bI6uRPtCJ19OKpmJJAwNigWErftgYc9CoFd/4+/N05m0rpqEZoW3Yi6lNhGWINw0HDqQzNFAcWo 6bEN6xy9k0g+uRpCW61DHpOlanD7doBuje+rbGM48SsOrAK7PlUh0MObA31o4S2dgzljAIAID/sTR UeUa9miqSHjBX31f7r/l1w==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjKwV-0005Ke-HM; Mon, 03 Apr 2023 10:13:55 -0400 Date: Mon, 03 Apr 2023 17:14:16 +0300 Message-Id: <83v8iduk7b.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87mt3pcmv3.fsf@gmx.de> (message from Michael Albinus on Mon, 03 Apr 2023 11:54:08 +0200) References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> <87mt3pcmv3.fsf@gmx.de> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 62614@debbugs.gnu.org > From: Michael Albinus > Date: Mon, 03 Apr 2023 11:54:08 +0200 > > Yuri D'Elia writes: > > Hi Yuri, > > > 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? > > Don't know, this behavior is "since ever" (I don't remember a change here). > > With Tramp I'm agnostic. Tramp follows the behavior of local files. It > could do it differently, the local behavior could change, whatever. > > Opinions? How about trying to remove the lock file, but if creation of lock files is disabled, suppressing the warning? From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Yuri D'Elia Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 14:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus , Eli Zaretskii Cc: 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.168053391323245 (code B ref 62614); Mon, 03 Apr 2023 14:59:01 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 14:58:33 +0000 Received: from localhost ([127.0.0.1]:44988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjLdg-00062r-L3 for submit@debbugs.gnu.org; Mon, 03 Apr 2023 10:58:32 -0400 Received: from erc.thregr.org ([46.43.2.63]:36954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjLdf-00062j-Dy for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 10:58:31 -0400 Received: from [37.162.224.28] (helo=localhost) by erc.thregr.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1pjLdg-000qy0-2r (envelope-from ); Mon, 03 Apr 2023 16:58:33 +0200 References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> <87mt3pcmv3.fsf@gmx.de> <87zg7pz2yx.fsf@wavexx.thregr.org> <87v8idz2qc.fsf@wavexx.thregr.org> <87jzytqmva.fsf@gmx.de> User-agent: mu4e 1.10.0; emacs 30.0.50 From: Yuri D'Elia Date: Mon, 03 Apr 2023 16:54:12 +0200 In-reply-to: <87jzytqmva.fsf@gmx.de> Message-ID: <87iledypuz.fsf@wavexx.thregr.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, Apr 03 2023, Michael Albinus wrote: >> IMHO if lock creation is inhibited, we could still attempt to remove the >> lock to keep the old behavior, but then the warning shouldn't be >> generated as you don't expect the lock to exist in the normal case. > > That might be an option. But it wouldn't fix your use case, where you > try to avoid the file locking machinery for remote files at all. No, but it would fix an unexpected warning for both tramp and local files, which I think is beneficial. On Mon, Apr 03 2023, Eli Zaretskii wrote: > How about trying to remove the lock file, but if creation of lock > files is disabled, suppressing the warning? As above. From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 16:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Yuri D'Elia Cc: Eli Zaretskii , 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.16805395551082 (code B ref 62614); Mon, 03 Apr 2023 16:33:01 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 16:32:35 +0000 Received: from localhost ([127.0.0.1]:45087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjN6h-0000HO-16 for submit@debbugs.gnu.org; Mon, 03 Apr 2023 12:32:35 -0400 Received: from mout.gmx.net ([212.227.17.22]:57419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjN6e-0000HA-Cn for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 12:32:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1680539546; i=michael.albinus@gmx.de; bh=VAj7EWfCaPbN3UdbH0/GfOusUT+PbQPxGOeMQsYo8hU=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=XH5rNSrKtwG9BNmfiykZCkTXjKMwpCKTE+jlYHfjCwJLiDxfUHv9LG3+1nZmOjIwB MtNQuWPF6u9mxgFZtlAJeNFc7xHp/hbtk5il4sZcYLj3McUlAF0/WkG0j32Wy9xCfz mWGAihTWfKZsLRvdBEKHlq6M8PqhajSzcOkxAku6laoGFeJv5GT8TDh7Ei8qBZFykJ ecTUl4e3RYz84zBLkP+GCw+nMo71wiJZr4Tvjsn9gL/5NbLOJUNWMgM79WiCSWIex9 5mfGQNm2Olk7lRBtYB8WMT/JHzZSmiLY3KKY5XWA3Jt0ZzJVFoTq//w1IWwNiFl3lQ Jq9gIVsK4BKSw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.0]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGz1f-1pedsf178l-00E3Gn; Mon, 03 Apr 2023 18:32:26 +0200 From: Michael Albinus In-Reply-To: <87iledypuz.fsf@wavexx.thregr.org> (Yuri D'Elia's message of "Mon, 03 Apr 2023 16:54:12 +0200") References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> <87mt3pcmv3.fsf@gmx.de> <87zg7pz2yx.fsf@wavexx.thregr.org> <87v8idz2qc.fsf@wavexx.thregr.org> <87jzytqmva.fsf@gmx.de> <87iledypuz.fsf@wavexx.thregr.org> Date: Mon, 03 Apr 2023 18:32:25 +0200 Message-ID: <878rf90vvq.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:1V8d64v80xsJQcP6TbZYUIwaLQ4z9C4IaCEjhNH4aYXkMQgmKWl CAJZ32miM0GfCCvbKF9larzCcPb259pONzzC4/Q/xFnwIbO84gBFliiTudfEqXBC/qAyZD4 kub73avuwNcNlwEcJzlNQJeMjsT2hk+5nqjZIxCqyisXQ2KZBBUvUteKFQKFSodm5K3G9K+ vWkR4Ox6r/REJzpH6090A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:/xLlc9I7rWU=;Rv2h3+I+toxqwuJEKLNoqERs9Qo IGcleLl3SBn80VnQAlYyyM2F4r/6TLp7XTjHs6WWaU3A36qHCIxijV95MzCOpXGLjEYH9Ql57 pg6Dtc8nNMiROSpbtm094blGl4+gSXV93n2S4MQN2hkWKCDeayKuGv6BwS+DEWrrf0RZQrf61 uMfjGQt8SOtLXxF7cw/HmCbd4n3DdD55QwaR13bNEylXDR8r6fSWUWsPEbuQ2kyZnuhZVBzfG ctf8H0YXeGQQsa+6y3PaD/JZ4GeFJQJN57wcL+mln1GK3A04xherCNYOsSjbkgkSba8KwbMzA v2Vcu17bjWzP7nQddMxvPL+Auih7BEHwB2kifCrvbDxmQsTOUPIdNKRiO7xKjWNrsK+ave1UO 4Gaep6j0epCUR4n9lmywxFDZRUZ09a/3ulZXOW1qS1NIC1XcXE5rFv4FnxlnUL9+PoMfp2yb7 doIO52z9LWHqit//uBWCWzt4xOKsBbR9UYhNfAJx/PM3uw9gMsuUy8tmnqIG5WfYp7JpQ2buQ x8q97AgxgjykFRowzohrjlf/BtsGMZ20iuLG0G7wY9OCM2xzBTjQ2ohIlGW8MBdhlSEWXRxPi wbYSBat87twWWKKrtPNpQUW8PU8KFj0vdDXZTSyg8OVIHiorZmvRqIZJKLA4FPv024Dznq1Az d6GvJVbc2hBOx7u/bz4E1wOHJaBtTSh7Gs4jetd68dkz+Hct/ODfcIn2mD4tfeQt0Kok8zivj oHYNmlMe5ZKSafOvQK2L5ghegALbzSuOd2M1gH9zC90q027igdtNTlDHE0TF9zCQVgwedT2sC r1ZoHqU5Zd+XPcf32RxyE5wZerXR8OeULMOpO8h8IkUhB7lUbJ37+zOTjL2w0FJcifawSVPGI kxfKFx6s3ZAgtHSGkwri5KmzP0QEm0d0SvUY0IPMPCERCP85DU2lVmrJihT2SdVG67jnTO2uf 6MDSyiMOjy8ySf/1pI+BArNPzkQ= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Yuri D'Elia writes: Hi Yuri & Eli, > On Mon, Apr 03 2023, Michael Albinus wrote: >>> IMHO if lock creation is inhibited, we could still attempt to remove the >>> lock to keep the old behavior, but then the warning shouldn't be >>> generated as you don't expect the lock to exist in the normal case. >> >> That might be an option. But it wouldn't fix your use case, where you >> try to avoid the file locking machinery for remote files at all. > > No, but it would fix an unexpected warning for both tramp and local > files, which I think is beneficial. > > On Mon, Apr 03 2023, Eli Zaretskii wrote: >> How about trying to remove the lock file, but if creation of lock >> files is disabled, suppressing the warning? > > As above. See appended patch. Shall it go to the emacs-29 or master branch? Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable diff --git a/lisp/files.el b/lisp/files.el index d325729bf4d..216d31c737b 100644 =2D-- a/lisp/files.el +++ b/lisp/files.el @@ -555,7 +555,7 @@ lock-file-name-transforms :version "28.1") (defcustom remote-file-name-inhibit-locks nil - "Whether to use file locks for remote files." + "Whether to create file locks for remote files." :group 'files :version "28.1" :type 'boolean) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index df2f0850b83..4180a32b6d9 100644 =2D-- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4585,7 +4585,8 @@ tramp-handle-unlock-file (condition-case err (delete-file lockname) ;; `userlock--handle-unlock-error' exists since Emacs 28.1. - (error (tramp-compat-funcall 'userlock--handle-unlock-error err))))= ) + (error (and (not (bound-and-true-p remote-file-name-inhibit-locks)) + (tramp-compat-funcall 'userlock--handle-unlock-error er= r)))))) (defun tramp-handle-load (file &optional noerror nomessage nosuffix must-= suffix) "Like `load' for Tramp files." diff --git a/lisp/userlock.el b/lisp/userlock.el index 61f061d3e54..562bc0a0a9f 100644 =2D-- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -206,11 +206,12 @@ ask-user-about-supersession-help ;;;###autoload (defun userlock--handle-unlock-error (error) "Report an ERROR that occurred while unlocking a file." - (display-warning - '(unlock-file) - ;; There is no need to explain that this is an unlock error because - ;; ERROR is a `file-error' condition, which explains this. - (message "%s, ignored" (error-message-string error)) - :warning)) + (when create-lockfiles + (display-warning + '(unlock-file) + ;; There is no need to explain that this is an unlock error because + ;; ERROR is a `file-error' condition, which explains this. + (message "%s, ignored" (error-message-string error)) + :warning))) ;;; userlock.el ends here --=-=-=-- From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 16:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: wavexx@thregr.org, 62614@debbugs.gnu.org Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.16805402982309 (code B ref 62614); Mon, 03 Apr 2023 16:45:01 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 16:44:58 +0000 Received: from localhost ([127.0.0.1]:45113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjNIg-0000bB-DU for submit@debbugs.gnu.org; Mon, 03 Apr 2023 12:44:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjNId-0000ax-Hz for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 12:44:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjNIX-0003cm-5f; Mon, 03 Apr 2023 12:44:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mIAfPAneoz9IC2RnBX4HjnQAhrfALdSGWNtVI4URrqI=; b=HBkWKlklXILp YoJRKCu4R6QHEnD5sU78N8ilz+ViGqud3foF8t69mwuXytmuv/ybPa3jJHQpya4SMrDiwKXxsE/h/ sbd8jgmXjGfXibeL7g793jxEzGbEVbou0aD19jKMPjcqe9wj/ItJYhCcjyb70yzcpz56ozfpdfsdX iQIk1yHI7Et9F5cfs85AzlBV9vtesuuQwpbEtIC2mCGfGTR8Wg9auF1mi/ojU8lG2D+Nzo6Qe/d3n k2TLGFL/piw1g5mPTPJXoTD6Z4VEgNcgWKNBC3YtfPYDFYAtKlrJbrEk1hVPU9P++s2eULkfSQGBQ 6mk20nQJTfE6sGY5mc2/yw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjNIW-0006YP-Eo; Mon, 03 Apr 2023 12:44:48 -0400 Date: Mon, 03 Apr 2023 19:45:11 +0300 Message-Id: <83fs9gvrs8.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <878rf90vvq.fsf@gmx.de> (message from Michael Albinus on Mon, 03 Apr 2023 18:32:25 +0200) References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> <87mt3pcmv3.fsf@gmx.de> <87zg7pz2yx.fsf@wavexx.thregr.org> <87v8idz2qc.fsf@wavexx.thregr.org> <87jzytqmva.fsf@gmx.de> <87iledypuz.fsf@wavexx.thregr.org> <878rf90vvq.fsf@gmx.de> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Albinus > Cc: Eli Zaretskii , 62614@debbugs.gnu.org > Date: Mon, 03 Apr 2023 18:32:25 +0200 > > > On Mon, Apr 03 2023, Michael Albinus wrote: > >>> IMHO if lock creation is inhibited, we could still attempt to remove the > >>> lock to keep the old behavior, but then the warning shouldn't be > >>> generated as you don't expect the lock to exist in the normal case. > >> > >> That might be an option. But it wouldn't fix your use case, where you > >> try to avoid the file locking machinery for remote files at all. > > > > No, but it would fix an unexpected warning for both tramp and local > > files, which I think is beneficial. > > > > On Mon, Apr 03 2023, Eli Zaretskii wrote: > >> How about trying to remove the lock file, but if creation of lock > >> files is disabled, suppressing the warning? > > > > As above. > > See appended patch. LGTM, thanks. > Shall it go to the emacs-29 or master branch? Master, please. From unknown Sat Sep 20 23:03:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Resent-From: Yuri D'Elia Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 18:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 62614@debbugs.gnu.org, Michael Albinus Received: via spool by 62614-submit@debbugs.gnu.org id=B62614.168054810826338 (code B ref 62614); Mon, 03 Apr 2023 18:56:02 +0000 Received: (at 62614) by debbugs.gnu.org; 3 Apr 2023 18:55:08 +0000 Received: from localhost ([127.0.0.1]:45259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjPKe-0006qi-DM for submit@debbugs.gnu.org; Mon, 03 Apr 2023 14:55:08 -0400 Received: from erc.thregr.org ([46.43.2.63]:48888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjPKc-0006qI-8p for 62614@debbugs.gnu.org; Mon, 03 Apr 2023 14:55:07 -0400 Received: from [37.162.224.28] (helo=localhost) by erc.thregr.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1pjPKc-000rAW-3C (envelope-from ); Mon, 03 Apr 2023 20:55:07 +0200 References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> <87mt3pcmv3.fsf@gmx.de> <87zg7pz2yx.fsf@wavexx.thregr.org> <87v8idz2qc.fsf@wavexx.thregr.org> <87jzytqmva.fsf@gmx.de> <87iledypuz.fsf@wavexx.thregr.org> <878rf90vvq.fsf@gmx.de> <83fs9gvrs8.fsf@gnu.org> User-agent: mu4e 1.10.0; emacs 30.0.50 From: Yuri D'Elia Date: Mon, 03 Apr 2023 20:50:09 +0200 In-reply-to: <83fs9gvrs8.fsf@gnu.org> Message-ID: <87edp0zth5.fsf@wavexx.thregr.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, Apr 03 2023, Eli Zaretskii wrote: >> > On Mon, Apr 03 2023, Eli Zaretskii wrote: >> >> How about trying to remove the lock file, but if creation of lock >> >> files is disabled, suppressing the warning? >> > >> > As above. >> >> See appended patch. > > LGTM, thanks. > >> Shall it go to the emacs-29 or master branch? > > Master, please. As for this specific bug report, I'd close it as "fixed". The spurious warning was definitely my main complaint. As for the extra attempt to remove the remote file, I can't think of anything better at this moment than manually fset'ing the function. From unknown Sat Sep 20 23:03:16 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Yuri D'Elia Subject: bug#62614: closed (Re: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t) Message-ID: References: <87jzysxesf.fsf@gmx.de> <87pm8mv2ex.fsf@wavexx.thregr.org> X-Gnu-PR-Message: they-closed 62614 X-Gnu-PR-Package: emacs Reply-To: 62614@debbugs.gnu.org Date: Tue, 04 Apr 2023 07:56:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1680594962-29826-1" This is a multi-part message in MIME format... ------------=_1680594962-29826-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-l= ocks t which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 62614@debbugs.gnu.org. --=20 62614: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D62614 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1680594962-29826-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 62614-done) by debbugs.gnu.org; 4 Apr 2023 07:55:21 +0000 Received: from localhost ([127.0.0.1]:46485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjbVh-0007jz-2C for submit@debbugs.gnu.org; Tue, 04 Apr 2023 03:55:21 -0400 Received: from mout.gmx.net ([212.227.15.15]:33639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjbVf-0007jR-CK for 62614-done@debbugs.gnu.org; Tue, 04 Apr 2023 03:55:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1680594913; i=michael.albinus@gmx.de; bh=SrRwOg1oku4BEJMBO3QCCP2A3kTkZaj+R8a8lwiYsj8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=eVe59VZGa4gtdnDK0V+Rq9JNdt3YIJiCNI2HT45HTfWJ1x9bpwJ9Nwlx1/ApywZ7l zin9S0M1B1n/IZw9fLwVi4S1ljugudT1NRhC1tCyxQg13KvFVE/gBmXv0/i+xI2fiJ HmiZrpbTxZ7NXx97bpD3Lob8NGOGjkKnuzXehUGFanKDvCAtO2a03aJaiGMfi8gzfC hwotoNqPN9KLC+/bPfWmflLFGMdKhFaazJ3BMZsHba2iW2Bzbg16HPXAYlYlEA3Hhh 8K/dJ24sU70ISX2qvk+tf7EXbxJW+LwF09ZO0//v1GJGkDCnX2+W+FnSXHT5qngn0D cjeRyILiDXBfA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.0]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M3UZ6-1pj3HH0swU-000b43; Tue, 04 Apr 2023 09:55:13 +0200 From: Michael Albinus To: Yuri D'Elia Subject: Re: bug#62614: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t In-Reply-To: <87edp0zth5.fsf@wavexx.thregr.org> (Yuri D'Elia's message of "Mon, 03 Apr 2023 20:50:09 +0200") References: <87pm8mv2ex.fsf@wavexx.thregr.org> <87pm8lqs69.fsf@gmx.de> <874jpx1fn4.fsf@wavexx.thregr.org> <87mt3pcmv3.fsf@gmx.de> <87zg7pz2yx.fsf@wavexx.thregr.org> <87v8idz2qc.fsf@wavexx.thregr.org> <87jzytqmva.fsf@gmx.de> <87iledypuz.fsf@wavexx.thregr.org> <878rf90vvq.fsf@gmx.de> <83fs9gvrs8.fsf@gnu.org> <87edp0zth5.fsf@wavexx.thregr.org> Date: Tue, 04 Apr 2023 09:55:12 +0200 Message-ID: <87jzysxesf.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:7Mia31bmjC2KHggst6qeT+Xn0Jd4NW0KTEk4nbv13YjRtkAzubG 4dTdZICjh3CjB6dSMOqznqhZpnG15nvgJR5XaNpFb7Z68R+feurJfQQLWWejro553j5sffE DN11VkEB2qt8avNmSbG59oLHwX/FAq2RUw6iq7874np0ryKVnUfA0v9OUitvZ4e0YkyViBt 5ZSnTZW9yuDv9lpg7o6uA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:B3zeZm/EdSs=;BwSasgYMsJ40SOuDwimHncxwczu rknn0VVcJro3qy4GWw6d36AVe89JAg4+TXfF3gvDN4CX2QCyD9WINjvPSVr8rtPNGaIp/zwMw 7WZR2r+8Oew3i+ArDqa80gBWZuStznt/FplwwM/mwf8YfNk26cVvMCHuO6xRFiRZwnU3G8+JO mZHjdf9llzEJLZsJgT/Yx1AZnIAk5H30TguhPic+Xj0AotIYTq2B2I+VqbCQaaQ/W2SrpRhAM Pz6TEhAbtRm3rCsai9csX6dpOkerIYNdly0Qvtna0HV0tf5K1rgcdiC2Xe+G70zXhDFNo5rWg dVt61ZjXzyfE8jsJnYLHD67FDs2Gj4TCgX1Oa3x5HBAxj1rb1EhnqJdf3RCuH3TCKHx39nsAY H4IYa5l0gFeSWxO/XzBWXSTG4bS6h3JVToP5VSimEzwhTSxyx1UmL7FJyQ1UFCTylQfxqkBOr +tcDhOIrx7pyBmru3NmVGBMKoUtEEc4y4NduHPmB3QxpPkgqcvM09Kdo0pDDKim/WyS1TeEoN Fo0x/fyuTJ6cQhLB/b++fPitf+DYMVnmTccpUdyXODC7aHLnvSXOrIcUlRpbjeqM3A8fdxMMM 8XENLfnpOUexy6Zif9oMiD3MPD73HChHE0E8AGhAm35oOn93asGngKuBh+F7zS5lIDcJ3T3+e APorRehOQkuZQ7TAJH7aYLr5+w7/Qm5Z+YOhsm03YmYYmHtGQ+el0ZE8fLR1MpTxdBVMZuMVK AIcENYjJHITp3QxqgOusFAVgXccs04oePStMC6Lk0V7HgZ6+80tN8V2qeBmPgkDZ1U6lKS4QO vBvL0oAtvF2f3y1VPJmExp3koA1ATElq/uF/3LVsEzvwFtEsehN/evHXg3Bu16mA+AIhVY2Wn Yujrcw3svWMsJaxqDQXoIRtprnEvG7YM0N+aMjlLQFWFdK4jQpUmDT3hrptJHc20N5VyhisZc So+DSw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 62614-done Cc: Eli Zaretskii , 62614-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Version: 30.1 Yuri D'Elia writes: Hi Yuri, >>> >> How about trying to remove the lock file, but if creation of lock >>> >> files is disabled, suppressing the warning? >>> > >>> > As above. >>> >>> See appended patch. >> >> LGTM, thanks. >> >>> Shall it go to the emacs-29 or master branch? >> >> Master, please. > > As for this specific bug report, I'd close it as "fixed". > The spurious warning was definitely my main complaint. Pushed to master, closing. Best regards, Michael. ------------=_1680594962-29826-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Apr 2023 13:28:51 +0000 Received: from localhost ([127.0.0.1]:39344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pixlK-0000kh-LR for submit@debbugs.gnu.org; Sun, 02 Apr 2023 09:28:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:32810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pixlH-0000kY-42 for submit@debbugs.gnu.org; Sun, 02 Apr 2023 09:28:49 -0400 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 1pixlG-0000Uc-RF for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 09:28:46 -0400 Received: from erc.thregr.org ([2001:41c9:1:41f::63]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pixlD-0005Cq-RS for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 09:28:46 -0400 Received: from [37.163.214.31] (helo=localhost) by erc.thregr.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1pixlD-000p8Y-0r (envelope-from ) for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 15:28:43 +0200 User-agent: mu4e 1.10.0; emacs 30.0.50 From: Yuri D'Elia To: bug-gnu-emacs@gnu.org Subject: Tramp attempts to remove lock file with 'remote-file-name-inhibit-locks t Date: Sun, 02 Apr 2023 15:28:21 +0200 Message-ID: <87pm8mv2ex.fsf@wavexx.thregr.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:41c9:1:41f::63; envelope-from=wavexx@thregr.org; helo=erc.thregr.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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=auto" 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. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars) of 2023-04-01 built on t14g2 Repository revision: 4bd1fc59664273c571aba8543940768c68eb336b Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --with-x-toolkit=lucid --with-native-compilation --with-tree-sitter --without-gsettings 'CFLAGS=-O3 -flto -march=native -pipe ' 'LDFLAGS=-fuse-ld=mold -flto'' ------------=_1680594962-29826-1--