all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6363: dired-create-directory doesn't say anything if directory already exists
@ 2010-06-06 13:18 jidanni
  2010-06-07  1:26 ` Stefan Monnier
  2010-06-07  1:51 ` jidanni
  0 siblings, 2 replies; 4+ messages in thread
From: jidanni @ 2010-06-06 13:18 UTC (permalink / raw)
  To: 6363

Try this, oh five times.
(dired-create-directory "/media/")

Yup, if the directory already exists, there is no error. Nothing.
Nor does the docstring say what the deal is.
emacs-version "24.0.50.1"





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6363: dired-create-directory doesn't say anything if directory already exists
  2010-06-06 13:18 bug#6363: dired-create-directory doesn't say anything if directory already exists jidanni
@ 2010-06-07  1:26 ` Stefan Monnier
  2010-06-07  1:51 ` jidanni
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2010-06-07  1:26 UTC (permalink / raw)
  To: jidanni; +Cc: 6363

> Try this, oh five times.
> (dired-create-directory "/media/")
> Yup, if the directory already exists, there is no error. Nothing.

Why is that a problem?


        Stefan





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6363: dired-create-directory doesn't say anything if directory already exists
  2010-06-06 13:18 bug#6363: dired-create-directory doesn't say anything if directory already exists jidanni
  2010-06-07  1:26 ` Stefan Monnier
@ 2010-06-07  1:51 ` jidanni
  2010-06-07 18:12   ` Juri Linkov
  1 sibling, 1 reply; 4+ messages in thread
From: jidanni @ 2010-06-07  1:51 UTC (permalink / raw)
  To: monnier; +Cc: 6363

>>>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Try this, oh five times.
>> (dired-create-directory "/media/")
>> Yup, if the directory already exists, there is no error. Nothing.

SM> Why is that a problem?

Because it is an interactive command.
One wants proper

$ mkdir /media/
mkdir: cannot create directory `/media/': File exists

interactive feedback.

If you want -p style action, add an option and document it.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6363: dired-create-directory doesn't say anything if directory already exists
  2010-06-07  1:51 ` jidanni
@ 2010-06-07 18:12   ` Juri Linkov
  0 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2010-06-07 18:12 UTC (permalink / raw)
  To: jidanni; +Cc: 6363

>>> Try this, oh five times.
>>> (dired-create-directory "/media/")
>>> Yup, if the directory already exists, there is no error. Nothing.
>
> SM> Why is that a problem?
>
> Because it is an interactive command.
> One wants proper
>
> $ mkdir /media/
> mkdir: cannot create directory `/media/': File exists
>
> interactive feedback.
>
> If you want -p style action, add an option and document it.

Maybe the problem is that `make-directory' doesn't signal an error
when PARENTS is set?  The docstring of `make-directory' says:

  If DIR already exists as a directory, signal an error, unless PARENTS is set.

And `dired-create-directory' calls `make-directory' with PARENTS=t.

-- 
Juri Linkov
http://www.jurta.org/emacs/





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-07 18:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-06 13:18 bug#6363: dired-create-directory doesn't say anything if directory already exists jidanni
2010-06-07  1:26 ` Stefan Monnier
2010-06-07  1:51 ` jidanni
2010-06-07 18:12   ` Juri Linkov

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.