Are you sure it comes from Tramp? Tramp temporary file names always start with "tramp.", see tramp-temp-name-prefix.
I have no idea where the temporary file is coming from. I just looked, and I saw the following in the Tramp debug log while editing file /etc/prometheus/prometheus.yml on the remote host with the sudo method: 09:21:30.798488 tramp-get-connection-property (7) # process-buffer nil; cache used: t 09:21:30.798673 tramp-set-file-property (8) # /etc/prometheus file-writable-p t 09:21:30.801179 tramp-get-file-property (8) # /etc/prometheus/tmpDKLdR4 file-truename undef; inhibit: 10; cache used: nil; cached at: nil Files like tmpDKLdR4 are only created when I save a modified file. That was the first mention of tmpDKLdR4 in the Tramp debug log. Maybe Emacs itself is creating the temporary file via Tramp. If so, do you know where that happens? I would then request the Emacs developers to change the temporary filename to something more recognisable.
That wouldn't be possible. An extension, like ".txt", must be kept.
It does not have to be exactly what I suggested. Anything that indicates Emacs Tramp and the related file would do, no matter whether the file extension gets shifted left or right. Regards, rdiez
