all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Tino Calancha <tino.calancha@gmail.com>, 28834@debbugs.gnu.org
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)	[thread overview]
Message-ID: <329916c9-5a00-4460-83db-f16b98e79edb@default> (raw)
In-Reply-To: <87shel2f93.fsf@gmail.com>

> > I want to copy file from "d:/TEMP/test/test.txt" to nonexistent
> > directory "d:/TEMP/test/new/" with Dired
> > Copy ‘d:/TEMP/test/test.txt’ to ‘d:/TEMP/test/new/test.txt’ 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.
> 
> 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).





  parent reply	other threads:[~2017-10-15 15:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-14 10:54 bug#28834: 25.1; Dired+ not copy file to nonexistent directory alexei28
2017-10-14 15:50 ` Drew Adams
2017-10-15  4:42 ` bug#28834: 25.1; dired-do-copy: allow to copy into a " Tino Calancha
2017-10-15 14:21   ` Eli Zaretskii
2017-10-15 14:47     ` Tino Calancha
2017-10-15 15:43   ` Drew Adams [this message]
2017-10-16  3:47     ` Tino Calancha
2017-10-16 16:12       ` Eli Zaretskii
2017-10-17  4:49         ` Tino Calancha
2017-10-17 16:36           ` Eli Zaretskii
2017-10-21  4:13             ` Tino Calancha
2017-10-17  1:49       ` Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=329916c9-5a00-4460-83db-f16b98e79edb@default \
    --to=drew.adams@oracle.com \
    --cc=28834@debbugs.gnu.org \
    --cc=tino.calancha@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.