|
From: | Mark Geary |
Subject: | Re: How do I debug this? |
Date: | Thu, 7 Sep 2017 16:08:14 -0400 (EDT) |
User-agent: | Alpine 2.21 (BSF 202 2017-01-01) |
On Wed, 6 Sep 2017, Michael Albinus wrote:
Mark Geary <address@hidden> writes:I gues there is another thing which isn't exactly a problem, but is an annoyance. When I'm editing a file on the FreeBSD machine. I fequently get messages [falsely] warning me that the file has changed on the remote host. This happened with both Emacs 23.1.1 and now with 25.2. I don't think I see this when connecting to any other machine. How does Tramp check this, and do you have any ideas why it might be reporting false positives?Hard to say, needs to debug. Emacs checks permanently, whether the associated file of a buffer has been modified from external. This is done by verify-visited-file-modtime, one needs to follow this function. If you have time, on a rainy Friday afternoon, you might want to might call "M-x trace-function RET verify-visited-file-modtime RET" and follow what happens. Likely, you need also to trace other related functions as well.
I suppose there is more than one cause of the false positives. One case is where the ssh connection drops. When I update emacs's local copy of the file, Tramp re-creates the connection to the remote machine and tries to check the file's stats. But Tramp doesn't always re-create the tramp_perl_file_attributes shell function. I've attached the relevant of the debug buffer. At the beginning Tramp detects the connection has dropped. At the end, tramp tries to use tramp_perl_file_attributes, which fails because it wasn't re-defined after the re-connection. There seem to be other cases where the false positive occurs which I am still considering. Mark Geary -- Fifty-four Forty or Fight!
tramp-stat-error
Description: tramp-stat-error
[Prev in Thread] | Current Thread | [Next in Thread] |