unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16851: 24.3.50; file-truename removes trailing / on remote hosts
@ 2014-02-23 12:12 Leo Liu
  2014-02-23 13:10 ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Liu @ 2014-02-23 12:12 UTC (permalink / raw)
  To: 16851; +Cc: Michael Albinus

1. Open dired on a remote host
2. eval (file-truename default-directory)

The trailing / is gone.

Leo





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

* bug#16851: 24.3.50; file-truename removes trailing / on remote hosts
  2014-02-23 12:12 bug#16851: 24.3.50; file-truename removes trailing / on remote hosts Leo Liu
@ 2014-02-23 13:10 ` Andreas Schwab
  2014-02-23 13:19   ` Juanma Barranquero
  2014-02-23 14:52   ` Michael Albinus
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Schwab @ 2014-02-23 13:10 UTC (permalink / raw)
  To: Leo Liu; +Cc: Michael Albinus, 16851

Leo Liu <sdl.web@gmail.com> writes:

> 1. Open dired on a remote host
> 2. eval (file-truename default-directory)
>
> The trailing / is gone.

I don't think this is a bug as file-truename operates on file names, but
default-directory is a directory (so use directory-file-name first, and
file-name-as-directory afterwards).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#16851: 24.3.50; file-truename removes trailing / on remote hosts
  2014-02-23 13:10 ` Andreas Schwab
@ 2014-02-23 13:19   ` Juanma Barranquero
  2014-02-23 13:26     ` Andreas Schwab
  2014-02-23 14:52   ` Michael Albinus
  1 sibling, 1 reply; 9+ messages in thread
From: Juanma Barranquero @ 2014-02-23 13:19 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Michael Albinus, Leo Liu, 16851

On Sun, Feb 23, 2014 at 2:10 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:

> I don't think this is a bug as file-truename operates on file names, but
> default-directory is a directory

And yet

(file-truename default-directory) => "c:/Devel/emacs/repo/trunk/"

   J





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

* bug#16851: 24.3.50; file-truename removes trailing / on remote hosts
  2014-02-23 13:19   ` Juanma Barranquero
@ 2014-02-23 13:26     ` Andreas Schwab
  2014-02-23 13:28       ` Juanma Barranquero
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2014-02-23 13:26 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Michael Albinus, Leo Liu, 16851

Juanma Barranquero <lekktu@gmail.com> writes:

> On Sun, Feb 23, 2014 at 2:10 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>
>> I don't think this is a bug as file-truename operates on file names, but
>> default-directory is a directory
>
> And yet
>
> (file-truename default-directory) => "c:/Devel/emacs/repo/trunk/"

How is that a contradiction?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#16851: 24.3.50; file-truename removes trailing / on remote hosts
  2014-02-23 13:26     ` Andreas Schwab
@ 2014-02-23 13:28       ` Juanma Barranquero
  2014-02-23 13:37         ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Juanma Barranquero @ 2014-02-23 13:28 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Michael Albinus, Leo Liu, 16851

On Sun, Feb 23, 2014 at 2:26 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:

> How is that a contradiction?

It does not remove the trailing slash for a local directory.
Apparently, it does for remote host directories.





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

* bug#16851: 24.3.50; file-truename removes trailing / on remote hosts
  2014-02-23 13:28       ` Juanma Barranquero
@ 2014-02-23 13:37         ` Andreas Schwab
  2014-02-23 13:39           ` Juanma Barranquero
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2014-02-23 13:37 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Michael Albinus, Leo Liu, 16851

Juanma Barranquero <lekktu@gmail.com> writes:

> On Sun, Feb 23, 2014 at 2:26 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>
>> How is that a contradiction?
>
> It does not remove the trailing slash for a local directory.
> Apparently, it does for remote host directories.

Your use is outside the domain of the function, so nothing is
guaranteed.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#16851: 24.3.50; file-truename removes trailing / on remote hosts
  2014-02-23 13:37         ` Andreas Schwab
@ 2014-02-23 13:39           ` Juanma Barranquero
  0 siblings, 0 replies; 9+ messages in thread
From: Juanma Barranquero @ 2014-02-23 13:39 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Michael Albinus, Leo Liu, 16851

On Sun, Feb 23, 2014 at 2:37 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:

> Your use is outside the domain of the function

How so?





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

* bug#16851: 24.3.50; file-truename removes trailing / on remote hosts
  2014-02-23 13:10 ` Andreas Schwab
  2014-02-23 13:19   ` Juanma Barranquero
@ 2014-02-23 14:52   ` Michael Albinus
  2014-02-24 20:21     ` Stefan Monnier
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2014-02-23 14:52 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Leo Liu, 16851-done

Andreas Schwab <schwab@linux-m68k.org> writes:

> Leo Liu <sdl.web@gmail.com> writes:
>
>> 1. Open dired on a remote host
>> 2. eval (file-truename default-directory)
>>
>> The trailing / is gone.
>
> I don't think this is a bug as file-truename operates on file names, but
> default-directory is a directory (so use directory-file-name first, and
> file-name-as-directory afterwards).

I tend to agree that this is not a bug. OTOH, it is easy to change Tramp
to behave like `file-truename' on local file names, so I've changed it.

> Andreas.

Best regards, Michael.





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

* bug#16851: 24.3.50; file-truename removes trailing / on remote hosts
  2014-02-23 14:52   ` Michael Albinus
@ 2014-02-24 20:21     ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2014-02-24 20:21 UTC (permalink / raw)
  To: 16851; +Cc: michael.albinus, sdl.web

> I tend to agree that this is not a bug. OTOH, it is easy to change Tramp
> to behave like `file-truename' on local file names, so I've changed it.

Thanks.  It's clearly the better behavior (since it preserves more info
from its argument).


        Stefan





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

end of thread, other threads:[~2014-02-24 20:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23 12:12 bug#16851: 24.3.50; file-truename removes trailing / on remote hosts Leo Liu
2014-02-23 13:10 ` Andreas Schwab
2014-02-23 13:19   ` Juanma Barranquero
2014-02-23 13:26     ` Andreas Schwab
2014-02-23 13:28       ` Juanma Barranquero
2014-02-23 13:37         ` Andreas Schwab
2014-02-23 13:39           ` Juanma Barranquero
2014-02-23 14:52   ` Michael Albinus
2014-02-24 20:21     ` Stefan Monnier

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