unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Cardaci <cyrus.and@gmail.com>
To: 32274@debbugs.gnu.org
Subject: bug#32274: (interactive "F") silently expands a directory to the current buffer's path
Date: Thu, 26 Jul 2018 00:26:17 +0200	[thread overview]
Message-ID: <CACMsj9O8cNDSHy0jUmpMTELNdQUcFvt4sFZfc1KuY_3VN8WoRg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

The value returned by (interactive "F") is not the one provided by the user.

1. Create a file, say /tmp/foo.el:

(defun foo (path)
  (interactive "F")
  (message path))

2. M-x evaluate-buffer

3. M-x foo and chose /tmp/.

The value presented in the echo area is /tmp/foo.el, this is undesirable
and very dangerous IMHO. It happens with both Emacs 24 and 26.

Is this a bug or I'm overlooking something?


Andrea

[-- Attachment #2: Type: text/html, Size: 1311 bytes --]

             reply	other threads:[~2018-07-25 22:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 22:26 Andrea Cardaci [this message]
2018-07-25 22:49 ` bug#32274: (interactive "F") silently expands a directory to the current buffer's path Noam Postavsky
2018-07-25 23:39   ` Andrea Cardaci
2018-07-26  0:46     ` Noam Postavsky
2018-07-26 11:46       ` Andrea Cardaci

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=CACMsj9O8cNDSHy0jUmpMTELNdQUcFvt4sFZfc1KuY_3VN8WoRg@mail.gmail.com \
    --to=cyrus.and@gmail.com \
    --cc=32274@debbugs.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).