bug#81599: 30.2; Doc of `buffer-file-name'

"Drew Adams" <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Neither the doc string nor the Elisp manual entry says what form of file
name is used.  It should say (it seems) that the expanded absolute file
name is returned.  This way, users will know that (1) the name is
absolute, not relative, and (2) if they want it abbreviated then they
need to use `abbreviate-file-name'.

Contrast this with the manual entry for `buffer-file-truename', which
states that the returned name is abbreviated.  And it even links to the
manual pages for Truenames and `abbreviate-file-name'.

The manual node for this, `Buffer File Name', does say this:

 "Most of the time, the buffer name is the same as the nondirectory part
  of the buffer file name, but the buffer file name and the buffer name
  are distinct and can be set independently."

From that one could surmise that the buffer file name has more than a
nondirectory part.  And the examples given show expanded absolute names.
But it's still important for the doc of the function and the variable to
be explicit about what form of file name is used.


In GNU Emacs 30.2 (build 2, x86_64-w64-mingw32) of 2025-08-14 built on
 AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.26200
System Description: Microsoft Windows 10 Home (v10.0.2009.26200.9168)

Configured using:
 'configure --with-modules --without-dbus --with-native-compilation=aot
 --without-compress-install --with-tree-sitter CFLAGS=-O2
 prefix=/g/rel/install-emacs-30.2'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB

(NATIVE_COMP present but libgccjit not available)

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.