all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Creating a directory target for dired-do-copy
Date: Wed, 02 Feb 2005 09:30:46 -0700	[thread overview]
Message-ID: <36cdhoF4ve97gU1@individual.net> (raw)
In-Reply-To: <mailman.178.1107188275.2841.help-gnu-emacs@gnu.org>

Luis O. Silva wrote:
 > On Sun, 30 Jan 2005 12:17:25 -0600, "Luis O. Silva" 
<l.o.silva@mail.ru> said:
 >
 >    LS> I'm very grateful for your help, unfortunately it
 >    LS> doesn't work for me. I put the previous snippet in my
 >    LS> .emacs file and, after reloading, I typed `C' within
 >    LS> dired. Then in the minibuffer I typed after Copy [-p]
 >    LS> file-test to:
 >
 >    LS>  ~/temporary/non-existing-file/
 >
 > Sorry for answering my own post, but it was written
 > incorrectly.
 >
 >    LS> where non-existing-file is a non-existing file.
 >
 > Here I mean non-existing directory.

Right, I'd guessed that.

 >    LS>  Emacs says
 >
 >    LS> File exists: /home/silva/temporary/non-existing-file/
 >
 >    LS> Actually after loading the snippet, Emacs says the
 >    LS> same even for an existing directory!
 >
 >    LS> I tried to correct the code, but it seems that I
 >    LS> don't understand it. Any hint will be enormously
 >    LS> appreciated.

It turns out the code tries to be too smart and do too much.  Just
delete the second form in the advice (and the second sentence of its doc
string), leaving:

(defadvice dired-mark-read-file-name (after make-directory activate)
   "Create non-existent directories for the result, as necessary."
   (let ((directory (file-name-directory ad-return-value)))
     (unless (file-directory-p directory)
       (make-directory directory t))))

-- 
Kevin Rodgers

  parent reply	other threads:[~2005-02-02 16:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.14988.1106600827.27204.help-gnu-emacs@gnu.org>
2005-01-28 15:09 ` Creating a directory target for dired-do-copy Kevin Rodgers
2005-01-30 18:17   ` Luis O. Silva
2005-01-31 17:07     ` Luis O. Silva
     [not found]     ` <mailman.178.1107188275.2841.help-gnu-emacs@gnu.org>
2005-02-02 16:30       ` Kevin Rodgers [this message]
2005-02-03 22:06         ` Luis O. Silva
2005-01-24 21:32 Luis O. Silva

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=36cdhoF4ve97gU1@individual.net \
    --to=ihs_4664@yahoo.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.