GNU bug report logs - #50142
27.1; Meaning of interactive specifier "f" unexpectedly depends on visited file

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Sat, 21 Aug 2021 08:49:02 UTC

Severity: normal

Tags: notabug

Found in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Markus Triska <triska <at> metalevel.at>
To: 50142 <at> debbugs.gnu.org
Subject: bug#50142: 27.1; Meaning of interactive specifier "f" unexpectedly depends on visited file
Date: Sat, 21 Aug 2021 10:40:18 +0200
Let ~/f.el consist of:

    (defun f (file)
      (interactive "fFile:")
      (message "The file is: %s" file))

When I start Emacs with:

    $ cd
    $ emacs -Q -l f.el

And then, in Emacs, do:

    M-x f RET RET

Then the echo area shows, as expected:

    The file is: ~/

In contrast, when I start Emacs with:

    $ emacs -Q -l f.el f.el

And then perform the same steps as above, i.e.,

    M-x f RET RET

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 key difference between the two cases is that in the second
invocation, f.el is visited, and in the first case it is not visited.

I noticed this difference when testing cdvdmacs, visiting cdvdmacs.el
and then trying to add the directory in which cdvdmacs.el resides to the
list of files and directories I want to archive, and unexpectedly adding
only the file itself (cdvdmacs.el) instead of the entire directory:

    https://www.metalevel.at/cdvdmacs/

Thank you and all the best,
Markus

In GNU Emacs 27.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars)
 of 2020-12-12 built on mt-macbook
Windowing system distributor 'The X.Org Foundation', version 11.0.11502000
System Description:  Mac OS X 10.11.3





This bug report was last modified 2 years and 269 days ago.

Previous Next


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