From: Artur Malabarba <bruce.connor.am@gmail.com>
To: "Jorgen Schäfer" <contact@jorgenschaefer.de>
Cc: 20355@debbugs.gnu.org
Subject: bug#20355: 25.0.50; Package installation fails without a fully loaded init file
Date: Sun, 19 Apr 2015 15:54:19 +0100 [thread overview]
Message-ID: <CAAdUY-K1oPh+XHHUTuqJaT9AQg6BmuE9+MfmY2ZA4T=+V5Pu7Q@mail.gmail.com> (raw)
In-Reply-To: <CALqDrSeDHa-UE24T637mqg45-io+F7Xw_Hb4s5xq=_qOziiECQ@mail.gmail.com>
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
>
>
>
next prev parent reply other threads:[~2015-04-19 14:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2015-04-20 14:21 ` Stefan Monnier
2015-04-22 10:57 ` Artur Malabarba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAdUY-K1oPh+XHHUTuqJaT9AQg6BmuE9+MfmY2ZA4T=+V5Pu7Q@mail.gmail.com' \
--to=bruce.connor.am@gmail.com \
--cc=20355@debbugs.gnu.org \
--cc=contact@jorgenschaefer.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.