unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9197: 24.0.50; Visiting a remote file in one server, when default directory is in another one
@ 2011-07-29  8:56 Dani Moncayo
  2011-07-29 15:10 ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Dani Moncayo @ 2011-07-29  8:56 UTC (permalink / raw)
  To: 9197

Recipe from "emacs -Q":

1. Change the current buffer's default directory to some path in
"host-a": M-x cd <RET> /user-a@host-a:/dir-a <RET>.
2. Try to visit some (existing) file in host-b: C-x C-f
/user-b@host-b:/path-to-some-file <RET>.

Note that, in step #2, just before hitting <RET>, the contents of the
minibuffer are:
   /user-a@host-a:/dir-a//user-b@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@host-b:/path-to-some-file".

Note also a different but related problem: the highlighting of the
minibuffer text is consistent with the current behavior (only the
"/dir-a/" part is in gray color).  Thus, this should be fixed too, to
make it consistent with the right behavior. I.e., in this example, the
part in gray should be "/user-a@host-a:/dir-a/".


In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-07-25 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'

-- 
Dani Moncayo





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

* bug#9197: 24.0.50; Visiting a remote file in one server, when default directory is in another one
  2011-07-29  8:56 bug#9197: 24.0.50; Visiting a remote file in one server, when default directory is in another one Dani Moncayo
@ 2011-07-29 15:10 ` Michael Albinus
  2011-07-29 16:36   ` Dani Moncayo
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2011-07-29 15:10 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 9197

Dani Moncayo <dmoncayo@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@host-a:/dir-a <RET>.
> 2. Try to visit some (existing) file in host-b: C-x C-f
> /user-b@host-b:/path-to-some-file <RET>.
>
> Note that, in step #2, just before hitting <RET>, the contents of the
> minibuffer are:
>    /user-a@host-a:/dir-a//user-b@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@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@host-a:/dir-a///user-b@host-b:/path-to-some-file

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

Best regards, Michael.





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

* bug#9197: 24.0.50; Visiting a remote file in one server, when default directory is in another one
  2011-07-29 15:10 ` Michael Albinus
@ 2011-07-29 16:36   ` Dani Moncayo
  2011-07-30 15:54     ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Dani Moncayo @ 2011-07-29 16:36 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 9197

Hi Michael,

On Fri, Jul 29, 2011 at 17:10, Michael Albinus <michael.albinus@gmx.de> wrote:
>
> 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@host-a:/dir-a///user-b@host-b:/path-to-some-file
>
> See also (info "(tramp)Filename completion")

I intuitively expected such behavior because I had read nodes [1] and
[2], but not [3].

Maybe the explanation of "ignored chunks in find-file input" in node
[1] should be generalized to take remote files into account, or at
least add some link to node [3].

Anyway, I now understand the current behavior, and you can close this
bug report.

Thanks.

Footnotes:
[1] "(emacs)Minibuffer File"
[2] "(emacs)Remote Files"
[3] "(tramp)Filename completion"

-- 
Dani Moncayo





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

* bug#9197: 24.0.50; Visiting a remote file in one server, when default directory is in another one
  2011-07-29 16:36   ` Dani Moncayo
@ 2011-07-30 15:54     ` Michael Albinus
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2011-07-30 15:54 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 9197-done

Dani Moncayo <dmoncayo@gmail.com> writes:

> Hi Michael,

Hi Dani,

> Maybe the explanation of "ignored chunks in find-file input" in node
> [1] should be generalized to take remote files into account, or at
> least add some link to node [3].

I have added a link.

> Anyway, I now understand the current behavior, and you can close this
> bug report.

Done.

> Thanks.

Thanks for reporting, and best regards, Michael.





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

end of thread, other threads:[~2011-07-30 15:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-29  8:56 bug#9197: 24.0.50; Visiting a remote file in one server, when default directory is in another one Dani Moncayo
2011-07-29 15:10 ` Michael Albinus
2011-07-29 16:36   ` Dani Moncayo
2011-07-30 15:54     ` 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).