all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#25653: 25.1.91; buffer-file-name reports non-existing file
@ 2017-02-08  9:10 Andreas Röhler
  2017-02-08 14:37 ` npostavs
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Röhler @ 2017-02-08  9:10 UTC (permalink / raw)
  To: 25653

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.







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#25653: 25.1.91; buffer-file-name reports non-existing file
  2017-02-08  9:10 bug#25653: 25.1.91; buffer-file-name reports non-existing file Andreas Röhler
@ 2017-02-08 14:37 ` npostavs
  2017-02-08 17:41   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: npostavs @ 2017-02-08 14:37 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: 25653

tags 25653 notabug
quit

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> 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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#25653: 25.1.91; buffer-file-name reports non-existing file
  2017-02-08 14:37 ` npostavs
@ 2017-02-08 17:41   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2017-02-08 17:41 UTC (permalink / raw)
  To: npostavs; +Cc: 25653

> From: npostavs@users.sourceforge.net
> Date: Wed, 08 Feb 2017 09:37:26 -0500
> Cc: 25653@debbugs.gnu.org
> 
> > 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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-08 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08  9:10 bug#25653: 25.1.91; buffer-file-name reports non-existing file Andreas Röhler
2017-02-08 14:37 ` npostavs
2017-02-08 17:41   ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.