GNU bug report logs -
#53053
28.0.90; Tramp completion bug of path /sudo::~/
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Thu, 6 Jan 2022 12:54:01 UTC
Severity: normal
Found in version 28.0.90
Fixed in version 28.2
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
Hi,
> So maybe the "right fix" is to change Tramp's handling of
> `substitute-in-file-name` such that
> "/sudo::~" returns "/sudo:root@<host>:~" instead of
> "/sudo:root@<host>:~/",
> but in the mean time I installed the patch below which should avoid
> this problem at least in the original recipe. You can still bump into
> side effects of the underlying problem, of course.
In tramp-handle-substitute-in-file-name, there is the code
--8<---------------cut here---------------start------------->8---
;; "/m:h:~" does not work for completion. We use "/m:h:~/".
(if (and (stringp localname) (string-equal "~" localname))
(concat filename "/")
filename))))
--8<---------------cut here---------------end--------------->8---
The ChangeLog does not give a reasoning. So I've removed this, and
testing with Emacs 28.0.50 shows proper behavior now with the recipe.
I've pushed it to master. The patch from Stefan could be reverted I
believe, unless it is also good for something else.
The Tramp change will also appear in Tramp 2.5.2.2, which is the
upcoming version on GNU ELPA. Later, it will be merged into Emacs 28.2.
> Stefan
Best regards, Michael.
This bug report was last modified 3 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.