unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 47625-done@debbugs.gnu.org, Filipp Gunbin <fgunbin@fastmail.fm>
Subject: bug#47625: 28.0.50; dired-do-symlink creates invalid symlinks when using Tramp
Date: Thu, 06 May 2021 13:15:29 +0200	[thread overview]
Message-ID: <87mtt83yge.fsf@gmx.de> (raw)
In-Reply-To: <87pmy4xjjw.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 06 May 2021 12:06:59 +0200")

Version: 28.1

Lars Ingebrigtsen <larsi@gnus.org> writes:

Hi,

> Filipp Gunbin <fgunbin@fastmail.fm> writes:
>
>> emacs -Q
>> open dired at /sudo::/tmp/
>> M-! touch foo
>> S (dired-do-symlink) on foo, enter /tmp/bar (without tramp prefix) at
>> the prompt
>> g (refresh dired)
>>
>> The result is "bar -> /sudo:root@fgunbin.local:/tmp/foo", which is
>> an invalid symlink.
>
> I can reproduce this bug in Emacs 28, but I haven't tried to debug it.
> Perhaps it's obvious what's going wrong to somebody who knows how Tramp
> works; Michael added to the CCs.

Oops, I've overlooked this when it arrived. Sorry.

Same here, I can reproduce it. Surprisingly, it isn't a Tramp error,
because Tramp isn't involved :-)

The scenario described above results in the call

(make-symbolic-link "/sudo:root@server:/tmp/foo" "/tmp/bar" nil)

Tramp would be involved if either

- LINKNAME is a relative file name, and default-directory is remote, or
- LINKNAME is a remote file name.

LINKNAME is "/tmp/bar", and both conditions do not apply.

"/sudo:root@gandalf:/tmp/foo", the TARGET of the call, must only be a
string. Which syntax it is, or whether it is a valid file name, doesn't
matter.

So I fixed it in dired. If you try to create a symlink between two files
on different hosts, you'll get an error now.

Closing the bug.

Best regards, Michael.





  reply	other threads:[~2021-05-06 11:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 20:29 bug#47625: 28.0.50; dired-do-symlink creates invalid symlinks when using Tramp Filipp Gunbin
2021-05-06 10:06 ` Lars Ingebrigtsen
2021-05-06 11:15   ` Michael Albinus [this message]
2021-05-06 15:26     ` Filipp Gunbin

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=87mtt83yge.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=47625-done@debbugs.gnu.org \
    --cc=fgunbin@fastmail.fm \
    --cc=larsi@gnus.org \
    /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).