unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
@ 2016-11-26 18:33 dalokmarcinak
  2016-11-26 19:19 ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: dalokmarcinak @ 2016-11-26 18:33 UTC (permalink / raw)
  To: 25038

[-- Attachment #1: Type: text/plain, Size: 3789 bytes --]



If I start Emacs by opening (double-clicking) a file that has its extension associated
with Emacs, my user directory is not found, my .emacs is not run
etc. This does not happen if I start emacs from the command-line or by
double-clicking the executable, this way my user directory is correctly found.

Here is the error message:
Warning (initialization): Unable to create `user-emacs-directory' (~/.emacs.d/).
Any data that would normally be written there may be lost!
If you never want to see this message again,
customize the variable `user-emacs-directory-warning'.
Error (initialization): User M rton has no home directory
Warning (initialization): An error occurred while loading ‘nil’:

File error: Opening directory, No such file or directory, c:/Users/M\341rton/AppData/Roaming

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.



In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
 of 2016-09-17 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 10.0.14393
Configured using:
 'configure --without-dbus --without-compress-install CFLAGS=-static'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: HUN
  locale-coding-system: cp1250

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epg mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils dired neotree finder-inf
package epg-config sql view thingatpt edmacro kmacro python tramp-sh
tramp tramp-compat auth-source cl-seq eieio eieio-core cl-macs gnus-util
mm-util help-fns mail-prsvr password-cache tramp-loaddefs trampver
ucs-normalize shell pcomplete format-spec advice json map seq byte-opt
gv bytecomp byte-compile cl-extra help-mode easymenu cconv comint ring
cl-loaddefs pcase cl-lib ansi-color time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32
ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 16 267119 13282)
 (symbols 56 26403 0)
 (miscs 48 51 130)
 (strings 32 39093 8709)
 (string-bytes 1 1184359)
 (vectors 16 42461)
 (vector-slots 8 769735 4330)
 (floats 8 247 62)
 (intervals 56 243 17)
 (buffers 976 18))

