From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.bugs Subject: bug#20355: 25.0.50; Package installation fails without a fully loaded init file Date: Sun, 19 Apr 2015 15:54:19 +0100 Message-ID: References: <87wq1bnm7x.fsf@loki.jorgenschaefer.de> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1429455322 13200 80.91.229.3 (19 Apr 2015 14:55:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Apr 2015 14:55:22 +0000 (UTC) Cc: 20355@debbugs.gnu.org To: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 19 16:55:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yjqcq-0002fx-GX for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Apr 2015 16:55:12 +0200 Original-Received: from localhost ([::1]:48781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yjqcq-0000iB-2a for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Apr 2015 10:55:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yjqcl-0000gK-Gd for bug-gnu-emacs@gnu.org; Sun, 19 Apr 2015 10:55:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yjqch-0002LS-1l for bug-gnu-emacs@gnu.org; Sun, 19 Apr 2015 10:55:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yjqcg-0002L0-TO for bug-gnu-emacs@gnu.org; Sun, 19 Apr 2015 10:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yjqcg-0006uC-3H for bug-gnu-emacs@gnu.org; Sun, 19 Apr 2015 10:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Artur Malabarba Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Apr 2015 14:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20355 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20355-submit@debbugs.gnu.org id=B20355.142945526926505 (code B ref 20355); Sun, 19 Apr 2015 14:55:01 +0000 Original-Received: (at 20355) by debbugs.gnu.org; 19 Apr 2015 14:54:29 +0000 Original-Received: from localhost ([127.0.0.1]:60806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yjqc8-0006tR-I8 for submit@debbugs.gnu.org; Sun, 19 Apr 2015 10:54:28 -0400 Original-Received: from mail-la0-f53.google.com ([209.85.215.53]:36056) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yjqc6-0006tB-1S for 20355@debbugs.gnu.org; Sun, 19 Apr 2015 10:54:27 -0400 Original-Received: by lagv1 with SMTP id v1so110250273lag.3 for <20355@debbugs.gnu.org>; Sun, 19 Apr 2015 07:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=FWTy8snnMEdA+H0Alt3c1wDhSNed3aTBKNVc/veo0Ao=; b=b1c/6tqTkhwrkJnNXwKFOjYb9w8iUL8E8hxGw4mTxpr2OD/WeN1rshGc+4XwUdkG7x Q3iW7fa8ZiMxsxrS4Xw11U4evQRpCs/ikJlGA3yEIhTsnyvjj8iF6DSYW/UbEFihsVVf v/IxHRmzV4BhAm+jYEG1YfCUJpnXx/gkEL7Fc/RE+UFVU/df3g24w7icsgjUJUvNSyfG jVEf3du+mQgqb7GGkmc5Hlr1dws5DDZJ90XvZG97ITsPhvlUZ+hVNkSfErVon1srcOnK 7YbizkA1WM77ENHjt1+aTII9kLxvHloeK0zBUntjQG88XsQhvWtdlgHPqw/VOCIeUSNE 7BqA== X-Received: by 10.112.222.133 with SMTP id qm5mr12080530lbc.86.1429455260014; Sun, 19 Apr 2015 07:54:20 -0700 (PDT) Original-Received: by 10.25.150.1 with HTTP; Sun, 19 Apr 2015 07:54:19 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: Hk1jfZhCfyzzwCYEvjhQDzN6AFM X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101719 Archived-At: 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=C3=A4fer : > On Sun, Apr 19, 2015 at 4:29 AM, Stefan Monnier > 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 ini= t >>> file was not fully loaded". I suspect the latter is from the attempt t= o >>> set `package-selected-packages'. The same error happened when I starte= d >>> 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=3D$(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=3D$(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 load= ed > > All of these operations work on the second try, so it's not a complete > lock-down, but it's annoying :-) > > Regards, > Jorgen > > >