GNU bug report logs - #25163
26.0.50; Unable to access `user-emacs-directory' (~/.emacs.d/)

Previous Next

Package: emacs;

Reported by: emacs18 <at> gmail.com

Date: Sun, 11 Dec 2016 03:37:01 UTC

Severity: minor

Found in version 26.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: Richard Kim <emacs18 <at> gmail.com>
Cc: 25163 <at> debbugs.gnu.org
Subject: bug#25163: 26.0.50; Unable to access `user-emacs-directory' (~/.emacs.d/)
Date: Sat, 10 Dec 2016 23:24:06 -0500
Richard Kim <emacs18 <at> gmail.com> writes:

> My build of emacs 26 (git repo version 25a52ca of 2016/12/10)
> starts up with the following warning:
>
>   Warning (initialization): Unable to access `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'.
>
> This is despite setting the variable as suggested to suppress such warning.
> I think this warning should not be printed.
>
> Emacs is started like this:
>
>   chmod 0 ~/.emacs.d
>   ~/opt/emacs26/bin/emacs -q \
>     --eval '(setq user-emacs-directory (expand-file-name "~/elisp/"))' \
>     --eval '(setq user-emacs-directory-warning nil)'
>
> Emacs 25 (git repo build of emacs-25 branch) started the same way does
> not print this warning.

I see the same in Emacs 25, 24.5, and 24.4; 24.3 just prints a "File
exists" message.  Looks like the problem is that locate-user-emacs-file
(and thus the check for the warning) is called before any customizations
(or --eval args) are executed.  Here's a backtrace I got by putting
(debug) inside locate-user-emacs-file, just before the `display-warning'
call:

Debugger entered: nil
  locate-user-emacs-file("abbrev_defs" ".abbrev_defs")
  #[0 "\300\301\302\"\207" [locate-user-emacs-file "abbrev_defs" ".abbrev_defs"] 3]()
  funcall(#[0 "\300\301\302\"\207" [locate-user-emacs-file "abbrev_defs" ".abbrev_defs"] 3])
  eval((funcall (function #[0 "\300\301\302\"\207" [locate-user-emacs-file "abbrev_defs" ".abbrev_defs"] 3])))
  custom-reevaluate-setting(abbrev-file-name)
  mapc(custom-reevaluate-setting (temporary-file-directory transient-mark-mode small-temporary-file-directory auto-save-file-name-transforms remote-shell-program Info-default-directory-list rmail-spool-directory abbrev-file-name auto-encryption-mode blink-cursor-mode tutorial-directory global-font-lock-mode file-name-shadow-mode query-replace-from-to-separator image-load-path mouse-wheel-mode electric-indent-mode electric-quote-mode global-eldoc-mode tooltip-mode))
  command-line()
  normal-top-level()

Perhaps the warning could be delayed until after init time?




This bug report was last modified 3 years and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.