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 15:48:02 +0200 Message-ID: <83wo9z8lt9.fsf@gnu.org> References: <87eew8z6js.fsf@calancha-pc.dy.bbexcite.jp> <837e1zagqh.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="92921"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 39057@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 10 14:55:27 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 1ipuf9-000yz5-MQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jan 2020 14:49:19 +0100 Original-Received: from localhost ([::1]:45666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipuf8-0004ay-HW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jan 2020 08:49:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58171) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipuew-0004aH-Me for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2020 08:49:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipuet-0003M4-2q for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2020 08:49:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47827) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipues-0003LF-ID for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2020 08:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ipues-0006jB-DL for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2020 08:49:02 -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 13:49:02 +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.157866409225758 (code B ref 39057); Fri, 10 Jan 2020 13:49:02 +0000 Original-Received: (at 39057) by debbugs.gnu.org; 10 Jan 2020 13:48:12 +0000 Original-Received: from localhost ([127.0.0.1]:53800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipue3-0006hM-Jk for submit@debbugs.gnu.org; Fri, 10 Jan 2020 08:48:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipue2-0006h7-57 for 39057@debbugs.gnu.org; Fri, 10 Jan 2020 08:48:10 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ipudw-0000B6-U3; Fri, 10 Jan 2020 08:48:04 -0500 Original-Received: from [176.228.60.248] (port=1772 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ipudw-0004KD-0K; Fri, 10 Jan 2020 08:48:04 -0500 In-reply-to: (message from Tino Calancha on Fri, 10 Jan 2020 12:55:59 +0100 (CET)) 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:174436 Archived-At: > From: Tino Calancha > Date: Fri, 10 Jan 2020 12:55:59 +0100 (CET) > cc: Tino Calancha , 39057@debbugs.gnu.org > > > I cannot reproduce this, so there must be more here than meets the > > eye > > So please step through the code and tell where it fails and why. > > It seems NEWNAME, i.e., the second argument seeing by `copy-file' might be different > when called interactively; this is true even if the user introduces the > same value. > > 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? > Since you cannot reproduce the issue, it might be platform dependent. > I am able to reproduce it in this nice site, which runs Emacs 26.3 in a linux machine: > https://repl.it/languages/elisp I couldn't reproduce on GNU/Linux either. > M-! touch /tmp/foo RET > M-x copy-file RET /tmp/foo RET RET > ;; received prompt > ;; FILE /home/runner already exists; copy to it anyway? (yes or no) This is a different use case.