bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25653: 25.1.91; buffer-file-name reports non-existing file


From: Eli Zaretskii
Subject: bug#25653: 25.1.91; buffer-file-name reports non-existing file
Date: Wed, 08 Feb 2017 19:41:16 +0200

> From: address@hidden
> Date: Wed, 08 Feb 2017 09:37:26 -0500
> Cc: address@hidden
> 
> > Emacs -Q
> >
> > Open some non-existing foo.py
> >
> > Before saving
> >
> > M-x buffer-file-name RET reports PATH-to/foo.py as buffer-file-name.
> >
> > IMO buffer-file-name only should get a value different from nil, if
> > the buffer is connected with an existing file, as docu says:
> 
> > Return name of file BUFFER is visiting, or nil if none.
> 
> I disagree this is a bug, in `(emacs) Visiting' we see
> 
>    Successful visiting of any file, whether existing or not,
> 
> i.e., we can successfully visit a non-existing file.  Furthermore, the
> existence of a file can change asynchronously, so it's not really
> sensible to expect an Emacs variable to reflect that.  The state of
> "visiting" just means that Emacs will write the buffer contents out to
> the visited file when saved.

Indeed, this is a (long-standing) feature.





reply via email to

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