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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 30 Nov 2012 22:07:29 +0200

> From: "Drew Adams" <[email-masked]>
> Date: Fri, 30 Nov 2012 11:50:36 -0800
> Cc: [email-masked]
> 
> > 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.

> surprisingly, that text is also there in Emacs 23, even though this behavior
> seems new - it is not even in 24.2 (for Windows).

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)

?

> >    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.
This support always worked in Emacs on Windows.  ~USER for any other
username doesn't work on Windows, and never did.

(HOME is not recognized by MS-Windows itself, but HOMEDRIVE and
HOMEPATH are, and they change for each user as you'd expect.)