Michael Albinus <[email protected]> wrote: > Michael Albinus <[email protected]> writes: > > Hi Stephen, > > >> If I open a non-existent file, e.g., > >> /sshfs:otherhost:/tmp/newfile > >> The following gets logged to *Messages* > >> File is missing: Opening input file No such file or directory > /tmp/tramp.sshfs.otherhost/tmp/newfile > >> and the buffer is shown as editing the local file > >> /tmp/tramp.sshfs.otherhost/tmp/newfile > > > > This happens for other methods as well, like /ssh:otherhost:/tmp/newfile. > > It is a bug, I will work on this, > > I've pushed a fix for this to the emacs-28 branch.
The fix does indeed suppress the error messages. But it does not change that Emacs forgets that the new file is a remote file. Find file /sshfs:otherhost:/tmp/newfile (buffer-file-name) => "/tmp/tramp.sshfs.otherhost/tmp/newfile" (file-remote-p (buffer-file-name)) => nil Find file /sshfs:otherhost:/tmp/oldfile (buffer-file-name) => "/sshfs:otherhost:/tmp/oldfile" (file-remote-p (buffer-file-name)) => "/sshfs:otherhost:"
