GNU bug report logs - #25653
25.1.91; buffer-file-name reports non-existing file

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Wed, 8 Feb 2017 09:01:02 UTC

Severity: minor

Tags: notabug, wontfix

Found in version 25.1.91

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25653 in the body.
You can then email your comments to 25653 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25653; Package emacs. (Wed, 08 Feb 2017 09:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Röhler <andreas.roehler <at> easy-emacs.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 08 Feb 2017 09:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.91; buffer-file-name reports non-existing file
Date: Wed, 8 Feb 2017 10:10:55 +0100
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.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25653; Package emacs. (Wed, 08 Feb 2017 14:37:01 GMT) Full text and rfc822 format available.

Message #8 received at 25653 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 25653 <at> debbugs.gnu.org
Subject: Re: bug#25653: 25.1.91; buffer-file-name reports non-existing file
Date: Wed, 08 Feb 2017 09:37:26 -0500
tags 25653 notabug
quit

Andreas Röhler <andreas.roehler <at> 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.




Added tag(s) notabug. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 08 Feb 2017 14:37:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25653; Package emacs. (Wed, 08 Feb 2017 17:42:01 GMT) Full text and rfc822 format available.

Message #13 received at 25653 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: npostavs <at> users.sourceforge.net
Cc: andreas.roehler <at> easy-emacs.de, 25653 <at> debbugs.gnu.org
Subject: Re: bug#25653: 25.1.91; buffer-file-name reports non-existing file
Date: Wed, 08 Feb 2017 19:41:16 +0200
> From: npostavs <at> users.sourceforge.net
> Date: Wed, 08 Feb 2017 09:37:26 -0500
> Cc: 25653 <at> 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.




Added tag(s) wontfix. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 09 Feb 2017 21:49:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 25653 <at> debbugs.gnu.org and Andreas Röhler <andreas.roehler <at> easy-emacs.de> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 09 Feb 2017 21:49:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 10 Mar 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.