From unknown Fri Jun 20 20:10:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15737: 24.3; copy-directory ignores copy-contents when using tramp Resent-From: Kyle Mahan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2013 18:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 15737@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13828993874062 (code B ref -1); Sun, 27 Oct 2013 18:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Oct 2013 18:43:07 +0000 Received: from localhost ([127.0.0.1]:47694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaVIn-00013Q-Q9 for submit@debbugs.gnu.org; Sun, 27 Oct 2013 14:43:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37932) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaTg8-00072X-HT for submit@debbugs.gnu.org; Sun, 27 Oct 2013 12:59:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaTg2-0007zF-3T for submit@debbugs.gnu.org; Sun, 27 Oct 2013 12:58:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaTg1-0007zA-Vb for submit@debbugs.gnu.org; Sun, 27 Oct 2013 12:58:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaTg0-0002BH-Hi for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:58:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaTfz-0007yy-05 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:58:56 -0400 Received: from mail-ve0-x230.google.com ([2607:f8b0:400c:c01::230]:64655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaTfy-0007yu-QZ for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:58:54 -0400 Received: by mail-ve0-f176.google.com with SMTP id jx11so4301159veb.35 for ; Sun, 27 Oct 2013 09:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=fZaUwjlhuDVd1VyAQL/W4pDqyiREGvDckdVXLkSPYVU=; b=ps0RLZri54O74CpSukfxheKdi2+lb1XLMIJ4lBgIvAQA5KE8f3TjSmiCzXWlMbBin/ vCIcOhxbCT1ooSOKbXKNMQ0laiLvzBxKytLNELddizuNdCQalTphFGd/z3cvChIiAx3Y ACZQ3iIlQiX5zwGvBOOzznYCoHObI2vZjZ9L0pAW5AI7yI4bFy3dwA+ehCrrcTBS8FEx UrzEmJ/0Q37tzWmGhOiOOWHRIz8adRFurTKSkl3QAzbNUYfw6E13P9Yzcs+nemgtoKW1 YR6cvfRunh9xK0NdOFPKWIG43Y7HGAWIgd46Y0Fqiaz2ZtdsZTweNx9U8gJUBLt7EBiH Gb7A== MIME-Version: 1.0 X-Received: by 10.220.69.212 with SMTP id a20mr10214616vcj.10.1382893133766; Sun, 27 Oct 2013 09:58:53 -0700 (PDT) Received: by 10.220.163.197 with HTTP; Sun, 27 Oct 2013 09:58:53 -0700 (PDT) Date: Sun, 27 Oct 2013 09:58:53 -0700 Message-ID: From: Kyle Mahan Content-Type: multipart/alternative; boundary=047d7b3a83ac00260604e9bbe63c X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Sun, 27 Oct 2013 14:43:03 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --047d7b3a83ac00260604e9bbe63c Content-Type: text/plain; charset=ISO-8859-1 Hello, Trying to copy the contents of a local directory to a remote one (trying to get behavior like "scp -r src/* user@host:dest/") , I noticed that the "copy-contents" flag is (silently?) ignored when the destination is remote. So the directory, rather than its contents is copied to the destination. To reproduce: ;; terminal: ;; [kmahan@lemur ~]$ mkdir /tmp/source /tmp/dest-local /tmp/dest-remote ;; [kmahan@lemur ~]$ touch /tmp/source/file (copy-directory "/tmp/source" "/tmp/dest-local" nil nil t) (copy-directory "/tmp/source" "/kmahan@localhost:/tmp/dest-remote" nil nil t) ;; terminal: ;; [kmahan@lemur ~]$ ls /tmp/dest-local/ ;; file ;; [kmahan@lemur ~]$ ls /tmp/dest-remote/ ;; source/ Thanks :) In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.2) of 2013-08-06 on -mnt-storage-buildroots-staging-x86_64-eric Windowing system distributor `The X.Org Foundation', version 11.0.11403000 Configured using: `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib' '--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-j C-y C-k C-k ; ; SPC ; ; SPC ; ; SPC ; ; SPC C-SPC M-w C-g M-x r e p r o t M-x r e p o r t Recent messages: Tramp: Waiting for prompts from remote shell Tramp: Process has finished. Tramp: Opening connection for kmahan@localhost using scpc...done nil byte-code: End of buffer [2 times] Tramp: Waiting for prompts from remote shell Tramp: Process has finished. Quit completing-read-default: Command attempted to use minibuffer while in minibuffer Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils tramp-cache tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv gnus-util mm-util mail-prsvr password-cache tramp-loaddefs shell pcomplete comint ansi-color ring format-spec advice help-fns cl-lib advice-preload time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) --047d7b3a83ac00260604e9bbe63c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello,
Trying to copy the contents of a local dire= ctory to a remote one (trying
to get behavior like "scp -r src/* us= er@host:dest/") , I noticed that
the "copy-contents" flag= is (silently?) ignored when the destination is
remote. So the directory, rather than its contents is copied to the
dest= ination. To reproduce:

