bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38707: dired-do-rename doesn't check for "/" !


From: Lars Ingebrigtsen
Subject: bug#38707: dired-do-rename doesn't check for "/" !
Date: Thu, 06 Aug 2020 12:13:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]