all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#47625: 28.0.50; dired-do-symlink creates invalid symlinks when using Tramp
@ 2021-04-06 20:29 Filipp Gunbin
  2021-05-06 10:06 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Filipp Gunbin @ 2021-04-06 20:29 UTC (permalink / raw)
  To: 47625


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.


In GNU Emacs 28.0.50 (build 8, x86_64-apple-darwin20.3.0, NS appkit-2022.30 Version 11.2.1 (Build 20D74))
 of 2021-04-05 built on fgunbin.local
Repository revision: 257caab1d0bea17fb9bfb5a9e2c782cf96a7d052
Repository branch: master
System Description:  macOS 11.2.3





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

* bug#47625: 28.0.50; dired-do-symlink creates invalid symlinks when using Tramp
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-06 10:06 UTC (permalink / raw)
  To: 47625; +Cc: Michael Albinus

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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#47625: 28.0.50; dired-do-symlink creates invalid symlinks when using Tramp
  2021-05-06 10:06 ` Lars Ingebrigtsen
@ 2021-05-06 11:15   ` Michael Albinus
  2021-05-06 15:26     ` Filipp Gunbin
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2021-05-06 11:15 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 47625-done, Filipp Gunbin

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.





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

* bug#47625: 28.0.50; dired-do-symlink creates invalid symlinks when using Tramp
  2021-05-06 11:15   ` Michael Albinus
@ 2021-05-06 15:26     ` Filipp Gunbin
  0 siblings, 0 replies; 4+ messages in thread
From: Filipp Gunbin @ 2021-05-06 15:26 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Lars Ingebrigtsen, 47625

Thank you!





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

end of thread, other threads:[~2021-05-06 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2021-05-06 15:26     ` Filipp Gunbin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.