From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#32274: (interactive "F") silently expands a directory to the current buffer's path Date: Wed, 25 Jul 2018 18:49:14 -0400 Message-ID: <877elj3p91.fsf@gmail.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1532558888 25219 195.159.176.226 (25 Jul 2018 22:48:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2018 22:48:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 32274@debbugs.gnu.org To: Andrea Cardaci Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 26 00:48:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiSZf-0006SW-Uk for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Jul 2018 00:48:04 +0200 Original-Received: from localhost ([::1]:56545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiSbm-0007OL-QF for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jul 2018 18:50:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiSbd-0007Lo-T9 for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 18:50:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiSba-0006Xc-UX for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 18:50:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fiSba-0006XL-Oh for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 18:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fiSba-0004ZL-F4 for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 18:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jul 2018 22:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32274 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32274-submit@debbugs.gnu.org id=B32274.153255896417510 (code B ref 32274); Wed, 25 Jul 2018 22:50:02 +0000 Original-Received: (at 32274) by debbugs.gnu.org; 25 Jul 2018 22:49:24 +0000 Original-Received: from localhost ([127.0.0.1]:57819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiSax-0004YL-0x for submit@debbugs.gnu.org; Wed, 25 Jul 2018 18:49:24 -0400 Original-Received: from mail-it0-f51.google.com ([209.85.214.51]:39553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiSav-0004Y6-Vv for 32274@debbugs.gnu.org; Wed, 25 Jul 2018 18:49:22 -0400 Original-Received: by mail-it0-f51.google.com with SMTP id g141-v6so121469ita.4 for <32274@debbugs.gnu.org>; Wed, 25 Jul 2018 15:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lwLEKrnE71/vtkye8x+Yo2FVZfpVLwxfIr4ftnNH/hs=; b=WT1vorp3V0wgdN8xxtN8pPJM+GOkw+0hyEma4cxZsjgZF4LJfrJzbXb7YN0emdARHE xf23MGSfbnKvgHQjEjs4zlwa2oFFmhYo6PDbrYc+VXDC2aa4ixqSlT/44Shrwha1dmH9 I45c9iENIom48i3ndJ6XH7YFW9lwXxRsza14uVoreR2rBbs+zqcZo5bktvm88W5K0VPE CoFZfvjAIy5Nmo6NOyQEELPU1Qh8YsXGefPYcVkAqJqNkHqcqzRIzSU5hulHTlGMcbqI sXa6gcHIXshXGSCJY//nqj3xUe4BJerbYhfBSDkLyIfR9QalCgKj/C/RfW8DpadRVSXm /V3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=lwLEKrnE71/vtkye8x+Yo2FVZfpVLwxfIr4ftnNH/hs=; b=A1gpkYviWmfC64r3M80czc8aTHIN6jU5RD50MFybTJGL/SyO1OpcjQu01k/dJqDCAw 7zjXnokZd5XiwDAkayvGccedyNk/UcjgvoZn6asWi7wz+X4uPA/Jben4hg9S0T5ZEqWP 1tvTD9C75AaJY1BqD/pr1m5EK7AWqGpCBTGS0jc+jsFFeQt7OEATOslclgplhYdvlNZ3 Eeixd936hMP9bkN5SFYU9AhIL+o2Sb3bYdF9Qwsp1tBVr9B1u+8VX/q+nEdwO8mNxaku TaCBI+H9rT36m4mL/uBP2WxK8js5eeBNP8Ks2oRSObwhp9NogsvT2JM2pWAbyKlsgFzR O7PQ== X-Gm-Message-State: AOUpUlFO2iw5SbpIUF50DMEHYZLR0Lcla8H0K+N1DEl4ttVEkcO/vyMH MXyaAxgy7hxYLUrsgQJv1H8AmKgR X-Google-Smtp-Source: AAOMgpeZiE4htRgur5JZ6erBQqPvT7rViR3MFBnQtz10zdlrnT3krjhvLHiqSpCmNTI03neaiCXFHg== X-Received: by 2002:a24:6c04:: with SMTP id w4-v6mr7804092itb.4.1532558956293; Wed, 25 Jul 2018 15:49:16 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id c141-v6sm5357912itc.42.2018.07.25.15.49.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 15:49:15 -0700 (PDT) In-Reply-To: (Andrea Cardaci's message of "Thu, 26 Jul 2018 00:26:17 +0200") X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148939 Archived-At: Andrea Cardaci writes: > 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? "F" calls read-file-name, passing nil for all args: DEFAULT-FILENAME specifies the default file name to return if the user exits the minibuffer with the same non-empty string inserted by this function [...] If DEFAULT-FILENAME is omitted or nil [...] if the current buffer is visiting a file, that file serves as the default [...] So it seems to be on purpose.