The trouble is, the manual does not say what the predefined value for such
connections are.
The default value is 300 seconds. You're right, the manual shall
mention it.
I've checked the Tramp manual. It speaks about the 5 minutes session
timeout in (info "(tramp) Inline methods") , item ‘sudo’.
OK, thanks. I missed it because, if you search the Internet for "tramp connection
timeout", you tend to land on this page:
https://www.gnu.org/software/emacs/manual/html_node/tramp/Predefined-connection-information.html
That page states:
-------8<-------8<-------8<-------
"session-timeout"
All tramp-sh.el based methods accept the property "session-timeout". This is
the time (in seconds) after a connection is disabled for security reasons, and must be
reestablished. A value of nil disables this feature. Most of the methods do not set this
property except the sudo, doas and run0 methods, which use predefined values.
-------8<-------8<-------8<-------
It does not say "which use the predefined values documented in the Inline Methods
section", and you wouldn't normally think of searching further in the documentation.
While you do have a point, that the documentation does include that piece of
information, I would add a reference, or duplicate the information, right at
the point where the user would expect to find it.
Its value is (("/sshfs:" "direct-async-process" t))
Original value was nil
This is a deprecated setting in Tramp 2.7. Pls ignore; it doesn't harm.
OK, thanks for the hint.
I actually have Tramp 2.8.0.1 installed on Emacs 29. If that setting was
deprecated in Tramp 2.7, is there a reason why it is still there?
If I do customize-variable, tramp-connection-properties, then it states "CHANGED
outside Customize".
Yes, due to the setting in Tramp.
Is that the right behaviour? If that is a user-customisable setting, and I haven't set it
in my init code, it shouldn't say "CHANGED outside Customize", should it?
Or am I missing something? I am not actually an Emacs expert by any means.
Note also the wrong new-line character after "‘killed".
This comes from the process sentinel, nothing relevant for Tramp. Ignore it.
I would sanitise such external messages before writing them to the log, so that
they do not break the log format. In the past, I have converted non-printable
characters to \t or \n to that effect.
But it is a minor point indeed.
[...]
If you want to see timestamps, the Tramp debug buffer is the way to
go. If it doesn't work proper for you, we must investigate.
[...]
I've prepared a patch, see appended. It is on top of Tramp 2.8.0.1 from GNU
ELPA, which you must install first. Could you, pls, check?
I'll add the investigation and the testing to my to-do list. However, my Emacs
skills are not that great, and I have already invested quite a lot of time into
these peripheral issues, so I cannot promise that I will carry on with it after
this message.
In case it helps other people in the future, this is how I worked around this
Tramp issue:
1) This prevents the annoying constant prompting:
(setq remote-file-name-inhibit-locks t)
2) This command you suggested did work:
(add-to-list 'tramp-connection-properties
(list (regexp-quote "/sudo:")
"session-timeout" nil))
The only gotcha is that, after running it once, closing and reopening the only
Tramp file I was editing still timed out the connection. I restarted Emacs, and
then the connection did not time out anymore.
Best regards,
rdiez