[-- Attachment #2: Type: text/html, Size: 7313 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-26 18:33 bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations dalokmarcinak
@ 2016-11-26 19:19 ` Eli Zaretskii
  2016-11-26 20:18   ` Márton Marczell
  2016-11-26 20:26   ` Eli Zaretskii
  0 siblings, 2 replies; 13+ messages in thread
From: Eli Zaretskii @ 2016-11-26 19:19 UTC (permalink / raw)
  To: dalokmarcinak; +Cc: 25038

> From: <dalokmarcinak@gmail.com>
> Date: Sat, 26 Nov 2016 19:33:29 +0100
> 
> If I start Emacs by opening (double-clicking) a file that has its extension associated
> with Emacs, my user directory is not found, my .emacs is not run
> etc. This does not happen if I start emacs from the command-line or by
> double-clicking the executable, this way my user directory is correctly found.
> 
> Here is the error message:
> 
> Warning (initialization): Unable to create `user-emacs-directory' (~/.emacs.d/).
> Any data that would normally be written there may be lost!
> If you never want to see this message again,
> customize the variable `user-emacs-directory-warning'.
> Error (initialization): User M rton has no home directory
> Warning (initialization): An error occurred while loading ‘nil’:
> File error: Opening directory, No such file or directory, c:/Users/M\341rton/AppData/Roaming
> To ensure normal operation, you should investigate and remove the
> cause of the error in your initialization file. Start Emacs with
> the ‘--debug-init’ option to view a complete error backtrace.

What do these display:

  M-: (user-login-name) RET
  M-: (user-real-login-name) RET

Please try this both in the session started by clicking a file
associated with Emacs and in a session started from the command-line.

Thanks.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-26 19:19 ` Eli Zaretskii
@ 2016-11-26 20:18   ` Márton Marczell
  2016-11-26 20:26   ` Eli Zaretskii
  1 sibling, 0 replies; 13+ messages in thread
From: Márton Marczell @ 2016-11-26 20:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25038

[-- Attachment #1: Type: text/plain, Size: 1532 bytes --]

In both cases they both display "Márton".

2016-11-26 20:19 GMT+01:00 Eli Zaretskii <eliz@gnu.org>:

> > From: <dalokmarcinak@gmail.com>
> > Date: Sat, 26 Nov 2016 19:33:29 +0100
> >
> > If I start Emacs by opening (double-clicking) a file that has its
> extension associated
> > with Emacs, my user directory is not found, my .emacs is not run
> > etc. This does not happen if I start emacs from the command-line or by
> > double-clicking the executable, this way my user directory is correctly
> found.
> >
> > Here is the error message:
> >
> > Warning (initialization): Unable to create `user-emacs-directory'
> (~/.emacs.d/).
> > Any data that would normally be written there may be lost!
> > If you never want to see this message again,
> > customize the variable `user-emacs-directory-warning'.
> > Error (initialization): User M rton has no home directory
> > Warning (initialization): An error occurred while loading ‘nil’:
> > File error: Opening directory, No such file or directory,
> c:/Users/M\341rton/AppData/Roaming
> > To ensure normal operation, you should investigate and remove the
> > cause of the error in your initialization file. Start Emacs with
> > the ‘--debug-init’ option to view a complete error backtrace.
>
> What do these display:
>
>   M-: (user-login-name) RET
>   M-: (user-real-login-name) RET
>
> Please try this both in the session started by clicking a file
> associated with Emacs and in a session started from the command-line.
>
> Thanks.
>

[-- Attachment #2: Type: text/html, Size: 2009 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-26 19:19 ` Eli Zaretskii
  2016-11-26 20:18   ` Márton Marczell
@ 2016-11-26 20:26   ` Eli Zaretskii
  2016-11-26 20:57     ` Márton Marczell
  1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2016-11-26 20:26 UTC (permalink / raw)
  To: dalokmarcinak; +Cc: 25038

> Date: Sat, 26 Nov 2016 21:19:01 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 25038@debbugs.gnu.org
> 
> What do these display:
> 
>   M-: (user-login-name) RET
>   M-: (user-real-login-name) RET
> 
> Please try this both in the session started by clicking a file
> associated with Emacs and in a session started from the command-line.

And please also do the same with

  M-: (getenv "HOME") RET

Also, please show the command that is configured in the file
association to invoke Emacs when that file is clicked.

Finally, did this ever work with any previous Emacs version, and with
a non-ASCII user name?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-26 20:26   ` Eli Zaretskii
@ 2016-11-26 20:57     ` Márton Marczell
  2016-11-26 20:58       ` Márton Marczell
  2016-11-27  3:30       ` Eli Zaretskii
  0 siblings, 2 replies; 13+ messages in thread
From: Márton Marczell @ 2016-11-26 20:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25038

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

In both cases it says:
#("C:\\Users\\Márton\\AppData\\Roaming" 0 31 (charset windows-1250))

I configured the file association through the Windows 10 GUI interface as
follows:
1. Doubleclick file with a currently unknown extension.
2. File association dialog comes up. Click "More apps"
3. Scroll down and click "Look for another app on this PC"
4. File open dialog comes up. Browse for "runemacs.exe" and double-click it.
When I look at the "Command Line" column for the currently running program
in Task Manager, it simply shows

"D:\Program Files (x86)\emacs\bin\emacs.exe"

with no arguments other than the filename.

What's worse, it seems completely random whether the error comes up. For
some files it doesn't appear, for some files it does. But if I open the
same file repeatedly it always does the same thing. So for a certain file
it is consistent. It is not dependent on the file extension though.

2016-11-26 21:26 GMT+01:00 Eli Zaretskii <eliz@gnu.org>:

> > Date: Sat, 26 Nov 2016 21:19:01 +0200
> > From: Eli Zaretskii <eliz@gnu.org>
> > Cc: 25038@debbugs.gnu.org
> >
> > What do these display:
> >
> >   M-: (user-login-name) RET
> >   M-: (user-real-login-name) RET
> >
> > Please try this both in the session started by clicking a file
> > associated with Emacs and in a session started from the command-line.
>
> And please also do the same with
>
>   M-: (getenv "HOME") RET
>
> Also, please show the command that is configured in the file
> association to invoke Emacs when that file is clicked.
>
> Finally, did this ever work with any previous Emacs version, and with
> a non-ASCII user name?
>

[-- Attachment #2: Type: text/html, Size: 2326 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-26 20:57     ` Márton Marczell
@ 2016-11-26 20:58       ` Márton Marczell
  2016-11-27  3:30         ` Eli Zaretskii
  2016-11-27  3:30       ` Eli Zaretskii
  1 sibling, 1 reply; 13+ messages in thread
From: Márton Marczell @ 2016-11-26 20:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25038

[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]

I do not recall this error in previous Emacs versions.

2016-11-26 21:57 GMT+01:00 Márton Marczell <dalokmarcinak@gmail.com>:

> In both cases it says:
> #("C:\\Users\\Márton\\AppData\\Roaming" 0 31 (charset windows-1250))
>
> I configured the file association through the Windows 10 GUI interface as
> follows:
> 1. Doubleclick file with a currently unknown extension.
> 2. File association dialog comes up. Click "More apps"
> 3. Scroll down and click "Look for another app on this PC"
> 4. File open dialog comes up. Browse for "runemacs.exe" and double-click
> it.
> When I look at the "Command Line" column for the currently running program
> in Task Manager, it simply shows
>
> "D:\Program Files (x86)\emacs\bin\emacs.exe"
>
> with no arguments other than the filename.
>
> What's worse, it seems completely random whether the error comes up. For
> some files it doesn't appear, for some files it does. But if I open the
> same file repeatedly it always does the same thing. So for a certain file
> it is consistent. It is not dependent on the file extension though.
>
> 2016-11-26 21:26 GMT+01:00 Eli Zaretskii <eliz@gnu.org>:
>
>> > Date: Sat, 26 Nov 2016 21:19:01 +0200
>> > From: Eli Zaretskii <eliz@gnu.org>
>> > Cc: 25038@debbugs.gnu.org
>> >
>> > What do these display:
>> >
>> >   M-: (user-login-name) RET
>> >   M-: (user-real-login-name) RET
>> >
>> > Please try this both in the session started by clicking a file
>> > associated with Emacs and in a session started from the command-line.
>>
>> And please also do the same with
>>
>>   M-: (getenv "HOME") RET
>>
>> Also, please show the command that is configured in the file
>> association to invoke Emacs when that file is clicked.
>>
>> Finally, did this ever work with any previous Emacs version, and with
>> a non-ASCII user name?
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2832 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-26 20:57     ` Márton Marczell
  2016-11-26 20:58       ` Márton Marczell
@ 2016-11-27  3:30       ` Eli Zaretskii
  1 sibling, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2016-11-27  3:30 UTC (permalink / raw)
  To: Márton Marczell; +Cc: 25038

> From: Márton Marczell <dalokmarcinak@gmail.com>
> Date: Sat, 26 Nov 2016 21:57:46 +0100
> Cc: 25038@debbugs.gnu.org
> 
> What's worse, it seems completely random whether the error comes up. For some files it doesn't appear, for
> some files it does. But if I open the same file repeatedly it always does the same thing. So for a certain file it is
> consistent. It is not dependent on the file extension though.

Can you try figuring out which files trigger the problem and which
ones don't?  Does their directory or disk matter, perhaps?  Or maybe
whether they exceed the 8+3 file-name limits?  Or something else?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-26 20:58       ` Márton Marczell
@ 2016-11-27  3:30         ` Eli Zaretskii
  2016-11-27  9:20           ` Márton Marczell
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2016-11-27  3:30 UTC (permalink / raw)
  To: Márton Marczell; +Cc: 25038

> From: Márton Marczell <dalokmarcinak@gmail.com>
> Date: Sat, 26 Nov 2016 21:58:23 +0100
> Cc: 25038@debbugs.gnu.org
> 
> I do not recall this error in previous Emacs versions.

What was the previous version of Emacs you used?  And was that also on
Windows 10?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-27  3:30         ` Eli Zaretskii
@ 2016-11-27  9:20           ` Márton Marczell
  2016-11-27 16:08             ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Márton Marczell @ 2016-11-27  9:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25038

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

My previous Emacs version was 24.5 I believe.

I realized that Emacs starts up normally exactly when the path to the
working directory contains an accented letter. For example if I start emacs
in the folder "D:\a\" it displays the error, but if I start it in "D:\á\"
it works. So this was what distinguished those files from each other.

2016-11-27 4:30 GMT+01:00 Eli Zaretskii <eliz@gnu.org>:

> > From: Márton Marczell <dalokmarcinak@gmail.com>
> > Date: Sat, 26 Nov 2016 21:58:23 +0100
> > Cc: 25038@debbugs.gnu.org
> >
> > I do not recall this error in previous Emacs versions.
>
> What was the previous version of Emacs you used?  And was that also on
> Windows 10?
>

[-- Attachment #2: Type: text/html, Size: 1158 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-27  9:20           ` Márton Marczell
@ 2016-11-27 16:08             ` Eli Zaretskii
  2016-11-27 20:58               ` Márton Marczell
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2016-11-27 16:08 UTC (permalink / raw)
  To: Márton Marczell; +Cc: 25038

> From: Márton Marczell <dalokmarcinak@gmail.com>
> Date: Sun, 27 Nov 2016 10:20:55 +0100
> Cc: 25038@debbugs.gnu.org
> 
> My previous Emacs version was 24.5 I believe.

Hmm... I don't think anything's changed in the related areas since
24.5.

> I realized that Emacs starts up normally exactly when the path to the working directory contains an accented
> letter. For example if I start emacs in the folder "D:\a\" it displays the error, but if I start it in "D:\á\" it works. So
> this was what distinguished those files from each other.

Thanks, this is beginning to make sense, although I still don't know
what could be the root cause.

If possible, I'd like to eliminate yet another factor: the fact that
the problem happens when you click on a file name in Explorer, but not
when you invoke Emacs from the cmd prompt.  Specifically, if you
invoke Emacs from the cmd prompt in the directory without accent and a
single file command-line argument, does it fail as when you click in
Explorer?  And does it also succeed if the directory from which you
invoke Emacs does have an accented letter?

Another thing to try is to set HOME in the environment to point to a
directory whose name includes accents -- does that fail in the same
way as with your default setup?  I expect it to fail in the same way.

If these two changes in the recipe still succeed in reproducing the
problem, it will be easier for me to try to reproduce it on my system,
and debug it here.

Thanks.

Btw, do you have any software installed, like a non-standard shell or
some other add-on, which could cause PWD to be set in the environment?
If so, what is the value of that variable?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-27 16:08             ` Eli Zaretskii
@ 2016-11-27 20:58               ` Márton Marczell
  2016-11-28 15:46                 ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Márton Marczell @ 2016-11-27 20:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25038

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

Yes I can reproduce the error from cmd. Command line argument is not even
needed. Simply launching emacs from the cmd prompt gives the error when the
directory path does not have an accented letter in it, and succeeds when it
does. The default directory for cmd is C:\Users\Márton, that's why I
couldn't reproduce the error from cmd initially.

PWD is not defined anywhere. (getenv "PWD") gives back nil in both cases.

Running

set HOME=D:\a
runemacs

makes Emacs create a new .emacs.d folder in D:\a, whereas

set HOME=D:\á
runemacs

makes Emacs create a folder named D:\� which it is then unable to populate,
failing with a different error ("Cannot open load file: No such file or
directory, ~/abbrev_defs")

[-- Attachment #2: Type: text/html, Size: 934 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-27 20:58               ` Márton Marczell
@ 2016-11-28 15:46                 ` Eli Zaretskii
  2016-11-28 17:20                   ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2016-11-28 15:46 UTC (permalink / raw)
  To: Márton Marczell; +Cc: 25038-done

> From: Márton Marczell <dalokmarcinak@gmail.com>
> Date: Sun, 27 Nov 2016 21:58:02 +0100
> Cc: 25038@debbugs.gnu.org
> 
> Yes I can reproduce the error from cmd. Command line argument is not even needed. Simply launching
> emacs from the cmd prompt gives the error when the directory path does not have an accented letter in it,
> and succeeds when it does. The default directory for cmd is C:\Users\Márton, that's why I couldn't reproduce
> the error from cmd initially.
> 
> PWD is not defined anywhere. (getenv "PWD") gives back nil in both cases. 
> 
> Running 
> 
> set HOME=D:\a
> runemacs
> 
> makes Emacs create a new .emacs.d folder in D:\a, whereas
> 
> set HOME=D:\á
> runemacs
> 
> makes Emacs create a folder named D:\� which it is then unable to populate, failing with a different error
> ("Cannot open load file: No such file or directory, ~/abbrev_defs")

Thanks, I reproduced this on my system, and fixed the underlying bugs
for the next release (Emacs 25.2).

I'm closing the bug.  Feel free to reopen if you (or someone else)
find left-overs or new problems with the fix.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations
  2016-11-28 15:46                 ` Eli Zaretskii
@ 2016-11-28 17:20                   ` Eli Zaretskii
  0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2016-11-28 17:20 UTC (permalink / raw)
  To: dalokmarcinak; +Cc: 25038

> Date: Mon, 28 Nov 2016 17:46:21 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 25038-done@debbugs.gnu.org
> 
> Thanks, I reproduced this on my system, and fixed the underlying bugs
> for the next release (Emacs 25.2).

Oh, and you were right: this regression was introduced in Emacs 25.1.





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-11-28 17:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-26 18:33 bug#25038: 25.1; Accent in Windows username prevents Emacs from loading customizations dalokmarcinak
2016-11-26 19:19 ` Eli Zaretskii
2016-11-26 20:18   ` Márton Marczell
2016-11-26 20:26   ` Eli Zaretskii
2016-11-26 20:57     ` Márton Marczell
2016-11-26 20:58       ` Márton Marczell
2016-11-27  3:30         ` Eli Zaretskii
2016-11-27  9:20           ` Márton Marczell
2016-11-27 16:08             ` Eli Zaretskii
2016-11-27 20:58               ` Márton Marczell
2016-11-28 15:46                 ` Eli Zaretskii
2016-11-28 17:20                   ` Eli Zaretskii
2016-11-27  3:30       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).