From: "Luis O. Silva" <l.o.silva@mail.ru>
Subject: Re: Creating a directory target for dired-do-copy
Date: Sun, 30 Jan 2005 12:17:25 -0600 [thread overview]
Message-ID: <16893.9397.851618.136556@mmyn404.iimas.unam.mx> (raw)
In-Reply-To: <35v2tbF4ok485U1@individual.net>
Thank you for your message (Fri, 28 Jan 2005 08:09:26 -0700),
in which, among other things, you wrote[1]:
KR> Could it be as simple as;
KR> (defadvice dired-mark-read-file-name (after make-directory activate)
KR> "Create non-existent directories for the result, as necessary.
KR> If the returned file name is a directory name (e.g. ends in slash on Unix),
KR> create it."
KR> (let ((directory (file-name-directory ad-return-value)))
KR> (unless (file-directory-p directory)
KR> (make-directory directory t)))
KR> (when (equal (file-name-as-directory ad-return-value) ad-return-value)
KR> (make-directory ad-return-value)))
I'm very grateful for your help, unfortunately it doesn't work
for me. I put the previous snippet in my .emacs file and, after
reloading, I typed `C' within dired. Then in the minibuffer I
typed after Copy [-p] file-test to:
~/temporary/non-existing-file/
where non-existing-file is a non-existing file. Emacs says
File exists: /home/silva/temporary/non-existing-file/
Actually after loading the snippet, Emacs says the same even
for an existing directory!
I tried to correct the code, but it seems that I don't
understand it. Any hint will be enormously appreciated.
Best regards,
luis
Footnotes:
[1] The excerpts of your message are prefixed by "KR>".
--
Luis Octavio Silva Pereyra.
IIMAS-UNAM
Depto. de Métodos Matemáticos y Numéricos
Apdo. postal 20-726
01000 México, D.F.
next prev parent reply other threads:[~2005-01-30 18:17 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 [this message]
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16893.9397.851618.136556@mmyn404.iimas.unam.mx \
--to=l.o.silva@mail.ru \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).