"R. Diez" <rdiez-2...@rd10.de> writes: Hi,
>> 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. You could do 'M-x debug-on-entry RET make-temp-file RET'. You'll see the backtrace then, every time make-temp-file is called. If it looks normal, type 'c'. Otherwise, show the backtrace her. > > 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. Sure. But I believe the current Tramp mechanism is sufficient. > Regards, > rdiez Best regards, Michael.