From: Lars Ingebrigtsen <larsi@gnus.org>
To: Nick Helm <nick@tenpoint.co.nz>
Cc: 38707@debbugs.gnu.org
Subject: bug#38707: dired-do-rename doesn't check for "/" !
Date: Thu, 06 Aug 2020 12:13:48 +0200 [thread overview]
Message-ID: <87wo2cdqub.fsf@gnus.org> (raw)
In-Reply-To: <m2fthawdmg.fsf@tenpoint.co.nz> (Nick Helm's message of "Tue, 24 Dec 2019 17:28:55 +1300")
Nick Helm <nick@tenpoint.co.nz> writes:
> Dired could check for and issue an error in the case where the source is
> a file and the target appears to be a non-existent directory. Something
> like this perhaps?
[...]
> + (if (and (not (file-directory-p (car fn-list)))
> + (not (file-directory-p target))
> + (directory-name-p target))
> + (error "%s: Target directory does not exist: %s" operation target))
I think this makes sense, so I've applied it to Emacs 28.1. However, it
is a slight behavioural change -- previously you could enter, say
"/tmp/bar/" (when moving one file), and it would move the file to the
file "/tmp/bar".
I think the new behaviour is better (i.e., bugging out), but if people
complain for some reason, then it should perhaps be reverted.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2020-08-06 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-22 16:37 bug#38707: dired-do-rename doesn't check for "/" ! 積丹尼 Dan Jacobson
2019-12-24 4:28 ` Nick Helm
2020-08-06 10:13 ` Lars Ingebrigtsen [this message]
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=87wo2cdqub.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=38707@debbugs.gnu.org \
--cc=nick@tenpoint.co.nz \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).