all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: 25653@debbugs.gnu.org
Subject: bug#25653: 25.1.91; buffer-file-name reports non-existing file
Date: Wed, 08 Feb 2017 09:37:26 -0500	[thread overview]
Message-ID: <87shnon3yx.fsf@users.sourceforge.net> (raw)
In-Reply-To: <dd2f3967-256c-0c50-0194-94ee272cd18f@easy-emacs.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6hler\=22's\?\= message of "Wed, 8 Feb 2017 10:10:55 +0100")

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.





  reply	other threads:[~2017-02-08 14:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-02-08 17:41   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shnon3yx.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=25653@debbugs.gnu.org \
    --cc=andreas.roehler@easy-emacs.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.