* bug#20355: 25.0.50; Package installation fails without a fully loaded init file
@ 2015-04-17 9:22 Jorgen Schaefer
2015-04-19 2:29 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Jorgen Schaefer @ 2015-04-17 9:22 UTC (permalink / raw
To: 20355
Hello!
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.
I would expect to be able to install packages without error if I start
Emacs with -q, or indeed if my init file breaks.
Thanks!
Jorgen
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20355: 25.0.50; Package installation fails without a fully loaded init file
2015-04-17 9:22 bug#20355: 25.0.50; Package installation fails without a fully loaded init file Jorgen Schaefer
@ 2015-04-19 2:29 ` Stefan Monnier
2015-04-19 8:51 ` Jorgen Schäfer
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2015-04-19 2:29 UTC (permalink / raw
To: Jorgen Schaefer; +Cc: 20355
> 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.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20355: 25.0.50; Package installation fails without a fully loaded init file
2015-04-19 2:29 ` Stefan Monnier
@ 2015-04-19 8:51 ` Jorgen Schäfer
2015-04-19 14:54 ` Artur Malabarba
0 siblings, 1 reply; 6+ messages in thread
From: Jorgen Schäfer @ 2015-04-19 8:51 UTC (permalink / raw
To: Stefan Monnier; +Cc: 20355
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20355: 25.0.50; Package installation fails without a fully loaded init file
2015-04-19 8:51 ` Jorgen Schäfer
@ 2015-04-19 14:54 ` Artur Malabarba
2015-04-20 14:21 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Artur Malabarba @ 2015-04-19 14:54 UTC (permalink / raw
To: Jorgen Schäfer; +Cc: 20355
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
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20355: 25.0.50; Package installation fails without a fully loaded init file
2015-04-19 14:54 ` Artur Malabarba
@ 2015-04-20 14:21 ` Stefan Monnier
2015-04-22 10:57 ` Artur Malabarba
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2015-04-20 14:21 UTC (permalink / raw
To: Artur Malabarba; +Cc: Jorgen Schäfer, 20355
> 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.
I think there's only one way to find out.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20355: 25.0.50; Package installation fails without a fully loaded init file
2015-04-20 14:21 ` Stefan Monnier
@ 2015-04-22 10:57 ` Artur Malabarba
0 siblings, 0 replies; 6+ messages in thread
From: Artur Malabarba @ 2015-04-22 10:57 UTC (permalink / raw
To: Stefan Monnier; +Cc: Jorgen Schäfer, 20355-done
Fixed.
2015-04-20 15:21 GMT+01:00 Stefan Monnier <monnier@iro.umontreal.ca>:
>> 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.
>
> I think there's only one way to find out.
>
>
> Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-04-22 10:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17 9:22 bug#20355: 25.0.50; Package installation fails without a fully loaded init file Jorgen Schaefer
2015-04-19 2:29 ` Stefan Monnier
2015-04-19 8:51 ` Jorgen Schäfer
2015-04-19 14:54 ` Artur Malabarba
2015-04-20 14:21 ` Stefan Monnier
2015-04-22 10:57 ` Artur Malabarba
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.