unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
@ 2017-10-18 23:46 adam plaice
  2017-10-19 18:00 ` Michael Albinus
  2017-10-20 10:54 ` Michael Albinus
  0 siblings, 2 replies; 10+ messages in thread
From: adam plaice @ 2017-10-18 23:46 UTC (permalink / raw)
  To: 28896

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))





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
  2017-10-18 23:46 bug#28896: Dired move of directory to remote with TRAMP (ssh) fails adam plaice
@ 2017-10-19 18:00 ` Michael Albinus
  2017-10-20 10:54 ` Michael Albinus
  1 sibling, 0 replies; 10+ messages in thread
From: Michael Albinus @ 2017-10-19 18:00 UTC (permalink / raw)
  To: adam plaice; +Cc: 28896

adam plaice <plaice.adam+lists@gmail.com> writes:

Hi Adam,

> Moving a directory from the local system to a remote ssh tramp directory fails

Thanks for your detailed report!

I could reproduce the problem. Yes, it is rename-file which ceases to
work. copy-file shows similar problems, when the source is a directory.

I didn't find a quick fix, but at least I have extended tramp-tests.el
already with respective tests :-)

Will work on this next days, for all involved backends, in order to have
it fixed for Emacs 26. I'm marking this bug as blocking bug#24655, the
Emacs 26.1 release bug.

> Thanks for reading the bug and working on emacs!
> Adam

Best regards, Michael.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
  2017-10-18 23:46 bug#28896: Dired move of directory to remote with TRAMP (ssh) fails adam plaice
  2017-10-19 18:00 ` Michael Albinus
@ 2017-10-20 10:54 ` Michael Albinus
  2017-10-20 17:03   ` Adam Plaice
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2017-10-20 10:54 UTC (permalink / raw)
  To: adam plaice; +Cc: 28896

adam plaice <plaice.adam+lists@gmail.com> writes:

Hi Adam,

> 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.

I've fixed this in the Emacs repository, emacs-26 branch. Could you,
pls, crosscheck?

Since the fix is only in the Tramp files, you might also download the
recent files from the Tramp git repository, and test for Emacs 24 and
25. I haven't done, but I expect it is fixed there as well.

Emacs 23 is not supported any longer by recent Tramp.

> Thanks for reading the bug and working on emacs!
> Adam

Best regards, Michael.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
  2017-10-20 10:54 ` Michael Albinus
@ 2017-10-20 17:03   ` Adam Plaice
  2017-10-20 17:11     ` Adam Plaice
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Plaice @ 2017-10-20 17:03 UTC (permalink / raw)
  To: Michael Albinus, 28896-done

Wow, that was fast!

The bug is indeed fixed.

(Moving directories in Dired with Tramp now works both from and
to remote locations. Loading TRAMP's emacs-26 files from emacs
24.5 or 25.1 also resolves the issue in these versions of emacs.)

Thank you very much and best regards,
Adam





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
  2017-10-20 17:03   ` Adam Plaice
@ 2017-10-20 17:11     ` Adam Plaice
  2017-10-20 17:32       ` Noam Postavsky
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Plaice @ 2017-10-20 17:11 UTC (permalink / raw)
  To: Michael Albinus, 28896

Whoops... I was stupidly not aware that marking the bug as done would
(falsely) mark it as done by me (not sure how to fix this — I don't want
to mess with flags that I apparently don't understand fully).





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
  2017-10-20 17:11     ` Adam Plaice
@ 2017-10-20 17:32       ` Noam Postavsky
  2017-10-20 17:44         ` Michael Albinus
  0 siblings, 1 reply; 10+ messages in thread
From: Noam Postavsky @ 2017-10-20 17:32 UTC (permalink / raw)
  To: Adam Plaice; +Cc: Michael Albinus, 28896

On Fri, Oct 20, 2017 at 1:11 PM, Adam Plaice <plaiceadam@gmail.com> wrote:
> Whoops... I was stupidly not aware that marking the bug as done would
> (falsely) mark it as done by me (not sure how to fix this — I don't want
> to mess with flags that I apparently don't understand fully).

Don't worry about it, we don't use that field value for anything (I've
marked a bunch of bugs fixed that were not actually fixed by me).

You can also consider that "Done: Adam Plaice" just means that you're
the one who confirmed it's fixed. The record of who fixed what is in
the git log.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
  2017-10-20 17:32       ` Noam Postavsky
@ 2017-10-20 17:44         ` Michael Albinus
  2017-10-20 18:30           ` Noam Postavsky
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2017-10-20 17:44 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Adam Plaice, 28896

Version: 26.1

Noam Postavsky <npostavs@users.sourceforge.net> writes:

> On Fri, Oct 20, 2017 at 1:11 PM, Adam Plaice <plaiceadam@gmail.com> wrote:
>> Whoops... I was stupidly not aware that marking the bug as done would
>> (falsely) mark it as done by me (not sure how to fix this — I don't want
>> to mess with flags that I apparently don't understand fully).
>
> Don't worry about it, we don't use that field value for anything (I've
> marked a bunch of bugs fixed that were not actually fixed by me).

Indeed. The only missing information is the Emacs version the bug is
closed with, which I add here.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
  2017-10-20 17:44         ` Michael Albinus
@ 2017-10-20 18:30           ` Noam Postavsky
  2017-10-20 18:45             ` Noam Postavsky
  0 siblings, 1 reply; 10+ messages in thread
From: Noam Postavsky @ 2017-10-20 18:30 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Adam Plaice, 28896-done

Version: 26.1

I think it only works when sending nnnn-done@debbugs.gnu.org, although
possibly not if bug is already done; let's see...

On Fri, Oct 20, 2017 at 1:44 PM, Michael Albinus <michael.albinus@gmx.de> wrote:
> Version: 26.1

> Indeed. The only missing information is the Emacs version the bug is
> closed with, which I add here.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
  2017-10-20 18:30           ` Noam Postavsky
@ 2017-10-20 18:45             ` Noam Postavsky
  2017-10-20 19:25               ` Michael Albinus
  0 siblings, 1 reply; 10+ messages in thread
From: Noam Postavsky @ 2017-10-20 18:45 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Adam Plaice, 28896

fixed 28896 26.1
quit

On Fri, Oct 20, 2017 at 2:30 PM, Noam Postavsky
<npostavs@users.sourceforge.net> wrote:
> Version: 26.1
>
> I think it only works when sending nnnn-done@debbugs.gnu.org, although
> possibly not if bug is already done; let's see...

Ah, seems like it does nothing when the bug is closed already,
control@debbugs.gnu.org it is then.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#28896: Dired move of directory to remote with TRAMP (ssh) fails
  2017-10-20 18:45             ` Noam Postavsky
@ 2017-10-20 19:25               ` Michael Albinus
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Albinus @ 2017-10-20 19:25 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Adam Plaice, 28896

Noam Postavsky <npostavs@users.sourceforge.net> writes:

> Ah, seems like it does nothing when the bug is closed already,
> control@debbugs.gnu.org it is then.

Maybe it is easier to trust debbugs.el.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-10-20 19:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18 23:46 bug#28896: Dired move of directory to remote with TRAMP (ssh) fails adam plaice
2017-10-19 18:00 ` 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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).