From: adam plaice <plaice.adam+lists@gmail.com>
To: 28896@debbugs.gnu.org
Subject: bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
Date: Thu, 19 Oct 2017 00:46:42 +0100 [thread overview]
Message-ID: <CAJw81dYeU78JVZKor0o49FLghD3pqOH-mh4-57vadHxapmTYaw@mail.gmail.com> (raw)
Moving a directory from the local system to a remote ssh tramp directory fails
To reproduce:
mkdir test_dired_copy/a -p
cd test_dired_copy
emacs -Q --eval '(dired ".")'
In dired, execute `dired-do-rename' (kbd "R") on the `a' directory and
select a remote (writable) destination using the Tramp ssh method, for
instance:
/ssh:username@hostname:/path/on/remote/ .
(I've tried to consistently replace the details of the remote with
dummy values (the username with `username', the hostname with
`hostname' and the path of the directory into which `a' should be
copied with `/path/on/remote/'). I'm not mis-typing the paths when
testing — for instance C-x d /ssh:username@hostname:/path/on/remote/
works as expected.)
Expected result:
The directory `a' is moved ("renamed") into the remote destination.
Actual result:
The directory `a' remains in test_dired_copy, does not appear on the
remote system and the following error message is displayed:
Renaming /home/adam/test_dired_copy/a to
/ssh:username@hostname:/path/on/remote/a...failed
Move ‘/home/adam/test_dired_copy/a’ to
‘/ssh:username@hostname:/path/on/remote/a’ failed:
(file-error Read error Is a directory /home/adam/test_dired_copy/a)
* What also does not work (I assume this is related, but I may be
wrong):
** Moving a directory from a remote ssh tramp directory to the local
system
mkdir -p test_dired_copy
emacs -Q
M-x mkdir /ssh:username@hostname:/path/on/remote/b
M-x dired /ssh:username@hostname:/path/on/remote/
In dired, execute `dired-do-rename' (kbd "R") on the `b' directory and
select a local destination (for instance /home/adam/test_dired_copy/
).
*** Expected result:
(1. The remote directory b is created.)
2. The remote directory b is moved to the local destination.
*** Actual result:
(1. The remote directory b is created, as expected.)
2. The remote directory b is not moved and the following error message
is displayed:
Renaming /ssh:username@hostname:/path/on/remote/b to
/home/adam/test_dired_copy/b...failed
Move ‘/ssh:username@hostname:/path/on/remote/b’ to
‘/home/adam/test_dired_copy/b’ failed:
(file-error Encoding remote file failed)
* What does work
** Copying a directory from the local system to a remote one and
vice-versa
(i.e. exactly as above, but using `dired-do-copy' ("C") rather than
`dired-do-rename', in either direction)
** Moving a file from the local to the remote system and vice-versa
(i.e. instead of using `dired-do-rename' on a directory, use it on a
"normal" file)
** Moving a directory from one location on the remote to another on
the same remote (but NOT one on a different remote — that results
in the same error as trying to move from the remote to the local system).
** Moving a directory on the local system, but to a location managed
with the Tramp sudo method.
(Moving from, say `/home/adam/test1/a' to `/sudo::/home/adam/test2/').
This strongly suggests that the issue is not with Tramp, as such, but
with the interaction with the backend.
The bug is present on all versions of emacs that I've tested (from
23.4, through 24.5 and 25.1 to master
(94281c9a1cc0f756841fdc9b266657853df94a29) and emacs-26
(2f7163fb72e764d2df046a4d816e1e0b81e41d18)). All the systems tested
(local and remote) were Ubuntu 16.04.3.
Note that this was previously misreported as part of #28519.
Obviously, since copying a directory and then deleting it from the
source, both work, one can easily circumvent the bug when using dired,
if one remembers.
Thanks for reading the bug and working on emacs!
Adam
In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
of 2017-10-18 built on adam
Repository revision: 94281c9a1cc0f756841fdc9b266657853df94a29
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Ubuntu 16.04.3 LTS
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Configured using:
'configure --without-pop'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 LIBSYSTEMD LCMS2
Important settings:
value of $LANG: en_GB.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Dired by name
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-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
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny seq rfc822 mml easymenu
mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils files-x tramp-cache tramp-sh tramp tramp-compat
tramp-loaddefs trampver ucs-normalize shell pcomplete comint ansi-color
ring parse-time format-spec advice auth-source cl-seq eieio byte-opt
bytecomp byte-compile cconv eieio-core cl-macs gv eieio-loaddefs
password-cache dired-aux cl-loaddefs cl-lib dired dired-loaddefs
term/rxvt term/xterm xterm time-date elec-pair mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 226072 10274)
(symbols 48 22318 2)
(miscs 40 43 162)
(strings 32 36033 1632)
(string-bytes 1 1039349)
(vectors 16 36805)
(vector-slots 8 717154 12552)
(floats 8 72 671)
(intervals 56 262 0)
(buffers 992 15)
(heap 1024 16769 1304))
next reply other threads:[~2017-10-18 23:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 23:46 adam plaice [this message]
2017-10-19 18:00 ` bug#28896: Dired move of directory to remote with TRAMP (ssh) fails Michael Albinus
2017-10-20 10:54 ` Michael Albinus
2017-10-20 17:03 ` Adam Plaice
2017-10-20 17:11 ` Adam Plaice
2017-10-20 17:32 ` Noam Postavsky
2017-10-20 17:44 ` Michael Albinus
2017-10-20 18:30 ` Noam Postavsky
2017-10-20 18:45 ` Noam Postavsky
2017-10-20 19:25 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJw81dYeU78JVZKor0o49FLghD3pqOH-mh4-57vadHxapmTYaw@mail.gmail.com \
--to=plaice.adam+lists@gmail.com \
--cc=28896@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.