[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10897: copy-directory create new directory when copying a symlink
From: |
Michael Albinus |
Subject: |
bug#10897: copy-directory create new directory when copying a symlink |
Date: |
Sun, 22 Aug 2021 16:58:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
>> > FWIW, I think this feature should be controlled by a user option, at
>> > least because it changes a very old behavior. Also, on some systems
>> > (MS-Windows, for example) creating a symlink requires non-default
>> > privileges, so it could be a nuisance to force this on such users.
>>
>> Hmm. Is this something we want also in Tramp?
>
> Which part, specifically?
Copy a symbolic link as-is. Example:
--8<---------------cut here---------------start------------->8---
(make-directory "/ssh::/tmp/foo")
(write-region "baz" nil "/ssh::/tmp/foo/baz")
(make-symbolic-link "/ssh::/tmp/foo" "/ssh::/tmp/bar")
(copy-directory "/ssh::/tmp/bar" "/ssh::/tmp/bla")
--8<---------------cut here---------------end--------------->8---
Currently, this creates a new directory "/ssh::/tmp/bla", which contains
the file "baz". If the new user option copy-directory-create-symlink is
non-nil, this should create the symlink "/ssh::/tmp/bla", pointing to
"/tmp/foo".
There are many traps in implementation, especially in case DIRECTORY and
NEWNAME of copy-directory are located on different hosts. But first, we
shall decide whether such a feature is useful for Tramp files in general.
(I would say yes, with all pain I see in the implementation.)
Best regards, Michael.
- bug#10897: copy-directory create new directory when copying a symlink, Marco Centurion, 2021/08/19
- bug#10897: copy-directory create new directory when copying a symlink, Marco Centurion, 2021/08/19
- bug#10897: copy-directory create new directory when copying a symlink, Eli Zaretskii, 2021/08/20
- bug#10897: copy-directory create new directory when copying a symlink, Michael Albinus, 2021/08/22
- bug#10897: copy-directory create new directory when copying a symlink, Eli Zaretskii, 2021/08/22
- bug#10897: copy-directory create new directory when copying a symlink,
Michael Albinus <=
- bug#10897: copy-directory create new directory when copying a symlink, Eli Zaretskii, 2021/08/22
- bug#10897: copy-directory create new directory when copying a symlink, Michael Albinus, 2021/08/22
- bug#10897: copy-directory create new directory when copying a symlink, Michael Albinus, 2021/08/22
bug#10897: copy-directory create new directory when copying a symlink, Lars Ingebrigtsen, 2021/08/20