Subject: bug#57800: TRAMP insert-file-contents now fails for regions

From: Paul Pogonyshev <[email-masked]>
Date: Fri, 30 Sep 2022 20:52:00 +0200

Yes, that fixes the problem. Does that mean I somehow have a mixup of
sources from different commits (not sure how) or that the cache is
persistent and can survive long times? Note that I also run Emacs 28 from
time to time. Could it be that 29 reuses cache created by 28 that contains
no-longer-compatible values?

Paul

On Fri, 30 Sept 2022 at 20:39, Michael Albinus <[email-masked]>
wrote:

> Paul Pogonyshev <[email-masked]> writes:
>
> Hi Paul,
>
> > Happened again. See attached `BACKTRACE' and `TRAMP-LOG' generated
> > after evalling `(setf tramp-verbose 10)'.
>
> I guess you mean setq.
>
> > Note this suspicious entry in the log:
> > 10:26:36.864700 tramp-get-remote-tmpdir (1) # File error: Directory
> > /ssh:USER@HOST#22222:/ssh:USER@HOST#22222:/tmp not accessible
>
> Yes. And the debug buffer shows us
>
> --8<---------------cut here---------------start------------->8---
> > ;; Emacs: 29.0.50 Tramp: 2.6.0-pre -*- mode: outline; coding: utf-8; -*-
> > ;; Location: /usr/local/share/emacs/29.0.50/lisp/net/tramp.elc Git:
> master/5fd8e1cc49d2ebd59219ddf3a691949a22b601f3
> > 10:26:36.638086 tramp-handle-insert-file-contents (3) # Inserting
> ‘/ssh:USER@HOST#22222:/PATH’...
> > 10:26:36.639033 tramp-get-connection-property (7) # remote-tmpdir undef;
> cache used: nil
> > 10:26:36.639200 tramp-get-connection-property (7) # tmpdir /ssh:USER@HOST#22222:/tmp;
> cache used: t
> > 10:26:36.639335 tramp-get-connection-property (7) # tmpdir /ssh:USER@HOST#22222:/tmp;
> cache used: t
> --8<---------------cut here---------------end--------------->8---
>
> The value of of "tmpdir" is completely wrong, it must be something like
> "/tmp" or so. Tramp doesn't set this connection property anymore; it
> takes it from tramp-methods if declared there.
>
> It was set like this prior commit 9ea40b3ddfb of 2022-08-15, likely your
> cache did offer this old value. Could you pls apply "M-x
> tramp-cleanup-all-connections" in order to clean up the connection
> cache, and retry your test?
>
> Best regards, Michael.
>