bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20355: 25.0.50; Package installation fails without a fully loaded in


From: Artur Malabarba
Subject: bug#20355: 25.0.50; Package installation fails without a fully loaded init file
Date: Sun, 19 Apr 2015 15:54:19 +0100

1. This can be solved by wrapping the call to
`customize-save-variable' in a `ignore-errors'.
2. This can also be fixed entirely in custom.el by having
`(custom-file t)' return nil when `(and (null custom-file)
init-file-had-error)'.

Arguably, the latter is the right thing to do (that function should
not pretend that all is fine if init-file-had-error), but I don't know
whether that could cause issues in other places.

2015-04-19 9:51 GMT+01:00 Jorgen Schäfer <contact@jorgenschaefer.de>:
> On Sun, Apr 19, 2015 at 4:29 AM, Stefan Monnier
> <monnier@iro.umontreal.ca> wrote:
>>> I recently accidentally uninstalled a package required by my init.el.
>>> The result was that starting Emacs failed. I then could not install the
>>> package again, though, as package-install failed with an error "the init
>>> file was not fully loaded".  I suspect the latter is from the attempt to
>>> set `package-selected-packages'.  The same error happened when I started
>>> Emacs with -q.
>>
>> Hmm... could you give a slightly more detailed recipe.  I think
>> package.el does not degrade gracefully enough in such "inconsistent"
>> states, indeed.
>
> Oh, sorry, of course.
>
> $ mkdir tmpemacs
> $ HOME=$(pwd)/tmpemacs emacs
>
> Use M-x package-install to install company-statistics (as the first
> package I found that depends on another). Terminate Emacs, and do:
>
> $ rm -rf tmpemacs/.emacs.d/elpa/company-0.8.12
> $ cat tmpemacs/.emacs.d/init.el
> (package-initialize)
> (require 'company-statistics)
> $ HOME=$(pwd)/tmpemacs emacs
>
> This throws some warnings because company is missing, and an error
> because company-statistics can not be loaded. M-x package-install RET
> company RET throws the error I mentioned originally, as does M-x
> package-list-packages:
>
> custom-save-all: Cannot save customizations; init file was not fully loaded
>
> All of these operations work on the second try, so it's not a complete
> lock-down, but it's annoying :-)
>
> Regards,
> Jorgen
>
>
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]