unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: find-file-visit-truename
Date: Mon, 29 May 2023 16:04:51 +0300	[thread overview]
Message-ID: <83mt1ngufg.fsf@gnu.org> (raw)
In-Reply-To: <CAJcAo8vO8Z9FS8q+KhbrOCydOnnma_9+4SdsSVWvX1ir4beWdw@mail.gmail.com> (message from Samuel Wales on Sun, 28 May 2023 21:15:09 -0700)

> From: Samuel Wales <samologist@gmail.com>
> Date: Sun, 28 May 2023 21:15:09 -0700
> 
> i have had find-file-visit-truename set to t forever.  it used to
> work.  i still have it set to t.
> 
> however, in 27.1, it does not work as i expect.
> 
> here is what i expect:
> 
> - a is a symlink that points to real file b
> - i find-file a
> - real file b shows in mode line buffer identification
> - other stuff like echo area notifications and more
> 
> here is what occurs
> 
> - mode line buffer identification shows symlink a <-- bug

The doc string of find-file-visit-truename says:

  Non-nil means visiting a file uses its truename as the visited-file name.
  That is, the buffer visiting the file has the truename as the
  value of ‘buffer-file-name’.

And the Emacs manual says:

     If the variable ‘find-file-visit-truename’ is non-‘nil’, then the
  file name recorded for a buffer is the file’s “truename” (made by
  replacing all symbolic links with their target names), rather than the
  name you specify.

Note that both speak about the _file_ name recorded for a buffer.

By contrast, the default mode line shows the _buffer_ name, not the
_file_ name.  If you want to see the file name, you need to customize
mode-line-buffer-identification to show that; by default it uses %b,
which shows the buffer name.  I suspect that this is how it used to
work for you in previous versions of Emacs, since the code which shows
the buffer identification on the mode line hasn't changed in decades.



  reply	other threads:[~2023-05-29 13:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29  4:15 find-file-visit-truename Samuel Wales
2023-05-29 13:04 ` Eli Zaretskii [this message]
2023-05-31  4:51   ` find-file-visit-truename Samuel Wales
2023-05-31  5:43     ` find-file-visit-truename Samuel Wales
2023-05-31 12:03     ` find-file-visit-truename 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83mt1ngufg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).