unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 28264@debbugs.gnu.org
Subject: bug#28264: Accessing source directory through symlink produces false warnings
Date: Wed, 30 Aug 2017 10:37:05 +0200	[thread overview]
Message-ID: <87fuc9e9ji.fsf@detlef> (raw)
In-Reply-To: <8fo9qzeei7.fsf@fencepost.gnu.org>

Paul Eggert <eggert@cs.ucla.edu> writes:

Hi Paul,

> The problem I was thinking of does not seem to be covered by Tramp
> tests. If, for example, I do these shell commands:
>
> $ ln -s "../penguin:motd" /tmp/foo
> $ ls -l /tmp/foo
> lrwxrwxrwx 1 eggert eggert 15 Aug 29 19:00 /tmp/foo -> ../penguin:motd
>
> then (file-truename "/tmp/foo") returns "/penguin:motd" which is not
> /tmp/foo's true name as far as Emacs file-oriented commands are
> concerned.

It is. "/penguin:motd" is not a remote file name by default (it would be
only with Tramp's simplified syntax). But this is rather academical;
"/penguin:motd:" would be a remote file name. So let's continue with
this example.

I've changed the link:

# ls -l /tmp/foo
lrwxrwxrwx 1 albinus albinus 16 Aug 30 10:10 /tmp/foo -> ../penguin:motd:

The problem in returning a remote file name still exists, maybe you
could check your change, again? (file-truename "/tmp/foo") goes remote
to "/penguin:motd:".

For Tramp, we have

(file-truename "/ssh::/tmp/foo") => "/ssh:hostname:/penguin:motd:"

This is not wrong, but I'd prefer to get its quoted variant
"/ssh:hostname:/:/penguin:motd:". Will work on this.

And I'll add your test to tramp-tests.el.

Best regards, Michael.





      reply	other threads:[~2017-08-30  8:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 18:25 bug#28264: Accessing source directory through symlink produces false warnings Glenn Morris
2017-08-29  4:57 ` Paul Eggert
2017-08-29 20:41   ` Michael Albinus
2017-08-30  2:20     ` Paul Eggert
2017-08-30  8:37       ` Michael Albinus [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fuc9e9ji.fsf@detlef \
    --to=michael.albinus@gmx.de \
    --cc=28264@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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 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).