Subject: bug#13930: Emacs doesn't cope well if it can't access/create .emacs.d

From: Eli Zaretskii <[email-masked]>
Date: Tue, 12 Mar 2013 18:10:23 +0200

> Date: Tue, 12 Mar 2013 11:52:08 +0800
> From: Robert Prije <[email-masked]>
> Cc: [email-masked]
> 
> It does exactly the same thing with --debug-init (says "creating directory:
> permission denied...") and supplies no further information.

How about running it under GDB with a breakpoint on report_file_error
and on xsignal?  If you start GDB from the src directory of the Emacs
sources, the .gdbinit file there defines a command xbacktrace which
will produce a Lisp-level backtrace in addition to the C-level
backtrace produced by the "bt" command of GDB.