Subject: bug#13033: 24.3.50; regression: read-file-name-internal handles "~" wrong

From: "Drew Adams" <[email-masked]>
Date: Fri, 30 Nov 2012 13:09:26 -0800

> > > What does C-x C-f ~dradams/.emacs RET do?  It should open 
> > > your ~/.emacs file.
> > 
> > It does.  Now.  But it does not in older releases.
> 
> Which older releases?  ~username/.emacs works for me on Windows in all
> releases since 21.4.

I meant that what is new (what this bug report is about) is new. ;-)
That is, completion of `~' to `~dradams/', or of `~dr' to `~dradams/', or
`~dradams' to `~dradams/'.

> What happens in Emacs 24.2 for you?  Are you talking about
> C-x C-f ~dradams/.emacs RET or about
> (read-file-name-internal "~" 'file-exists-p nil)

The latter.  See above.

> > >    An initial `~USER/' expands to USER's home directory.
> > 
> > That's OK for an Emacs convention.  I just was not aware of 
> > it.  (And for MS Windows itself there is still no association
> > between HOME and the user login name, AFAIK.
>
> Emacs on Windows supports ~USER only when USER is the current user.

Yes, that's what the doc says.  But until now, Emacs did not support expansion
of ~USER.  It supported only "expansion" of ~USER/.

> This support always worked in Emacs on Windows.

Expansion of ~USER/, yes; of ~USER, no.