From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10897: copy-directory create new directory when copying a symlink Date: Fri, 20 Aug 2021 08:51:19 +0300 Message-ID: <83im001x60.fsf@gnu.org> References: <874nuchddl.fsf@gmail.com> <87tujksz1t.fsf@fing.edu.uy> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38008"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 10897@debbugs.gnu.org To: Marco Centurion Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 20 07:52:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGxRr-0009f9-S8 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Aug 2021 07:52:11 +0200 Original-Received: from localhost ([::1]:40148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGxRq-0003GJ-EU for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Aug 2021 01:52:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGxRi-0003EU-Og for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2021 01:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGxRi-0003In-Fq for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2021 01:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mGxRi-00024s-AW for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2021 01:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Aug 2021 05:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10897 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 10897-submit@debbugs.gnu.org id=B10897.16294387077965 (code B ref 10897); Fri, 20 Aug 2021 05:52:02 +0000 Original-Received: (at 10897) by debbugs.gnu.org; 20 Aug 2021 05:51:47 +0000 Original-Received: from localhost ([127.0.0.1]:32844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGxRS-00024P-Oj for submit@debbugs.gnu.org; Fri, 20 Aug 2021 01:51:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGxRQ-00024B-Ko for 10897@debbugs.gnu.org; Fri, 20 Aug 2021 01:51:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48224) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGxRJ-0002zw-QH; Fri, 20 Aug 2021 01:51:37 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3029 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGxRJ-0007ro-AS; Fri, 20 Aug 2021 01:51:37 -0400 In-Reply-To: <87tujksz1t.fsf@fing.edu.uy> (message from Marco Centurion on Thu, 19 Aug 2021 22:08:30 -0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212248 Archived-At: > From: Marco Centurion > Date: Thu, 19 Aug 2021 22:08:30 -0300 > > I failed to document the new behaviour in the docstring. > > The patch I sent didn't manage the creation of the new symlink correctly > either, as it created it with the same name as the target. That is, in > the examples given the result was: > > ------------------------- > (copy-directory "~/tmp/foo" "~/Test" nil t) > => > [mcenturion@localhost ~]$ ls -l Test > total 4 > lrwxrwxrwx. 1 mcenturion mcenturion 26 ago 19 21:21 Test1 -> /home/mcenturion/tmp/Test1 > ------------------------- > > This new patch corrects both mistakes. Thanks. 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.