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: Sun, 22 Aug 2021 19:47:12 +0300 Message-ID: <831r6lxw8f.fsf@gnu.org> References: <874nuchddl.fsf@gmail.com> <87tujksz1t.fsf@fing.edu.uy> <83im001x60.fsf@gnu.org> <87r1elvbzy.fsf@gmx.de> <8335r1y4lc.fsf@gnu.org> <87ilzxv853.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36843"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mcenturion@fing.edu.uy, 10897@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 22 18:48:19 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 1mHqdu-0009Om-DP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Aug 2021 18:48:18 +0200 Original-Received: from localhost ([::1]:54442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHqds-00010p-Mh for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Aug 2021 12:48:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHqde-00010a-O7 for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2021 12:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mHqde-00089t-Fo for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2021 12:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mHqde-0004RO-9a for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2021 12:48: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: Sun, 22 Aug 2021 16:48: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.162965085817037 (code B ref 10897); Sun, 22 Aug 2021 16:48:02 +0000 Original-Received: (at 10897) by debbugs.gnu.org; 22 Aug 2021 16:47:38 +0000 Original-Received: from localhost ([127.0.0.1]:39733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHqdF-0004Qi-2c for submit@debbugs.gnu.org; Sun, 22 Aug 2021 12:47:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHqd9-0004QS-NT for 10897@debbugs.gnu.org; Sun, 22 Aug 2021 12:47:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51268) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHqd2-0007m2-Qj; Sun, 22 Aug 2021 12:47:24 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2742 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 1mHqd2-0007As-Ds; Sun, 22 Aug 2021 12:47:24 -0400 In-Reply-To: <87ilzxv853.fsf@gmx.de> (message from Michael Albinus on Sun, 22 Aug 2021 16:58:16 +0200) 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:212426 Archived-At: > From: Michael Albinus > Cc: mcenturion@fing.edu.uy, 10897@debbugs.gnu.org > Date: Sun, 22 Aug 2021 16:58:16 +0200 > > >> 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". Yes, sure. We should support that with remote files as much as possible.