[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new file is not seen as remote

From: Stephen Gildea
Subject: new file is not seen as remote
Date: Sun, 03 Oct 2021 07:37:42 -0700

Michael Albinus <> wrote:

>   Michael Albinus <> 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:"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]