;; terminal:
;; [kmahan@lemur ~]$ mkdir /t= mp/source /tmp/dest-local /tmp/dest-remote
;; [kmahan@lemur ~]$ touch /t= mp/source/file

(copy-directory "/tmp/source" "/tmp/dest-local" nil= nil t)
(copy-directory "/tmp/source" "/kmahan@localhost:= /tmp/dest-remote" nil nil t)

;; terminal:
;; [kmahan@lemur ~= ]$ ls /tmp/dest-local/
;; file
;; [kmahan@lemur ~]$ ls /tmp/dest-remote/
;; source/

<= /div>Thanks :)


In GNU Emacs 24.3.1 (x86_64-unknown-linux-gn= u, GTK+ Version 3.8.2)
=A0of 2013-08-06 on -mnt-storage-buildroots-stagi= ng-x86_64-eric
Windowing system distributor `The X.Org Foundation', version 11.0.11403= 000
Configured using:
=A0`configure '--prefix=3D/usr' '--= sysconfdir=3D/etc' '--libexecdir=3D/usr/lib'
=A0'--local= statedir=3D/var' '--with-x-toolkit=3Dgtk3' '--with-xft'=
=A0'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fstack-protect= or
=A0--param=3Dssp-buffer-size=3D4'
=A0'LDFLAGS=3D-Wl,-O1,--= sort-common,--as-needed,-z,relro'
=A0'CPPFLAGS=3D-D_FORTIFY_SOUR= CE=3D2''

Important settings:
=A0 value of $LANG: en_US.UTF-8
=A0 value of = $XMODIFIERS: @im=3Dibus
=A0 locale-coding-system: utf-8-unix
=A0 defa= ult enable-multibyte-characters: t

Major mode: Lisp Interaction
<= br>Minor modes in effect:
=A0 shell-dirtrack-mode: t
=A0 tooltip-mode: t
=A0 mouse-wheel-mode: = t
=A0 tool-bar-mode: t
=A0 menu-bar-mode: t
=A0 file-name-shadow-m= ode: t
=A0 global-font-lock-mode: t
=A0 font-lock-mode: t
=A0 blin= k-cursor-mode: t
=A0 auto-composition-mode: t
=A0 auto-encryption-mode: t
=A0 auto-com= pression-mode: t
=A0 line-number-mode: t
=A0 transient-mark-mode: t
Recent input:
<return> <down> <down> <down>= ; <down> C-j C-y <up> <up>
<up> <up> <up> C-k C-k ; ; SPC <left> <down> = <left>
<left> ; ; SPC <left> <down> <left>= ; <left> ; ; SPC
<left> <down> <left> <left&= gt; ; ; SPC <C-left> <C-left>
<C-left> <C-left> <C-right> <backspace> <backspa= ce>
<backspace> <C-down> C-SPC <C-up> <C-up>= <C-up> M-w
C-g M-x r e p r o t <C-backspace> M-x r e p o r= t <tab>
<return>

Recent messages:

Tramp: Waiting for prompts fr= om remote shell
Tramp: Process has finished.
Tramp: Opening connectio= n for kmahan@localhost using scpc...done
nil
byte-code: End of buffer= [2 times]

