GNU bug report logs - #9197
24.0.50; Visiting a remote file in one server, when default directory is in another one

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Fri, 29 Jul 2011 08:57:01 UTC

Severity: normal

Found in version 24.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 9197 <at> debbugs.gnu.org
Subject: bug#9197: 24.0.50; Visiting a remote file in one server, when default directory is in another one
Date: Fri, 29 Jul 2011 17:10:00 +0200
Dani Moncayo <dmoncayo <at> gmail.com> writes:

> Recipe from "emacs -Q":
>
> 1. Change the current buffer's default directory to some path in
> "host-a": M-x cd <RET> /user-a <at> host-a:/dir-a <RET>.
> 2. Try to visit some (existing) file in host-b: C-x C-f
> /user-b <at> host-b:/path-to-some-file <RET>.
>
> Note that, in step #2, just before hitting <RET>, the contents of the
> minibuffer are:
>    /user-a <at> host-a:/dir-a//user-b <at> host-b:/path-to-some-file
>
> Expected behavior: the file "/path-to-some-file" (from "host-b") is visited.
>
> Observed behavior: an error occurs, because Emacs tried to visit a
> (nonexistent) file in "host-a", whose path is
> "/user-b <at> host-b:/path-to-some-file".

This is the intended behaviour. When your buffer's default directory is
remote and you want to open a local file or a file on another remote
server, you need three slashes, like this:

  /user-a <at> host-a:/dir-a///user-b <at> host-b:/path-to-some-file

See also (info "(tramp)Filename completion")

Best regards, Michael.




This bug report was last modified 13 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.