From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#28834: 25.1; dired-do-copy: allow to copy into a nonexistent directory Date: Sun, 15 Oct 2017 08:43:32 -0700 (PDT) Message-ID: <329916c9-5a00-4460-83db-f16b98e79edb@default> References: <006201d344da$d9316a50$8b943ef0$@gmail.com> <87shel2f93.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508082260 16784 195.159.176.226 (15 Oct 2017 15:44:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Oct 2017 15:44:20 +0000 (UTC) To: Tino Calancha , 28834@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 15 17:44:16 2017 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 1e3l5C-0002gi-Dy for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Oct 2017 17:44:06 +0200 Original-Received: from localhost ([::1]:57610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3l5J-00059l-V3 for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Oct 2017 11:44:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3l5B-00059R-RM for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 11:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3l58-00071g-OE for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 11:44:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33136) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e3l58-00071H-KJ for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 11:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e3l58-0001hw-A9 for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 11:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Oct 2017 15:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28834 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28834-submit@debbugs.gnu.org id=B28834.15080822226526 (code B ref 28834); Sun, 15 Oct 2017 15:44:02 +0000 Original-Received: (at 28834) by debbugs.gnu.org; 15 Oct 2017 15:43:42 +0000 Original-Received: from localhost ([127.0.0.1]:41817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3l4o-0001hC-38 for submit@debbugs.gnu.org; Sun, 15 Oct 2017 11:43:42 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:36902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3l4m-0001gv-52 for 28834@debbugs.gnu.org; Sun, 15 Oct 2017 11:43:40 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9FFhXJH006408 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 15 Oct 2017 15:43:34 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9FFhXZh022553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 15 Oct 2017 15:43:33 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v9FFhXMP026751; Sun, 15 Oct 2017 15:43:33 GMT In-Reply-To: <87shel2f93.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] 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: 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:138466 Archived-At: > > I want to copy file from "d:/TEMP/test/test.txt" to nonexistent > > directory "d:/TEMP/test/new/" with Dired > > Copy =E2=80=98d:/TEMP/test/test.txt=E2=80=99 to =E2=80=98d:/TEMP/test/n= ew/test.txt=E2=80=99 failed: > > > > (file-error Copying file Operation not permitted d:/TEMP/test/test.txt > d:/TEMP/test/new/test.txt) > > > > It would be good if Emacs can autocreate not exist directory when > > copy/move files. >=20 > It might has sense that Dired handle the creation of those destination > dirs. WDOT? The enhancement request is "It would be good if Emacs CAN autocreate not exist directory when copy/move files." The operative word here is "CAN". A change to _always_ create missing dirs would be inappropriate. (I have not looked at your patch in detail.) It is important that Dired not just create dirs on its own, especially since that would be an incompatible behavior change, and also because it would mean also creating "missing dirs" as a result of a user making a typing mistake. At the very least, users should be able to control this by way of confirming. What should be done is to offer users the POSSIBILITY of having Dired create the missing directories. This can be done in various ways: 1. Have a different command, which users can bind in place of the existing command. 2. Have a user option that controls whether Dired creates missing dirs by default, i.e., without confirmation. 3. Have Dired ask whether to create missing directories. I think probably 2+3 would be good: have Dired prompt when dirs are missing, but have an option that lets users who never want to be prompted bypass prompting. The option could be 3-valued: `always-prompt', `always-create', `never-create' (or other names).