Subject: bug#16667: Accented home dir stops ELPA package

From: Eli Zaretskii <[email-masked]>
Date: Thu, 06 Feb 2014 16:35:55 +0200

> From: Stefan Monnier <[email-masked]>
> Date: Thu, 06 Feb 2014 08:27:51 -0500
> Cc: [email-masked]
> 
> A student of mine signals the following (with Emacs-24.3 under Windows):
> 
> - start Emacs
> - M-x list-packages
> - install "lmc"
> - restart Emacs
> - open file foo.elmc
> - it's not in LMC-Asm mode as it should
> 
> Apparently the problem is linked to the fact that his home directory has
> an accented letter.

Was that letter representable by the current Windows system codepage?
If so, I don't think this is the problem.  If it wasn't representable,
such a directory cannot be used on Windows with Emacs 24.3.

> The ELPA installation produced the following messages:
> 
>    For information about GNU Emacs and the GNU system, type C-h C-a.
>    Contacting host: elpa.gnu.org:80
>    Saving file c:/Users/Propriétaire.AlienwareCedric/AppData/Roaming/.emacs.d/elpa/archives/gnu/archive-contents...
>    Wrote c:/Users/Propriétaire.AlienwareCedric/AppData/Roaming/.emacs.d/elpa/archives/gnu/archive-contents
>    Contacting host: elpa.gnu.org:80
>    Saving file c:/Users/Propriétaire.AlienwareCedric/AppData/Roaming/.emacs.d/elpa/lmc-readme.txt...
>    Wrote c:/Users/Propriétaire.AlienwareCedric/AppData/Roaming/.emacs.d/elpa/lmc-readme.txt
>    Type C-x 1 to delete the help window, C-M-v to scroll help.
>    Install package `lmc'? y
>    Contacting host: elpa.gnu.org:80
>    Wrote c:/Users/Propriétaire.AlienwareCedric/AppData/Roaming/.emacs.d/elpa/lmc-1.3/lmc.el
>    Wrote c:/Users/Propriétaire.AlienwareCedric/AppData/Roaming/.emacs.d/elpa/lmc-1.3/lmc-pkg.el
>    Wrote c:/Users/Propriétaire.AlienwareCedric/AppData/Roaming/.emacs.d/elpa/lmc-1.3/lmc-autoloads.el
>    Making version-control local to lmc-autoloads.el while let-bound!
>    autoload-find-file: Opening input file: no such file or directory, c:/Users/PropriÃ©taire.AlienwareCedric/AppData/Roaming/.emacs.d/elpa/lmc-1.3/lmc-pkg.el
> 
> we see the last line has an improperly (en/de)coded utf-8 sequence.

Hmm... can you tell which code called autoload-find-file?

> Is it already fixed in trunk?

The trunk uses an entirely different machinery for non-ASCII file
names on Windows, so it's hard to tell.  But we did fix quite a few
problems related to building and running Emacs from non-ASCII
directories, so maybe this was one of them.