all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 70900@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#70900: 30.0.50; tramp complains "File error: Cannot remove lock file for /ssh:..." on every save when remote-file-name-inhibit-locks is non-nil
Date: Wed, 15 May 2024 12:18:56 +0200	[thread overview]
Message-ID: <87ttize5tb.fsf@gmx.de> (raw)
In-Reply-To: <0be0a6b6-6c98-48fe-92ed-f702617b4b4d@gutov.dev> (Dmitry Gutov's message of "Tue, 14 May 2024 01:31:01 +0300")

Dmitry Gutov <dmitry@gutov.dev> writes:

Hi Dmitry,

> Still, it would be great if tramp could batch more checks to happen at
> once, rather than do them over multiple round-trips. Though that would
> mean having to maintain a separate "remote" version of
> 'basic-save-buffer', I guess.

Tramp tries to do this, but it is limited. It sees the remote side on
the perspective of a primitive file operation it has an implementation
for, see the list on (info "(elisp) Magic File Names")

And yes, 'basic-save-buffer' doesn't belong to this list.

Tramp tries to combine several actions in order to decrease the number
of roundtrips. And it uses caches. But all of this is mimited.

Tramp offers s special trace mode which shows you the external commands
it sends per primitive file operation. Call something like

--8<---------------cut here---------------start------------->8---
# emacs -Q --eval '(setq tramp-debug-command-messages t)' /ssh::
--8<---------------cut here---------------end--------------->8---

In the debug buffer, there are messages of level 4 (entering a primitive
file operation), level 5 (exiting the same operation), and level 6 (the
remote commands Tramp emits). Like

--8<---------------cut here---------------start------------->8---
12:11:26.513974 tramp-sh-handle-file-exists-p (4) # Running `(file-exists-p "/ssh:gandalf:/net/ford/albinus/Books.org")' ...
12:11:26.514344 tramp-send-command (6) # test -e /net/ford/albinus/Books.org 2>/dev/null; echo tramp_exit_status $?
12:11:26.530496 tramp-wait-for-regexp (6) #
tramp_exit_status 0
///fd26d4d0719c81d3c6e45f14adefee05#$
12:11:26.530742 tramp-sh-handle-file-exists-p (5) # Running `(file-exists-p "/ssh:gandalf:/net/ford/albinus/Books.org")' ... t
--8<---------------cut here---------------end--------------->8---

This is my tool to analyze. Several optimiztations have been performed
already, but there is still room for improvement, proposals/patches
welcome.

Best regards, Michael.





  reply	other threads:[~2024-05-15 10:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13  1:03 bug#70900: 30.0.50; tramp complains "File error: Cannot remove lock file for /ssh:..." on every save when remote-file-name-inhibit-locks is non-nil Dmitry Gutov
2024-05-13  5:56 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-13  6:54   ` Eli Zaretskii
2024-05-13  7:28     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-13 11:11       ` Dmitry Gutov
2024-05-15 10:20         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-13 11:30     ` Dmitry Gutov
2024-05-13 15:22       ` Eli Zaretskii
2024-05-13 22:31         ` Dmitry Gutov
2024-05-15 10:18           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-05-20  0:08             ` Dmitry Gutov
2024-05-13 11:30   ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttize5tb.fsf@gmx.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=70900@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.