Subject: Re: bug#22844: 24.4; ido confused by leading ~ in dir names

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 15 Dec 2020 09:02:21 +0100

[email-masked] (Trent W. Buck) writes:

> Because I use wget -x, I have directories like this:
> ~/Desktop/www.cl.cam.ac.uk/~rja14/Papers/SEv2-c01.pdf
>
> If I open dired in ~/Desktop, I can browse to that just fine.
>
> If I use C-x C-f (ido-find-file) from ~/Desktop/www.cl.cam.ac.uk/,
> I can press ^M and got into ~rja14 just fine:
>
>    Find file: ~/Desktop/www.cl.cam.ac.uk/{~rja14/ | ~sjm217/}
> ^M  Find file: ~/Desktop/www.cl.cam.ac.uk/~rja14/{Papers/ | book/ | book.html}
>
> But if I try to navigate via C-x C-f from somewhere else (like ~/Desktop), ido goes haywire:
>
>    Find file: ~/Desktop/{www.cl.cam.ac.uk/ | ...
> ^M  Find file: ~/Desktop/www.cl.cam.ac.uk/{~rja14/ | ~sjm217/}
> ^M  Find file: ~/Desktop/~rja14/ [No match]

(This bug report unfortunately got no response at the time.)

I can confirm that this bug is still present in Emacs 28, but I have not
tried to debug it.  It looks like ido is treating ~foo as a home
directory?  Normal Emacs completion does the same, I guess, but only if
~foo exists...

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