Subject: bug#50142: 27.1; Meaning of interactive specifier "f" unexpectedly depends on visited file

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 22 Aug 2022 15:52:33 +0200

Markus Triska <[email-masked]> writes:

> then the echo area unexpectedly shows:
>
>     The file is: ~/f.el
>
> This is unexpected, since the minibuffer prompt when doing M-x f RET
> shows: "File:~/" (as before), indicating that pressing RET would yield
> "~/", also as before, not "~/f.el".

The "f" interactive spec is basically `read-file-name'.  As the doc
string says:

---
  If DEFAULT-FILENAME is omitted or
nil, then if INITIAL is non-nil, the default is DIR combined with
INITIAL; otherwise, if the current buffer is visiting a file,
that file serves as the default; otherwise, the default is simply
the string inserted into the minibuffer.
---

Which is what you're seeing.

So this is working as intended (and in any case, we can't change this
long standing behaviour), and I'm therefore closing this bug report.