From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39057: 27.0.60; copy-file interactive VS from lisp disagreement Date: Fri, 10 Jan 2020 16:12:37 +0200 Message-ID: <83v9pj8koa.fsf@gnu.org> References: <87eew8z6js.fsf@calancha-pc.dy.bbexcite.jp> <837e1zagqh.fsf@gnu.org> <83wo9z8lt9.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="83278"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 39057@debbugs.gnu.org To: tino.calancha@gmail.com, Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 10 15:14:20 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ipv2I-0008xT-4z for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jan 2020 15:13:14 +0100 Original-Received: from localhost ([::1]:45996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipv2G-0008Ol-JA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jan 2020 09:13:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59068) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipv27-0008Mh-0D for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2020 09:13:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipv25-0007yy-WD for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2020 09:13:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47844) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipv25-0007xw-R3 for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2020 09:13:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ipv25-0007RR-Ls for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2020 09:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jan 2020 14:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39057 X-GNU-PR-Package: emacs Original-Received: via spool by 39057-submit@debbugs.gnu.org id=B39057.157866556628582 (code B ref 39057); Fri, 10 Jan 2020 14:13:01 +0000 Original-Received: (at 39057) by debbugs.gnu.org; 10 Jan 2020 14:12:46 +0000 Original-Received: from localhost ([127.0.0.1]:53817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipv1q-0007Qw-9Q for submit@debbugs.gnu.org; Fri, 10 Jan 2020 09:12:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipv1o-0007Qk-SA for 39057@debbugs.gnu.org; Fri, 10 Jan 2020 09:12:45 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ipv1j-0006mK-GS; Fri, 10 Jan 2020 09:12:39 -0500 Original-Received: from [176.228.60.248] (port=3262 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ipv1i-0000qN-4n; Fri, 10 Jan 2020 09:12:38 -0500 In-reply-to: <83wo9z8lt9.fsf@gnu.org> (message from Eli Zaretskii on Fri, 10 Jan 2020 15:48:02 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174438 Archived-At: > Date: Fri, 10 Jan 2020 15:48:02 +0200 > From: Eli Zaretskii > Cc: 39057@debbugs.gnu.org > > > I have printed out newname before the line > > newname = expand_cp_target (file, newname); > > at src/fileio.c > > > > I) > > M-: (copy-file "/tmp/foo" "~/") RET > > ;; it shows "~/" as expected > > > > II) > > M-x: copy-file RET /tmp/foo RET ~/ RET > > ;; it shows "~" (the '/' is missing) > > Why would it be missing? which code removes it, if you typed it? Answering myself: this is a problem with completion routines: when the user types a file name that is exactly identical to the default (or just presses RET, which is the same), then the completion code in read-file-name-internal returns a value that has the trailing slash stripped. And we now require a trailing slash to recognize NEWNAME as a directory. Maybe Stefan can help us out here.