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

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

bug#58919: 28.2; dired-copy-file-recursive fails to overwrite directory


From: Michael Albinus
Subject: bug#58919: 28.2; dired-copy-file-recursive fails to overwrite directory
Date: Sat, 17 Dec 2022 10:52:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli & Paul,

>> These patches address the issues raised by Michael by passing only
>> single arguments to make-directory handlers. That way, we don't need to
>> worry about whether the handlers follow the new convention. At our
>> leisure, perhaps in Emacs 30, we can upgrade the make-directory handlers
>> to support the new convention.
>
> Michael, are you okay with this? do you see any problems, real or
> potential, that could endanger the release of Emacs 29?

I've reviewed them, and in general it looks OK. Needs some testing, of
course.

Since file name handlers still raise an error in case DIR exists and
PARENTS is nil, we might see surprises in code assuming the new
behavior. I guess I'll add a change in tramp-*-handle-make-directory
like

--8<---------------cut here---------------start------------->8---
    (if (and (null parents) (file-exists-p dir))
        (if (>= emacs-major-version 29)
            t
          (tramp-error v 'file-already-exists dir)))
--8<---------------cut here---------------end--------------->8---

And, of course, the return value (nil or t) must be added. But this
doesn't break compatibility, because until now no return value is
specified.

Similar changes to ange-ftp-make-directory.

tramp-test13-make-directory of tramp-tests.el must be adapted as well,
but this is minor. Will do.

These changes must be applied anyway, for Tramp's compatibility over
several Emacs versions.

In short, I guess we could add the patch to the emacs-29 branch.

Best regards, Michael.





reply via email to

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