From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#10897: copy-directory create new directory when copying a symlink Date: Sun, 22 Aug 2021 16:58:16 +0200 Message-ID: <87ilzxv853.fsf@gmx.de> References: <874nuchddl.fsf@gmail.com> <87tujksz1t.fsf@fing.edu.uy> <83im001x60.fsf@gnu.org> <87r1elvbzy.fsf@gmx.de> <8335r1y4lc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8699"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: mcenturion@fing.edu.uy, 10897@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 22 16:59:11 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 1mHowI-00023c-5h for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Aug 2021 16:59:10 +0200 Original-Received: from localhost ([::1]:36522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHowG-00077j-AK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Aug 2021 10:59:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHowA-00076L-PK for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2021 10:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mHow9-00036k-VQ for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2021 10:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mHow9-0005wn-To for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2021 10:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Aug 2021 14:59:01 +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.162964431222822 (code B ref 10897); Sun, 22 Aug 2021 14:59:01 +0000 Original-Received: (at 10897) by debbugs.gnu.org; 22 Aug 2021 14:58:32 +0000 Original-Received: from localhost ([127.0.0.1]:39703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHovg-0005w2-3L for submit@debbugs.gnu.org; Sun, 22 Aug 2021 10:58:32 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:36165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHovb-0005vl-86 for 10897@debbugs.gnu.org; Sun, 22 Aug 2021 10:58:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1629644301; bh=1qQqpGGXToSib1WP9fuGHgsOl2iSrQC+G4KdzxQy7QU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=exrsnRP5Xbbn2aoJlmLhoccPZWmPR8npN1YyYA0FIQY80z/Fbr0RNiKFshu1dVqpm zvFnWhL9x8sS99gZy+nm786PeIQJpejIyXwyPbE7G4PRmH3wY++RMER4hSOxFZdgd1 qVblIyjktUABL/cnF3hePJ584vvdsbat+RYyNoew= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.157.218]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MLi8g-1mZLoL0SJs-00HiZ2; Sun, 22 Aug 2021 16:58:21 +0200 In-Reply-To: <8335r1y4lc.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 22 Aug 2021 16:46:39 +0300") X-Provags-ID: V03:K1:JGed3/mx62fsD4OwKcQ8wTcYsG/ZeXrLCUkHg644kUWnqZ9/ziX WBQJptuF4xCsRcz9jVqE24vQgU5ptY2/61q7VaN/MEzV/eeLN1bJW/hLqiUhzxR1XGYQaJL GhxrytOHwfYpYV6e+j1XqRE51KGr963MdpuXUMj8S8mVu2zxQuPT8AsurPSJpZKL4McAwRE cqUIQGYdYGK29iceUbbow== X-UI-Out-Filterresults: notjunk:1;V03:K0:S3UC9PQ8L5M=:H4ZujH/a6exHfulpm9vMli JDJQ7KI7vuWulZS0vm9AoVamnetdJQJbNm+sES6ymD7ogEMJWPTgy3uiznp4a1QLHUJOPihWj 0nJAVpP8A1WRC2PSMPkhj5M/1FJXBKiJfS1eDl1dOvnrN3m6dBuBRGliV5RDEcW01ORK/JmXi AKZMx4CkFRWlUC94JRn2eU8BvuN0Tk5M34Wo5kfaOiig4dSEZswi47DcGHB1syAK9kPGI3Uh+ tAiiMNqoUp8jcpyE7xfEKoiW6pPm1YkjWhTqTXeSmySb6O1WS9leABuYpaZscU5ryrSWTLQnn q5qlvidqZekh1vhFJmXplNH7bP6AOoDPyl98tOI+2bi/+LhLMyYX6iU92Df2dtrMVfM/IINof oY1e9KNHSGTGBuAkpG9F+1qJM8Ipv9RAybViwR22/+O4dgeH0rBYgCxR90yO8NABLmZqAi6CQ FW3h0aTzWAZrQ5zsS1AcA50UkjOtU/4j+Ivyd0HqnB+jeilmlKWCUZEz30EbbGEigQk4QRN7w v3xJKRa+iQZiOYUIlen+kHq/4XQMiPb/Nc8z1scARhGzy760lOPplvykDT7We01/jf5pdxARe z/Uj/nWHDxAyryzRvRjwI1LHIBNQGCqsU0EuEFcmBiCudwZbOUG4oImKeekzA8JX8F4MuJJn4 sHtB8u/7TxVPtuFW70hgmfcKglZxrOMK/gHmMAgLYYGwyrsKD5p0q4ehDc+KHctOQMFZbu1Hx 7EQdkNm0cakOK7TBxKkUuwTQt43dm4DUTRinvdlRGYmSZtWwBRNO0/y76YyNIOH2615ofxhO 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:212421 Archived-At: Eli Zaretskii 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: =2D-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") =2D-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.