Tramp: Waiting for prompts from remote shell
Tramp: Process has fini= shed.
Quit
completing-read-default: Command attempted to use minibuff= er while in minibuffer

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml easymenu mm= l-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-ut= ils
mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils tramp-cach= e
tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp
byte-com= pile cconv gnus-util mm-util mail-prsvr password-cache
tramp-loaddefs sh= ell pcomplete comint ansi-color ring format-spec advice
help-fns cl-lib = advice-preload time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-optfringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-e= shadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu = font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
c= zech european ethiopic indian cyrillic chinese case-table epa-hook
jka-c= mpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face ma= croexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
mak= e-network-process dbusbind dynamic-setting system-font-setting
font-rend= er-setting move-toolbar gtk x-toolkit x multi-tty emacs)

--047d7b3a83ac00260604e9bbe63c-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 28 03:39:45 2013 Received: (at control) by debbugs.gnu.org; 28 Oct 2013 07:39:45 +0000 Received: from localhost ([127.0.0.1]:48119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VahQP-0005el-50 for submit@debbugs.gnu.org; Mon, 28 Oct 2013 03:39:45 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:40698 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VahQM-0005ec-GC for control@debbugs.gnu.org; Mon, 28 Oct 2013 03:39:42 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VahQM-0000w2-2C for control@debbugs.gnu.org; Mon, 28 Oct 2013 03:39:42 -0400 Date: Mon, 28 Oct 2013 03:39:42 -0400 Message-Id: Subject: control message for bug 15737 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) tag 15737 confirmed From unknown Fri Jun 20 20:10:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15737: 24.3; copy-directory ignores copy-contents when using tramp Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Oct 2013 08:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Kyle Mahan Cc: 15737@debbugs.gnu.org Received: via spool by 15737-submit@debbugs.gnu.org id=B15737.138294860730087 (code B ref 15737); Mon, 28 Oct 2013 08:24:02 +0000 Received: (at 15737) by debbugs.gnu.org; 28 Oct 2013 08:23:27 +0000 Received: from localhost ([127.0.0.1]:48172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vai6g-0007pC-TH for submit@debbugs.gnu.org; Mon, 28 Oct 2013 04:23:27 -0400 Received: from mout.gmx.net ([212.227.15.19]:62967) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vai6d-0007ou-Kb for 15737@debbugs.gnu.org; Mon, 28 Oct 2013 04:23:24 -0400 Received: from detlef.gmx.de ([93.202.57.233]) by mail.gmx.com (mrgmx001) with ESMTPS (Nemesis) id 0MQRWm-1V76OO43pc-00TjHq for <15737@debbugs.gnu.org>; Mon, 28 Oct 2013 09:23:17 +0100 From: Michael Albinus References: Date: Mon, 28 Oct 2013 09:23:15 +0100 In-Reply-To: (Kyle Mahan's message of "Sun, 27 Oct 2013 09:58:53 -0700") Message-ID: <87eh75pzws.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:0u3R6iCnNlATZuEqrUlTeZRCLYvOaetC822UGrZaMR61R0gZMS9 QpeF5qrPoDBrgPuFPwB7/zNc+n4cpk/4s+oo5zOujGSvsW3fdivczPRie/GFcHOwImM8cmj V84uKBEHxsgRlBs4tUlPOnv4eiIhtLtOPVcLUs50tOSW6vnJDSAkm/mZSUdfuxaLbPCLd67 F6LK9KV5vmw7k67zszxeg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Kyle Mahan writes: > Hello, Hi, > Trying to copy the contents of a local directory to a remote one > (trying to get behavior like "scp -r src/* user@host:dest/") , I > noticed that the "copy-contents" flag is (silently?) ignored when the > destination is remote. So the directory, rather than its contents is > copied to the destination. Thanks for the report, I could reproduce it here. Could you, please, check the following patch: --8<---------------cut here---------------start------------->8--- *** /usr/local/src/emacs-24/lisp/net/tramp-sh.el.~111399~ 2013-10-28 09:18:09.197122236 +0100 --- /usr/local/src/emacs-24/lisp/net/tramp-sh.el 2013-10-28 09:17:24.648901345 +0100 *************** *** 1912,1918 **** (let ((t1 (tramp-tramp-file-p dirname)) (t2 (tramp-tramp-file-p newname))) (with-parsed-tramp-file-name (if t1 dirname newname) nil ! (if (and (tramp-get-method-parameter method 'tramp-copy-recursive) ;; When DIRNAME and NEWNAME are remote, they must have ;; the same method. (or (null t1) (null t2) --- 1912,1919 ---- (let ((t1 (tramp-tramp-file-p dirname)) (t2 (tramp-tramp-file-p newname))) (with-parsed-tramp-file-name (if t1 dirname newname) nil ! (if (and (not copy-contents) ! (tramp-get-method-parameter method 'tramp-copy-recursive) ;; When DIRNAME and NEWNAME are remote, they must have ;; the same method. (or (null t1) (null t2) *************** *** 1935,1941 **** 'copy dirname newname keep-date)) ;; We must do it file-wise. (tramp-run-real-handler ! 'copy-directory (list dirname newname keep-date parents))) ;; When newname did exist, we have wrong cached values. (when t2 --- 1936,1945 ---- 'copy dirname newname keep-date)) ;; We must do it file-wise. (tramp-run-real-handler ! 'copy-directory ! (if copy-contents ! (list dirname newname keep-date parents copy-contents) ! (list dirname newname keep-date parents)))) ;; When newname did exist, we have wrong cached values. (when t2 --8<---------------cut here---------------end--------------->8--- > Thanks :) Best regards, Michael. From unknown Fri Jun 20 20:10:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15737: 24.3; copy-directory ignores copy-contents when using tramp Resent-From: Kyle Mahan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Oct 2013 19:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Michael Albinus Cc: 15737@debbugs.gnu.org Received: via spool by 15737-submit@debbugs.gnu.org id=B15737.13829876013690 (code B ref 15737); Mon, 28 Oct 2013 19:14:02 +0000 Received: (at 15737) by debbugs.gnu.org; 28 Oct 2013 19:13:21 +0000 Received: from localhost ([127.0.0.1]:49721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VasFc-0000xS-5v for submit@debbugs.gnu.org; Mon, 28 Oct 2013 15:13:20 -0400 Received: from mail-vc0-f173.google.com ([209.85.220.173]:46985) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VasFY-0000xB-N9 for 15737@debbugs.gnu.org; Mon, 28 Oct 2013 15:13:17 -0400 Received: by mail-vc0-f173.google.com with SMTP id lh4so800994vcb.18 for <15737@debbugs.gnu.org>; Mon, 28 Oct 2013 12:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZghMWI28EYaWV/K/q7V31TUwljpa6h08wGxAgSwuR2I=; b=FlJwGVvniQR5RGu483tnwPOpH32/dNifAw86kLRbvEsQ5nEs4gbSW9pzyxt46O2QkB cjfxMT8JlFcfkRTtch99xPrp78x9nzLqej9YVvsdRyuE7j38e+ipYlHAU3OYW9/15F7w 5JcT0vTuHp8/QTHLt8ySzwL3EkqFAscnhXFD/Y0cgZVmKA6LtylhZyAJFJDt9BRXeCm2 ak8W+My/OtyvYkPGvX3vOFRAuI4ArvCqDgmQ7Y5xTYBoJhhbyFkxIMJ0VCIh+BYqBAVa OI5ttqZoLc3hK0i29w9roCXOGTCZ59TxCnMj9rKpRxNyvi5VC4oBighWR8SOCmtKaEBn AFZQ== MIME-Version: 1.0 X-Received: by 10.220.1.203 with SMTP id 11mr14206396vcg.15.1382987591108; Mon, 28 Oct 2013 12:13:11 -0700 (PDT) Received: by 10.220.163.197 with HTTP; Mon, 28 Oct 2013 12:13:10 -0700 (PDT) In-Reply-To: <87eh75pzws.fsf@gmx.de> References: <87eh75pzws.fsf@gmx.de> Date: Mon, 28 Oct 2013 12:13:10 -0700 Message-ID: From: Kyle Mahan Content-Type: multipart/alternative; boundary=001a11c3d3f418cfce04e9d1e402 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c3d3f418cfce04e9d1e402 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Oct 28, 2013 at 1:23 AM, Michael Albinus wrote: > Kyle Mahan writes: > > > Trying to copy the contents of a local directory to a remote one > > (trying to get behavior like "scp -r src/* user@host:dest/") , I > > noticed that the "copy-contents" flag is (silently?) ignored when the > > destination is remote. So the directory, rather than its contents is > > copied to the destination. > > Thanks for the report, I could reproduce it here. Could you, please, > check the following patch: > > Confirming that this patch fixes the issue for (my use-case). Wow, that was fast! Thanks, Kyle -- Kyle Mahan kyle.mahan@gmail.com --001a11c3d3f418cfce04e9d1e402 Content-Type: text/html; charset=ISO-8859-1

On Mon, Oct 28, 2013 at 1:23 AM, Michael Albinus <michael.albinus@gmx.de> wrote:
Kyle Mahan <kyle.mahan@gmail.com> writes:

> Trying to copy the contents of a local directory to a remote one
> (trying to get behavior like "scp -r src/* user@host:dest/") , I
> noticed that the "copy-contents" flag is (silently?) ignored when the
> destination is remote. So the directory, rather than its contents is
> copied to the destination.

Thanks for the report, I could reproduce it here. Could you, please,
check the following patch:


Confirming that this patch fixes the issue for (my use-case). Wow, that was fast!

Thanks,
Kyle

--
--001a11c3d3f418cfce04e9d1e402-- From unknown Fri Jun 20 20:10:03 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Kyle Mahan Subject: bug#15737: closed (Re: bug#15737: 24.3; copy-directory ignores copy-contents when using tramp) Message-ID: References: <87ppqpfaqe.fsf@gmx.de> X-Gnu-PR-Message: they-closed 15737 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: confirmed Reply-To: 15737@debbugs.gnu.org Date: Mon, 28 Oct 2013 19:38:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1382989083-10326-1" This is a multi-part message in MIME format... ------------=_1382989083-10326-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #15737: 24.3; copy-directory ignores copy-contents when using tramp which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 15737@debbugs.gnu.org. --=20 15737: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15737 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1382989083-10326-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 15737-done) by debbugs.gnu.org; 28 Oct 2013 19:37:26 +0000 Received: from localhost ([127.0.0.1]:49759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vascv-0002fi-Cu for submit@debbugs.gnu.org; Mon, 28 Oct 2013 15:37:25 -0400 Received: from mout.gmx.net ([212.227.17.22]:54367) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vascr-0002fR-Sy for 15737-done@debbugs.gnu.org; Mon, 28 Oct 2013 15:37:22 -0400 Received: from detlef.gmx.de ([93.202.57.233]) by mail.gmx.com (mrgmx103) with ESMTPS (Nemesis) id 0LcSWg-1VzSCD2GAA-00juf9 for <15737-done@debbugs.gnu.org>; Mon, 28 Oct 2013 20:37:15 +0100 From: Michael Albinus To: Kyle Mahan Subject: Re: bug#15737: 24.3; copy-directory ignores copy-contents when using tramp References: <87eh75pzws.fsf@gmx.de> Date: Mon, 28 Oct 2013 20:37:13 +0100 In-Reply-To: (Kyle Mahan's message of "Mon, 28 Oct 2013 12:13:10 -0700") Message-ID: <87ppqpfaqe.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:AOb4XRqz33v9kQwUuTFFgnB6+1UNL46KkZcwKTcUK+we5coz3qT zwjIJr0Ld5jcVnM5j+b6TZ+UVF8zYqRWCRWHQF2/f4bm+uUEaXjYZNM+TLUzWJnQzvzv5Rm cWUx0oAIhGQhZ3b7EXfuaa5lIuU9/V/UqWVy2BL+ZNCjeWsMVf/Rr6NUQDAai02/t52dKtN 6M/ax4LIHudG8YqvrQKpQ== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15737-done Cc: 15737-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Kyle Mahan writes: > Confirming that this patch fixes the issue for (my use-case). Wow, > that was fast! Thanks for confirmation. I've committed the patch to Emacs' trunk, closing this bug report. > Thanks, > Kyle Best regards, Michael. ------------=_1382989083-10326-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Oct 2013 18:43:07 +0000 Received: from localhost ([127.0.0.1]:47694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaVIn-00013Q-Q9 for submit@debbugs.gnu.org; Sun, 27 Oct 2013 14:43:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37932) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaTg8-00072X-HT for submit@debbugs.gnu.org; Sun, 27 Oct 2013 12:59:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaTg2-0007zF-3T for submit@debbugs.gnu.org; Sun, 27 Oct 2013 12:58:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaTg1-0007zA-Vb for submit@debbugs.gnu.org; Sun, 27 Oct 2013 12:58:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaTg0-0002BH-Hi for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:58:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaTfz-0007yy-05 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:58:56 -0400 Received: from mail-ve0-x230.google.com ([2607:f8b0:400c:c01::230]:64655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaTfy-0007yu-QZ for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:58:54 -0400 Received: by mail-ve0-f176.google.com with SMTP id jx11so4301159veb.35 for ; Sun, 27 Oct 2013 09:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=fZaUwjlhuDVd1VyAQL/W4pDqyiREGvDckdVXLkSPYVU=; b=ps0RLZri54O74CpSukfxheKdi2+lb1XLMIJ4lBgIvAQA5KE8f3TjSmiCzXWlMbBin/ vCIcOhxbCT1ooSOKbXKNMQ0laiLvzBxKytLNELddizuNdCQalTphFGd/z3cvChIiAx3Y ACZQ3iIlQiX5zwGvBOOzznYCoHObI2vZjZ9L0pAW5AI7yI4bFy3dwA+ehCrrcTBS8FEx UrzEmJ/0Q37tzWmGhOiOOWHRIz8adRFurTKSkl3QAzbNUYfw6E13P9Yzcs+nemgtoKW1 YR6cvfRunh9xK0NdOFPKWIG43Y7HGAWIgd46Y0Fqiaz2ZtdsZTweNx9U8gJUBLt7EBiH Gb7A== MIME-Version: 1.0 X-Received: by 10.220.69.212 with SMTP id a20mr10214616vcj.10.1382893133766; Sun, 27 Oct 2013 09:58:53 -0700 (PDT) Received: by 10.220.163.197 with HTTP; Sun, 27 Oct 2013 09:58:53 -0700 (PDT) Date: Sun, 27 Oct 2013 09:58:53 -0700 Message-ID: Subject: 24.3; copy-directory ignores copy-contents when using tramp From: Kyle Mahan To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=047d7b3a83ac00260604e9bbe63c X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 27 Oct 2013 14:43:03 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --047d7b3a83ac00260604e9bbe63c Content-Type: text/plain; charset=ISO-8859-1 Hello, Trying to copy the contents of a local directory to a remote one (trying to get behavior like "scp -r src/* user@host:dest/") , I noticed that the "copy-contents" flag is (silently?) ignored when the destination is remote. So the directory, rather than its contents is copied to the destination. To reproduce: ;; terminal: ;; [kmahan@lemur ~]$ mkdir /tmp/source /tmp/dest-local /tmp/dest-remote ;; [kmahan@lemur ~]$ touch /tmp/source/file (copy-directory "/tmp/source" "/tmp/dest-local" nil nil t) (copy-directory "/tmp/source" "/kmahan@localhost:/tmp/dest-remote" nil nil t) ;; terminal: ;; [kmahan@lemur ~]$ ls /tmp/dest-local/ ;; file ;; [kmahan@lemur ~]$ ls /tmp/dest-remote/ ;; source/ Thanks :) In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.2) of 2013-08-06 on -mnt-storage-buildroots-staging-x86_64-eric Windowing system distributor `The X.Org Foundation', version 11.0.11403000 Configured using: `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib' '--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-j C-y C-k C-k ; ; SPC ; ; SPC ; ; SPC ; ; SPC C-SPC M-w C-g M-x r e p r o t M-x r e p o r t Recent messages: Tramp: Waiting for prompts from remote shell Tramp: Process has finished. Tramp: Opening connection for kmahan@localhost using scpc...done nil byte-code: End of buffer [2 times] Tramp: Waiting for prompts from remote shell Tramp: Process has finished. Quit completing-read-default: Command attempted to use minibuffer while in minibuffer Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils tramp-cache tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv gnus-util mm-util mail-prsvr password-cache tramp-loaddefs shell pcomplete comint ansi-color ring format-spec advice help-fns cl-lib advice-preload time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) --047d7b3a83ac00260604e9bbe63c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello,
Trying to copy the contents of a local dire= ctory to a remote one (trying
to get behavior like "scp -r src/* us= er@host:dest/") , I noticed that
the "copy-contents" flag= is (silently?) ignored when the destination is
remote. So the directory, rather than its contents is copied to the
dest= ination. To reproduce:

;; terminal:
;; [kmahan@lemur ~]$ mkdir /t= mp/source /tmp/dest-local /tmp/dest-remote
;; [kmahan@lemur ~]$ touch /t= mp/source/file

(copy-directory "/tmp/source" "/tmp/dest-local" nil= nil t)
(copy-directory "/tmp/source" "/kmahan@localhost:= /tmp/dest-remote" nil nil t)

;; terminal:
;; [kmahan@lemur ~= ]$ ls /tmp/dest-local/
;; file
;; [kmahan@lemur ~]$ ls /tmp/dest-remote/
;; source/

<= /div>Thanks :)


In GNU Emacs 24.3.1 (x86_64-unknown-linux-gn= u, GTK+ Version 3.8.2)
=A0of 2013-08-06 on -mnt-storage-buildroots-stagi= ng-x86_64-eric
Windowing system distributor `The X.Org Foundation', version 11.0.11403= 000
Configured using:
=A0`configure '--prefix=3D/usr' '--= sysconfdir=3D/etc' '--libexecdir=3D/usr/lib'
=A0'--local= statedir=3D/var' '--with-x-toolkit=3Dgtk3' '--with-xft'=
=A0'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fstack-protect= or
=A0--param=3Dssp-buffer-size=3D4'
=A0'LDFLAGS=3D-Wl,-O1,--= sort-common,--as-needed,-z,relro'
=A0'CPPFLAGS=3D-D_FORTIFY_SOUR= CE=3D2''

Important settings:
=A0 value of $LANG: en_US.UTF-8
=A0 value of = $XMODIFIERS: @im=3Dibus
=A0 locale-coding-system: utf-8-unix
=A0 defa= ult enable-multibyte-characters: t

Major mode: Lisp Interaction
<= br>Minor modes in effect:
=A0 shell-dirtrack-mode: t
=A0 tooltip-mode: t
=A0 mouse-wheel-mode: = t
=A0 tool-bar-mode: t
=A0 menu-bar-mode: t
=A0 file-name-shadow-m= ode: t
=A0 global-font-lock-mode: t
=A0 font-lock-mode: t
=A0 blin= k-cursor-mode: t
=A0 auto-composition-mode: t
=A0 auto-encryption-mode: t
=A0 auto-com= pression-mode: t
=A0 line-number-mode: t
=A0 transient-mark-mode: t
Recent input:
<return> <down> <down> <down>= ; <down> C-j C-y <up> <up>
<up> <up> <up> C-k C-k ; ; SPC <left> <down> = <left>
<left> ; ; SPC <left> <down> <left>= ; <left> ; ; SPC
<left> <down> <left> <left&= gt; ; ; SPC <C-left> <C-left>
<C-left> <C-left> <C-right> <backspace> <backspa= ce>
<backspace> <C-down> C-SPC <C-up> <C-up>= <C-up> M-w
C-g M-x r e p r o t <C-backspace> M-x r e p o r= t <tab>
<return>

Recent messages:

Tramp: Waiting for prompts fr= om remote shell
Tramp: Process has finished.
Tramp: Opening connectio= n for kmahan@localhost using scpc...done
nil
byte-code: End of buffer= [2 times]

Tramp: Waiting for prompts from remote shell
Tramp: Process has fini= shed.
Quit
completing-read-default: Command attempted to use minibuff= er while in minibuffer

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml easymenu mm= l-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-ut= ils
mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils tramp-cach= e
tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp
byte-com= pile cconv gnus-util mm-util mail-prsvr password-cache
tramp-loaddefs sh= ell pcomplete comint ansi-color ring format-spec advice
help-fns cl-lib = advice-preload time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-optfringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-e= shadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu = font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
c= zech european ethiopic indian cyrillic chinese case-table epa-hook
jka-c= mpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face ma= croexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
mak= e-network-process dbusbind dynamic-setting system-font-setting
font-rend= er-setting move-toolbar gtk x-toolkit x multi-tty emacs)

--047d7b3a83ac00260604e9bbe63c-- ------------=_1382989083-10326-1--