Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early

From: Eli Zaretskii <[email-masked]>
Date: Wed, 29 Apr 2020 19:10:00 +0300

> From: Michael Albinus <[email-masked]>
> Cc: Dmitry Gutov <[email-masked]>,  [email-masked],
>   [email-masked],  [email-masked]
> Date: Wed, 29 Apr 2020 17:49:46 +0200
> 
> > Michael, can you confirm?  (And in any case, this issue should
> > be handled in the file-remote-p handler.)
> 
> Tramp checks for all remote hosts whether they can expand "~/" (or
> "~user/" in general). If possible, it does.
> 
> Your patch uses `expand-file-name', and that's all what we have to say
> to Tramp.

My patch only calls expand-file-name on local file names.  For remote
file names, I've left the result of the call to file-remote-p
unaltered.  Would that be a problem if the file name, after stripping
the remote protocol parts, started with "~/" ?  And if so, what should
be done here about these cases?