GNU bug report logs - #31397
27.0.50; Emacs doesn't call package-initialize if there's no elpa directory

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Zachary Kanfer <zkanfer@HIDDEN>; dated Thu, 10 May 2018 05:18:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 31397 <at> debbugs.gnu.org:


Received: (at 31397) by debbugs.gnu.org; 29 May 2018 22:58:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 29 18:58:47 2018
Received: from localhost ([127.0.0.1]:54418 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fNnZn-0005gE-Ci
	for submit <at> debbugs.gnu.org; Tue, 29 May 2018 18:58:47 -0400
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:44241)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1fNnZk-0005g5-FS
 for 31397 <at> debbugs.gnu.org; Tue, 29 May 2018 18:58:45 -0400
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w4TMwgoW015339;
 Tue, 29 May 2018 18:58:43 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id C6A76640E5; Tue, 29 May 2018 18:58:42 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#31397: 27.0.50;
 Emacs doesn't call package-initialize if there's no elpa directory
Message-ID: <jwvh8mq5aym.fsf-monnier+bug#31397@HIDDEN>
References: <CAFXT+RNzHtMJaYi73NJe5jCxwpYYuTaTKO8nWDpiDtvg3EeqfA@HIDDEN>
 <87o9gyd6hp.fsf@HIDDEN>
 <CADB4rJG+MeuNO6EOLhM67V1FUi9L_OOvbUgGWD1rYNkE40pYNQ@HIDDEN>
 <87fu2acchi.fsf@HIDDEN>
Date: Tue, 29 May 2018 18:58:42 -0400
In-Reply-To: <87fu2acchi.fsf@HIDDEN> (Noam Postavsky's message of "Tue, 29
 May 2018 18:40:09 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 2 Rules triggered
	EDT_SA_DN_PASS=0, RV6296=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6296> : inlines <6664> : streams
 <1788180> : uri <2649377>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31397
Cc: 31397 <at> debbugs.gnu.org, Radon Rosborough <radon.neon@HIDDEN>,
 Zachary Kanfer <zkanfer@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> 1. Make `package-installed-p' and other functions automatically
>>    initialize package.el if necessary.

Yes, when I changed it recently I hesitated to do that and decided to
refrain from doing so in order to minimize the changes, but it makes
a lot of sense.


        Stefan


diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 94d98178c4..56be5ef70c 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1889,8 +1889,8 @@ package-installed-p
     ;; We used the quickstart: make it possible to use package-installed-p
     ;; even before package is fully initialized.
     (memq package package-activated-list))
-   ((not package--initialized) (error "package.el is not yet initialized!"))
    (t
+    (unless package--initialized (package-initialize 'no-activate))
     (or
      (let ((pkg-descs (cdr (assq package package-alist))))
        (and pkg-descs




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31397; Package emacs. Full text available.

Message received at 31397 <at> debbugs.gnu.org:


Received: (at 31397) by debbugs.gnu.org; 29 May 2018 22:40:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 29 18:40:18 2018
Received: from localhost ([127.0.0.1]:54401 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fNnHu-0005F1-2S
	for submit <at> debbugs.gnu.org; Tue, 29 May 2018 18:40:18 -0400
Received: from mail-io0-f181.google.com ([209.85.223.181]:44518)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fNnHs-0005El-JG
 for 31397 <at> debbugs.gnu.org; Tue, 29 May 2018 18:40:17 -0400
Received: by mail-io0-f181.google.com with SMTP id y2-v6so14069438iob.11
 for <31397 <at> debbugs.gnu.org>; Tue, 29 May 2018 15:40:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=iKqi5EZMLT3lf/uVRYmv841WFbuvsf06TQHh++BmViY=;
 b=VVCMOOwzVAUQ9SIdVtYgl9zVnSntFex8TPsVprAQixxbZQ3BksNUlX8mP+GXiiIMhl
 4BhelGnP5qQNQKD4V2wWD4+5ZgJoCtWTcXypW0XhCgSZ1rsQLoANj9k4pgvLEpFXWYNM
 wqdphvH/Usat4iEp+tPmYwcoZ1fU8Ei9AMqUgxBsacMcBsX3xZqxrnN7N3Jjd0WpyOn+
 yNS9BRXZSLl9sDqi4mfqQNsmpRAxU4fpiqWg0+Mr8o6wDRjTVcwq0KmnFi3te9y0OM1R
 m0SOihgwq6vHSebDtTKh7FtcdVPkRioQs/wbBVMXq9cwUvns01KEoiM3LSHeYUusRBqB
 6sVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=iKqi5EZMLT3lf/uVRYmv841WFbuvsf06TQHh++BmViY=;
 b=qU7lq/Z36pKHO3VmbPkVikCtWnBkkBQqKr5bn+JzKEK9feJUx1xLRH0yLixSkGIO1B
 6dV/kCKic+U13Zfd1OtD7sLPmxn1MTyQYEH0PsmFnpn317bwfQgi9IRka2ZxHmQpqh7b
 jtPihq0ELWpTXzKAlrAatk2rjCZdjc5+Vi4zVKXj74/+9DPTeGZu9yirD7UV5YWJcEpa
 LbHkdavaGUdH/sggUDKF/8PE34WAlMD1F27RhNxfsaZfjj1tSiRgr4Jx9VLgtPlVTH6T
 4dTZOquJqw+zBayejbJ27zV2eLHIKKl9ta/hgEWdHhIYdT/QKD3zRNqz1qDnKmxz8cEh
 wT/Q==
X-Gm-Message-State: ALKqPwc+WcYiGSs2PjMCMqZ20ApxzwO+S5u2ps2R0SO6MJ4pWwX6KoX9
 nKFYO+OC3grsUxjPT/yZPLc=
X-Google-Smtp-Source: ADUXVKLVS8jmNv4eM4HegWsbqeGVoTori9Ar0URUdb+dAlKtu2EIfoqm5XZUEaDiRxOJp3xRg4G7NA==
X-Received: by 2002:a6b:e411:: with SMTP id
 u17-v6mr283173iog.202.1527633611036; 
 Tue, 29 May 2018 15:40:11 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 w11-v6sm8182941ith.10.2018.05.29.15.40.10
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 29 May 2018 15:40:10 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Radon Rosborough <radon.neon@HIDDEN>
Subject: Re: bug#31397: 27.0.50;
 Emacs doesn't call package-initialize if there's no elpa directory
References: <CAFXT+RNzHtMJaYi73NJe5jCxwpYYuTaTKO8nWDpiDtvg3EeqfA@HIDDEN>
 <87o9gyd6hp.fsf@HIDDEN>
 <CADB4rJG+MeuNO6EOLhM67V1FUi9L_OOvbUgGWD1rYNkE40pYNQ@HIDDEN>
Date: Tue, 29 May 2018 18:40:09 -0400
In-Reply-To: <CADB4rJG+MeuNO6EOLhM67V1FUi9L_OOvbUgGWD1rYNkE40pYNQ@HIDDEN>
 (Radon Rosborough's message of "Tue, 29 May 2018 10:13:07 -0600")
Message-ID: <87fu2acchi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: 31397
Cc: 31397 <at> debbugs.gnu.org, Zachary Kanfer <zkanfer@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)

Radon Rosborough <radon.neon@HIDDEN> writes:

> Thanks for the cc. I wasn't aware of this bug report.
>
> The behavior makes sense, but is definitely undesirable. There are at
> least two solutions:
>
> 1. Make `package-installed-p' and other functions automatically
>    initialize package.el if necessary.
>
> 2. Call `package-initialize' unconditionally during startup.
>
> Solution (1) might make package.el functions a little slower.

I don't think speed is an issue here.  For package-installed-p in
particular, it would have no effect on speed since that function already
checks package--initialized (and checking a single variable is pretty
negligible already).

> Solution (1) seems like the correct way to do this. Is there any
> reason it wasn't done already?

Not sure, I might guess that a predicate like package-installed-p
shouldn't have side-effects, but package-install doesn't auto-initialize
either when called non-interactively.

Stefan, do you have any insight on this?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31397; Package emacs. Full text available.

Message received at 31397 <at> debbugs.gnu.org:


Received: (at 31397) by debbugs.gnu.org; 29 May 2018 16:13:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 29 12:13:55 2018
Received: from localhost ([127.0.0.1]:54191 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fNhFz-0000d5-1U
	for submit <at> debbugs.gnu.org; Tue, 29 May 2018 12:13:55 -0400
Received: from mail-wm0-f53.google.com ([74.125.82.53]:52243)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <radon.neon@HIDDEN>) id 1fNhFx-0000cm-Ld
 for 31397 <at> debbugs.gnu.org; Tue, 29 May 2018 12:13:53 -0400
Received: by mail-wm0-f53.google.com with SMTP id 18-v6so36678815wml.2
 for <31397 <at> debbugs.gnu.org>; Tue, 29 May 2018 09:13:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=/pCtyP0FDA3QLQcLQVsN3oxAdC9GDlk86O/I8gMfTeo=;
 b=LBD3eUhmNz2d5cen3Z780POdAgTpEV48tTNsW2vYyHHbOSwpEoklKeYx83+O9EgZYl
 B+L2r5/iGkRsaWV9CTXrKUVD63MNmTua0c02V6di6sKeTwNoCXyGI3kffnk2kJWJwRH/
 K/ob7ZnyJS0kwKQ1qx/a8i5WosT2HMhxPg6VvkpjYvOsoU/UiOLYee4WJ0+qt5mA2Je7
 D7qOr5Nh2ou7/nBuvwD4WK4vHTSQujh0qVPd8a2AmrW8CddjekxhFvm0iZxRLVhqpSQI
 0zZwyXcTZlEnDn6D7M7I5k0bvThWgyeKHzyadeQv4CljqmzqZL0XdkPM/kXBs2cOKTrH
 fY6Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=/pCtyP0FDA3QLQcLQVsN3oxAdC9GDlk86O/I8gMfTeo=;
 b=A1V0bxovq+IKRBy6QrbRmvhmsvO+wW23CJMuW6OGbDmRjx2hDmYyQ89sPM4iUkrQF2
 bThUZCN4rGQpIkbJ1rXklAFnoyKDHCA29CTMXfJrMeWtiSuev8hms/8aacQU6LTQAB8S
 IftX7vfk07+yHn+vTRB9PtM2j8+heHHgVnwJ3veLtZ1uZJv2j9Fepk3TnyoxhZg2Ud55
 WWFwTw4gi7guu8owFK8haF9nHYw9UrQq5AC9a1YjgwdNfvqhuRTB06hkg2K7eQrzVUEf
 Q2m4oh2IiU8JQjCsoRBt7aHCXEsnscub0WUpZdXw7/vNKMqcG2lKrc0qhC+orOq4e0pE
 ipfQ==
X-Gm-Message-State: ALKqPwfUYwwe6rdXHUe0KGqjdBWhS7rs5ENyMIGxPhjQ2QoEZNexhN2r
 gE/FUpiK3tAov0HmbtB5VqHNaq33MYb+/Ave7PI=
X-Google-Smtp-Source: ADUXVKJB98ApA+GQEyngw0G1rIqcahaMCLRDRRCaJZlfdFD0TR/zhQtDg/bm9x6htEruTCJ7d4hSthp4xO4phwMHKxU=
X-Received: by 2002:a2e:94c8:: with SMTP id
 r8-v6mr11636203ljh.118.1527610427959; 
 Tue, 29 May 2018 09:13:47 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a19:fc14:0:0:0:0:0 with HTTP; Tue, 29 May 2018 09:13:07
 -0700 (PDT)
In-Reply-To: <87o9gyd6hp.fsf@HIDDEN>
References: <CAFXT+RNzHtMJaYi73NJe5jCxwpYYuTaTKO8nWDpiDtvg3EeqfA@HIDDEN>
 <87o9gyd6hp.fsf@HIDDEN>
From: Radon Rosborough <radon.neon@HIDDEN>
Date: Tue, 29 May 2018 10:13:07 -0600
Message-ID: <CADB4rJG+MeuNO6EOLhM67V1FUi9L_OOvbUgGWD1rYNkE40pYNQ@HIDDEN>
Subject: Re: bug#31397: 27.0.50; Emacs doesn't call package-initialize if
 there's no elpa directory
To: Noam Postavsky <npostavs@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000e9ee84056d5a84fc"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 31397
Cc: 31397 <at> debbugs.gnu.org, Zachary Kanfer <zkanfer@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000e9ee84056d5a84fc
Content-Type: text/plain; charset="UTF-8"

Thanks for the cc. I wasn't aware of this bug report.

The behavior makes sense, but is definitely undesirable. There are at
least two solutions:

1. Make `package-installed-p' and other functions automatically
   initialize package.el if necessary.

2. Call `package-initialize' unconditionally during startup.

Solution (1) might make package.el functions a little slower. But
solution (2) would definitely make startup slower for people who don't
use package.el.

Solution (1) seems like the correct way to do this. Is there any
reason it wasn't done already?

Any thoughts?

--000000000000e9ee84056d5a84fc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>Thanks for the cc. I wasn&#39;t aware of this bu=
g report.</div><div><br></div><div>The behavior makes sense, but is definit=
ely undesirable. There are at</div><div>least two solutions:</div><div><br>=
</div><div>1. Make `package-installed-p&#39; and other functions automatica=
lly</div><div>=C2=A0 =C2=A0initialize package.el if necessary.</div><div><b=
r></div><div>2. Call `package-initialize&#39; unconditionally during startu=
p.</div><div><br></div><div>Solution (1) might make package.el functions a =
little slower. But</div><div>solution (2) would definitely make startup slo=
wer for people who don&#39;t</div><div>use package.el.</div><div><br></div>=
<div>Solution (1) seems like the correct way to do this. Is there any</div>=
<div>reason it wasn&#39;t done already?</div><div><br></div><div>Any though=
ts?</div></div><div><br></div></div>

--000000000000e9ee84056d5a84fc--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31397; Package emacs. Full text available.

Message received at 31397 <at> debbugs.gnu.org:


Received: (at 31397) by debbugs.gnu.org; 29 May 2018 11:52:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 29 07:52:11 2018
Received: from localhost ([127.0.0.1]:53206 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fNdAh-0000dJ-03
	for submit <at> debbugs.gnu.org; Tue, 29 May 2018 07:52:11 -0400
Received: from mail-it0-f54.google.com ([209.85.214.54]:52315)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fNdAf-0000d5-9W
 for 31397 <at> debbugs.gnu.org; Tue, 29 May 2018 07:52:09 -0400
Received: by mail-it0-f54.google.com with SMTP id y189-v6so17996893itb.2
 for <31397 <at> debbugs.gnu.org>; Tue, 29 May 2018 04:52:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=niTLsTdyYQn3MT5AllXb3lbXehEF3QiLT8g7Ci1cZws=;
 b=eUxPsgsJ0MQjiWlIRUQF3PfL/VbsGQVaEB7zOIF9KaJl9jBsqv64dHyrxD1lUOD07g
 2X54NIlX4aSuwWq6OMvMxw0LYDKHeV66ViERV7hAj1/Dwqj9MKXQhG4RldKSJfx+GjeG
 YWP3fXhOBIeYVRyGU00bYm2MDHkWXRHzKdvrlxODnULZqJsjI6JDR5XYR+zjat4byZty
 6KiBS6DArBvBmBajciRtKJoE/kT0GNHhtpZsNM50OihxaZs3YskuF/NT93g8NTSh9Lua
 MFgBVALWjWxF+qQQ103mJTv7hu8lFYA8LS7X+Ruf07P5xfVNgMdZTR1gO5cqmspAWlGH
 s/QA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=niTLsTdyYQn3MT5AllXb3lbXehEF3QiLT8g7Ci1cZws=;
 b=HE/+VEAq/A5/pFQ9YcioAQCtFyKGRM5O9F8e/i0D1tTJZvhOZKNxTyCDadvgoavzEa
 h1mWaIMHywmBBKJ/XGrnlSIr6ZWRu6p4fpCQanOu6zACcarAZy1F18XXN8OPreeXMgSZ
 plvbQgSjJt6ixVrOTbiEIlQmJXYiU8pBFO+vkTJ/7y3mmFuxGKKAl7pby7R2/rkX3LV7
 RLsJLUXFWp8OKlxSBikpcmsaZtOi8xidWzecwmkPZixKPtRo73S1oW2pS8tlrgy8+IGD
 hqJGvCH3r3FlRmF2YhZCyD5YqU1o6iN4oU6POROpTWIITuNQLl38VCRYdwtwflRJmp+F
 uhpQ==
X-Gm-Message-State: ALKqPwf4kNTZDEC+9SWQDjM9WaN3pff3AGpI03XkHptdOtolV+qcl8RF
 9ABl/L4E4e4DkPND3jUUd+k=
X-Google-Smtp-Source: ADUXVKJinQuyG9QYbP9Nxtt3HNWwv3X/5QGUsxwcZ76a1hJfFTt5pFvoUweGvFgIzePkUnOhcFBLJQ==
X-Received: by 2002:a24:8705:: with SMTP id
 f5-v6mr13931395ite.146.1527594723844; 
 Tue, 29 May 2018 04:52:03 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 i133-v6sm7197724itf.15.2018.05.29.04.52.03
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 29 May 2018 04:52:03 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Zachary Kanfer <zkanfer@HIDDEN>
Subject: Re: bug#31397: 27.0.50;
 Emacs doesn't call package-initialize if there's no elpa directory
References: <CAFXT+RNzHtMJaYi73NJe5jCxwpYYuTaTKO8nWDpiDtvg3EeqfA@HIDDEN>
Date: Tue, 29 May 2018 07:52:02 -0400
In-Reply-To: <CAFXT+RNzHtMJaYi73NJe5jCxwpYYuTaTKO8nWDpiDtvg3EeqfA@HIDDEN>
 (Zachary Kanfer's message of "Thu, 10 May 2018 01:17:12 -0400")
Message-ID: <87o9gyd6hp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 31397
Cc: 31397 <at> debbugs.gnu.org, Radon Rosborough <radon.neon@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Zachary Kanfer <zkanfer@HIDDEN> writes:

> I like my init file to completely set up Emacs: I want to be able to
> start with an empty ~/.emacs.d/ move my init file into it, and start up
> Emacs.
[...]
> I've read up on the early init file. My understanding is that users
> should no longer call #'package-initialize in their init files. This is
> supported by, if I do have a call to #'package-initialize, starting
> Emacs gives me a warning "Warning (package): Unnecessary call to
> =E2=80=98package-initialize=E2=80=99 in init file". So I figured I would =
remove it. But
> I quickly ran into a problem, or at least an area for better
> documentation.
[...]
> A minimal init file that shows my problem is here:
>
>     (require 'package)
>     (add-to-list 'package-archives
>                  '("melpa" . "https://melpa.org/packages/"))
>
>     (message "use-package is installed: %s" (package-installed-p 'use-pac=
kage))
>
> Here's how I delete the elpa directory, and then start up Emacs:
>
>     $ rm -r ~/.emacs.d/elpa
>     $ src/emacs
>
> Upon doing so, here's the error I get:
>
>     Warning (initialization): An error occurred while loading
> =E2=80=98/home/zck/.emacs.d/init.el=E2=80=99:
>
>     error: package.el is not yet initialized!


> Anything I can do to help narrow this down? I'm not sure what to do to ma=
ke this work.

Perhaps adding Radon to Cc will help, not sure if they're subscribed to
the bug list.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31397; Package emacs. Full text available.

Message received at 31397 <at> debbugs.gnu.org:


Received: (at 31397) by debbugs.gnu.org; 29 May 2018 02:42:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 28 22:42:10 2018
Received: from localhost ([127.0.0.1]:52950 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fNUaQ-0006sk-0g
	for submit <at> debbugs.gnu.org; Mon, 28 May 2018 22:42:10 -0400
Received: from mail-io0-f172.google.com ([209.85.223.172]:43502)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zkanfer@HIDDEN>) id 1fNUaN-0006sG-IT
 for 31397 <at> debbugs.gnu.org; Mon, 28 May 2018 22:42:07 -0400
Received: by mail-io0-f172.google.com with SMTP id t23-v6so15907908ioc.10
 for <31397 <at> debbugs.gnu.org>; Mon, 28 May 2018 19:42:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=X/OOFG0MgWyh4ePstV2eN4Yra+2WxAZnr/22iZgPTdc=;
 b=YUuGnljxoyDWAm+9qnsR4txxwMQxnJlb1P4gcyrQfQYlNrSsHrvQqWW9q33NguETWe
 naf5YiaFvUIjlNZdJSWyf7srP90gG/ygBxtLSuYAMyJaLKN5Yo1eMET8iraBjqTMfKqA
 8r95nleFryDcJP433AlOTGHA6ZUbtpVHPWbuBdM12mf7ui+LMvPkWN50YHnZiXxD0adA
 RWKQTxgixNBLK9HpxZshVtG7+51+an8KW9TtBI+2SdLIaFn1lLvfr4DLSYnefc1eNwti
 YDfO7tU2rrpKGaBbvYgONJwsHYrdVnk0BUp9ku+pf9vsjZNqDW68GeMXHH5arPtJSvAF
 F0rw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=X/OOFG0MgWyh4ePstV2eN4Yra+2WxAZnr/22iZgPTdc=;
 b=CURBXRxVLPW0WGsRnwN0wf1Dxawqp4Cs06Q0sxOUsRg0Dt0OUa4vdgC/FrQBnGICMh
 Hleze3Qa1MfgPSYkmpI3c3wK8UvXUrbpVzF5L2M1WZZx0tVm4Q+xhdwr93Qvk7xdEdjN
 21/HSMLpI9EQtqfrMLuTewwBGLyTdlDyavlu1Y+m2i56E4m+MrqDk+XSgcOPZC0ezVgo
 QEPpxDxBmBRi841LRqGsSEA96zJcq2RW4dYAsNZuZNwZD/RpuDnOziICIjiKH/K/ETqL
 IUlFtr8bY/8U7cZgZpcTYzIWYDDUCUIatG0b8SlEjxJYxm4Gkjt0R//yGBhxSFgV6h+q
 tEQg==
X-Gm-Message-State: ALKqPwdfHO5f4GrHXvNpGt7BYLzKEEiJZWflJOHSIHURdsKF+Jmx/RmP
 JuO2DsH1pzjEjh+Y3GmzZZvmXJxbuhZM8pFiNKrU3w==
X-Google-Smtp-Source: ADUXVKJglaS/l7F+HzSttN9vmQD3g2OL0c+eBN5PKj0nYTxfTOW8DgEgaq0r7ZQB2zXrO1UVF2TdXwVMrbtbebJ9hhY=
X-Received: by 2002:a6b:234c:: with SMTP id
 j73-v6mr11909742ioj.263.1527561721674; 
 Mon, 28 May 2018 19:42:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a4f:787:0:0:0:0:0 with HTTP;
 Mon, 28 May 2018 19:41:41 -0700 (PDT)
From: Zachary Kanfer <zkanfer@HIDDEN>
Date: Mon, 28 May 2018 22:41:41 -0400
Message-ID: <CAFXT+RPQPX66ydeOPO2qH5h+kt8SfD8WcR5rCjOcXqOARwrUwg@HIDDEN>
Subject: Re: bug#31397: 27.0.50; Emacs doesn't call package-initialize if
 there's no
To: 31397 <at> debbugs.gnu.org
Content-Type: multipart/alternative; boundary="000000000000cb02f2056d4f2d2a"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31397
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000cb02f2056d4f2d2a
Content-Type: text/plain; charset="UTF-8"

Anything I can do to help narrow this down? I'm not sure what to do to make
this work.

--000000000000cb02f2056d4f2d2a
Content-Type: text/html; charset="UTF-8"

<div dir="ltr"><div>Anything I can do to help narrow this down? I&#39;m not sure what to do to make this work.</div></div>

--000000000000cb02f2056d4f2d2a--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31397; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 May 2018 05:17:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 10 01:17:49 2018
Received: from localhost ([127.0.0.1]:55827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fGdxd-00062c-CQ
	for submit <at> debbugs.gnu.org; Thu, 10 May 2018 01:17:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43637)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zkanfer@HIDDEN>) id 1fGdxb-00062O-Eq
 for submit <at> debbugs.gnu.org; Thu, 10 May 2018 01:17:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <zkanfer@HIDDEN>) id 1fGdxT-0002FL-Mf
 for submit <at> debbugs.gnu.org; Thu, 10 May 2018 01:17:42 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:48149)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <zkanfer@HIDDEN>) id 1fGdxT-0002FF-Ik
 for submit <at> debbugs.gnu.org; Thu, 10 May 2018 01:17:39 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34607)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <zkanfer@HIDDEN>) id 1fGdxR-00013O-0Z
 for bug-gnu-emacs@HIDDEN; Thu, 10 May 2018 01:17:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <zkanfer@HIDDEN>) id 1fGdxO-0002EZ-Kg
 for bug-gnu-emacs@HIDDEN; Thu, 10 May 2018 01:17:36 -0400
Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:37239)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <zkanfer@HIDDEN>) id 1fGdxO-0002EJ-Co
 for bug-gnu-emacs@HIDDEN; Thu, 10 May 2018 01:17:34 -0400
Received: by mail-io0-x233.google.com with SMTP id e20-v6so1640968iof.4
 for <bug-gnu-emacs@HIDDEN>; Wed, 09 May 2018 22:17:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=JkixAR1q96nCWKFhaIbleaRYoRGx0pffC6do3WXNmFQ=;
 b=UuPVagVDIH/LAGIgSAvqWXgreQPxFDUoOytc0lQv1JtOGjHLYCu+Ut4fzD3m6azqWN
 SbPZnydSWbiXWowLXTxT0Ytkm+Z+LJ3EjGDkg5kndjv8xBh4BYwQszSKyCcQNEV7IlyN
 3XtSj9rSv4PnXxyR6vN8YwxtbNYQY2sHYj3nGDAaDtjIs4vyVn30awcxcb5lVUTlDs1Z
 NP88oPWOcUZydhFDzCQL7SwIOQfiHKd+GuNOV3+3URJZuRl44ysyscAuOsjqHKYkmy35
 UMrMqcVWziJVXnhnCyPfCJtJ23UOuGIefd9Z1LD8DAMZIBAx8bbfBTgbum1AsDmfcbwr
 HIBg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=JkixAR1q96nCWKFhaIbleaRYoRGx0pffC6do3WXNmFQ=;
 b=ZhuxX/hnaAWviwWWB06PgmBdjtufdk25i6AzADulQm55xIYnoNM6pGrvSxVRpy/OBM
 wopKVC/7Xr76oeMGqWKC+eCjSXW6cfVZ4/hXHkvnizQ4ijP4IDjx/0avN8SqAETYt9Zg
 NCnSWKcsbb461T1Mp2rJ33STUbr6iHisTxlTnAc0u76dSvzwMi8k6hET/siHvpVCQjim
 OeBjDkK6U5WjYb0gNS9cDi/YmKhBG/nIyU9/weJuL6s8tQAxT5PgBF5xyLQLd3ntH/MP
 cqozB3Xm/eYtBToEsk9V7dVm9mXe7nrz/zX5nGXp1RrBsie/SHFgR5KsBLp3SWmyHee4
 IkEA==
X-Gm-Message-State: ALQs6tDSkwRV3vDXi9OZan7xkc1D69t35eFgIKB/EqPvE1rMB9B7T/BP
 c236E5U9zFcWFRuCpIZ9QvI3mBbRTla7w3UwADFVvFcU
X-Google-Smtp-Source: AB8JxZpp9VjL+5jc9xkMYVASfVvFSFfCBPJI38yGJ+YbwY+CZlUObQ7qaODJZZBdQOu8KFVJAp2M5e/BJUgw7srtDrs=
X-Received: by 2002:a6b:9652:: with SMTP id
 y79-v6mr45328661iod.171.1525929452849; 
 Wed, 09 May 2018 22:17:32 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a4f:244:0:0:0:0:0 with HTTP;
 Wed, 9 May 2018 22:17:12 -0700 (PDT)
From: Zachary Kanfer <zkanfer@HIDDEN>
Date: Thu, 10 May 2018 01:17:12 -0400
Message-ID: <CAFXT+RNzHtMJaYi73NJe5jCxwpYYuTaTKO8nWDpiDtvg3EeqfA@HIDDEN>
Subject: 27.0.50;
 Emacs doesn't call package-initialize if there's no elpa directory
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000fd4f6c056bd322bd"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

--000000000000fd4f6c056bd322bd
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

------------------
High-level summary:
------------------

If Emacs is started with no ~/.emacs.d/elpa directory,
#'package-initialize is not called, and I can't programatically work
with packages.

----------
Motivation
----------

I like my init file to completely set up Emacs: I want to be able to
start with an empty ~/.emacs.d/ move my init file into it, and start up
Emacs. To do that, I've had (previously to Emacs 27), this as the
preamble to my init file:

    (require 'package)
    (add-to-list 'package-archives
                 '("melpa" . "https://melpa.org/packages/"))
    (package-initialize)

    (unless (package-installed-p 'use-package)
      (package-refresh-contents)
      (package-install 'use-package))

This sets up package.el with the ability to use melpa, then installs
use-package, for use in the rest of my init file. This has worked fine.

But I recently upgraded my Emacs to a newer version built from source,
using commit 766b057e41df7316808ec7658836fda75facda75. As part of that,
I've read up on the early init file. My understanding is that users
should no longer call #'package-initialize in their init files. This is
supported by, if I do have a call to #'package-initialize, starting
Emacs gives me a warning "Warning (package): Unnecessary call to
=E2=80=98package-initialize=E2=80=99 in init file". So I figured I would re=
move it. But
I quickly ran into a problem, or at least an area for better
documentation.

-------------------------
Reproduction instructions
-------------------------

A minimal init file that shows my problem is here:

    (require 'package)
    (add-to-list 'package-archives
                 '("melpa" . "https://melpa.org/packages/"))

    (message "use-package is installed: %s" (package-installed-p
'use-package))

Here's how I delete the elpa directory, and then start up Emacs:

    $ rm -r ~/.emacs.d/elpa
    $ src/emacs

Upon doing so, here's the error I get:

    Warning (initialization): An error occurred while loading
=E2=80=98/home/zck/.emacs.d/init.el=E2=80=99:

    error: package.el is not yet initialized!

    To ensure normal operation, you should investigate and remove the
    cause of the error in your initialization file.  Start Emacs with
    the =E2=80=98--debug-init=E2=80=99 option to view a complete error back=
trace.

---------------------------
Investigation & speculation
---------------------------

I started looking around for documentation, and found this interesting
comment in simple.el's function #'command-line:

    ;; If any package directory exists, initialize the package system.

This seems to be the cause. I'm not sure why the package system
shouldn't be initialized if there is no package directory; I want to be
able to do package operations even if I'm starting with no package
directory. You have to start somewhere.

Thanks!

------------------
System information
------------------

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2018-05-07 built on zck-laptop
Repository revision: 766b057e41df7316808ec7658836fda75facda75
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Ubuntu 16.04.4 LTS

Recent messages:
Checking for load-path shadows...done
Auto-saving...
Overwrite mode enabled in current buffer
<pause> is undefined
Undo! [3 times]
user-error: No further undo information
C-c k is undefined
Quit
C-x C-g is undefined
Mark set

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=3Dibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils cl-extra pp cl-print package-x thingatpt
help-fns radix-tree help-mode time-date elec-pair warnings package
easymenu epg-config url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 114821 11707)
 (symbols 48 21397 0)
 (miscs 40 99 151)
 (strings 32 34316 1830)
 (string-bytes 1 888700)
 (vectors 16 17166)
 (vector-slots 8 524482 10750)
 (floats 8 54 84)
 (intervals 56 292 144)
 (buffers 992 15)
 (heap 1024 44657 1840))

--000000000000fd4f6c056bd322bd
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">------------------<br>High-level summary:<br>-------------=
-----<br><br>If Emacs is started with no ~/.emacs.d/elpa directory,<br>#&#3=
9;package-initialize is not called, and I can&#39;t programatically work<br=
>with packages.<br><br>----------<br>Motivation<br>----------<br><br>I like=
 my init file to completely set up Emacs: I want to be able to<br>start wit=
h an empty ~/.emacs.d/ move my init file into it, and start up<br>Emacs. To=
 do that, I&#39;ve had (previously to Emacs 27), this as the<br>preamble to=
 my init file:<br><br>=C2=A0=C2=A0=C2=A0 (require &#39;package)<br>=C2=A0=
=C2=A0=C2=A0 (add-to-list &#39;package-archives<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &#=
39;(&quot;melpa&quot; . &quot;<a href=3D"https://melpa.org/packages/">https=
://melpa.org/packages/</a>&quot;))<br>=C2=A0=C2=A0=C2=A0 (package-initializ=
e)<br>=C2=A0=C2=A0=C2=A0 <br>=C2=A0=C2=A0=C2=A0 (unless (package-installed-=
p &#39;use-package)<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (package-refresh-cont=
ents)<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (package-install &#39;use-package))=
<br><br>This sets up package.el with the ability to use melpa, then install=
s<br>use-package, for use in the rest of my init file. This has worked fine=
.<br><br>But I recently upgraded my Emacs to a newer version built from sou=
rce,<br>using commit 766b057e41df7316808ec7658836fda75facda75. As part of t=
hat,<br>I&#39;ve read up on the early init file. My understanding is that u=
sers<br>should no longer call #&#39;package-initialize in their init files.=
 This is<br>supported by, if I do have a call to #&#39;package-initialize, =
starting<br>Emacs gives me a warning &quot;Warning (package): Unnecessary c=
all to<br>=E2=80=98package-initialize=E2=80=99 in init file&quot;. So I fig=
ured I would remove it. But<br>I quickly ran into a problem, or at least an=
 area for better<br>documentation.<br><br>-------------------------<br>Repr=
oduction instructions<br>-------------------------<br><br>A minimal init fi=
le that shows my problem is here:<br><br>=C2=A0=C2=A0=C2=A0 (require &#39;p=
ackage)<br>=C2=A0=C2=A0=C2=A0 (add-to-list &#39;package-archives<br>=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 &#39;(&quot;melpa&quot; . &quot;<a href=3D"https://melpa.or=
g/packages/">https://melpa.org/packages/</a>&quot;))<br>=C2=A0=C2=A0=C2=A0 =
<br>=C2=A0=C2=A0=C2=A0 (message &quot;use-package is installed: %s&quot; (p=
ackage-installed-p &#39;use-package))<br><br>Here&#39;s how I delete the el=
pa directory, and then start up Emacs:<br><br>=C2=A0=C2=A0=C2=A0 $ rm -r ~/=
.emacs.d/elpa<br>=C2=A0=C2=A0=C2=A0 $ src/emacs<br><br>Upon doing so, here&=
#39;s the error I get:<br><br>=C2=A0=C2=A0=C2=A0 Warning (initialization): =
An error occurred while loading =E2=80=98/home/zck/.emacs.d/init.el=E2=80=
=99:<br>=C2=A0=C2=A0=C2=A0 <br>=C2=A0=C2=A0=C2=A0 error: package.el is not =
yet initialized!<br>=C2=A0=C2=A0=C2=A0 <br>=C2=A0=C2=A0=C2=A0 To ensure nor=
mal operation, you should investigate and remove the<br>=C2=A0=C2=A0=C2=A0 =
cause of the error in your initialization file.=C2=A0 Start Emacs with<br>=
=C2=A0=C2=A0=C2=A0 the =E2=80=98--debug-init=E2=80=99 option to view a comp=
lete error backtrace.<br><br>---------------------------<br>Investigation &=
amp; speculation<br>---------------------------<br><br>I started looking ar=
ound for documentation, and found this interesting<br>comment in simple.el&=
#39;s function #&#39;command-line:<br><br>=C2=A0=C2=A0=C2=A0 ;; If any pack=
age directory exists, initialize the package system.<br><br>This seems to b=
e the cause. I&#39;m not sure why the package system<br>shouldn&#39;t be in=
itialized if there is no package directory; I want to be<br>able to do pack=
age operations even if I&#39;m starting with no package<br>directory. You h=
ave to start somewhere.<br><br>Thanks!<br><br>------------------<br>System =
information<br>------------------<br><br>In GNU Emacs 27.0.50 (build 1, x86=
_64-pc-linux-gnu, GTK+ Version 3.18.9)<br>=C2=A0of 2018-05-07 built on zck-=
laptop<br>Repository revision: 766b057e41df7316808ec7658836fda75facda75<br>=
Windowing system distributor &#39;The X.Org Foundation&#39;, version 11.0.1=
1804000<br>System Description: Ubuntu 16.04.4 LTS<br><br>Recent messages:<b=
r>Checking for load-path shadows...done<br>Auto-saving...<br>Overwrite mode=
 enabled in current buffer<br>&lt;pause&gt; is undefined<br>Undo! [3 times]=
<br>user-error: No further undo information<br>C-c k is undefined<br>Quit<b=
r>C-x C-g is undefined<br>Mark set<br><br>Configured features:<br>XPM JPEG =
TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY<br>ACL LIBSEL=
INUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB<br>TOOLKIT_SCROLL_BAR=
S GTK3 X11 THREADS LCMS2<br><br>Important settings:<br>=C2=A0 value of $LAN=
G: en_US.UTF-8<br>=C2=A0 value of $XMODIFIERS: @im=3Dibus<br>=C2=A0 locale-=
coding-system: utf-8-unix<br><br>Major mode: Fundamental<br><br>Minor modes=
 in effect:<br>=C2=A0 tooltip-mode: t<br>=C2=A0 global-eldoc-mode: t<br>=C2=
=A0 electric-indent-mode: t<br>=C2=A0 mouse-wheel-mode: t<br>=C2=A0 tool-ba=
r-mode: t<br>=C2=A0 menu-bar-mode: t<br>=C2=A0 file-name-shadow-mode: t<br>=
=C2=A0 global-font-lock-mode: t<br>=C2=A0 auto-composition-mode: t<br>=C2=
=A0 auto-encryption-mode: t<br>=C2=A0 auto-compression-mode: t<br>=C2=A0 bu=
ffer-read-only: t<br>=C2=A0 line-number-mode: t<br>=C2=A0 transient-mark-mo=
de: t<br><br>Load-path shadows:<br>None found.<br><br>Features:<br>(shadow =
sort mail-extr emacsbug message rmc puny dired dired-loaddefs<br>format-spe=
c rfc822 mml mml-sec epa derived epg gnus-util rmail<br>rmail-loaddefs mm-d=
ecode mm-bodies mm-encode mail-parse rfc2231<br>mailabbrev gmm-utils mailhe=
ader sendmail rfc2047 rfc2045 ietf-drums<br>mm-util mail-prsvr mail-utils c=
l-extra pp cl-print package-x thingatpt<br>help-fns radix-tree help-mode ti=
me-date elec-pair warnings package<br>easymenu epg-config url-handlers url-=
parse auth-source cl-seq eieio<br>eieio-core cl-macs eieio-loaddefs passwor=
d-cache json map url-vars seq<br>byte-opt gv bytecomp byte-compile cconv cl=
-loaddefs cl-lib mule-util<br>tooltip eldoc electric uniquify ediff-hook vc=
-hooks lisp-float-type<br>mwheel term/x-win x-win term/common-win x-dnd too=
l-bar dnd fontset image<br>regexp-opt fringe tabulated-list replace newcomm=
ent text-mode elisp-mode<br>lisp-mode prog-mode register page menu-bar rfn-=
eshadow isearch timer<br>select scroll-bar mouse jit-lock font-lock syntax =
facemenu font-core<br>term/tty-colors frame cl-generic cham georgian utf-8-=
lang misc-lang<br>vietnamese tibetan thai tai-viet lao korean japanese eucj=
p-ms cp51932<br>hebrew greek romanian slovak czech european ethiopic indian=
 cyrillic<br>chinese composite charscript charprop case-table epa-hook jka-=
cmpr-hook<br>help simple abbrev obarray minibuffer cl-preloaded nadvice loa=
ddefs<br>button faces cus-face macroexp files text-properties overlay sha1 =
md5<br>base64 format env code-pages mule custom widget hashtable-print-read=
able<br>backquote dbusbind inotify lcms2 dynamic-setting system-font-settin=
g<br>font-render-setting move-toolbar gtk x-toolkit x multi-tty<br>make-net=
work-process emacs)<br><br>Memory information:<br>((conses 16 114821 11707)=
<br>=C2=A0(symbols 48 21397 0)<br>=C2=A0(miscs 40 99 151)<br>=C2=A0(strings=
 32 34316 1830)<br>=C2=A0(string-bytes 1 888700)<br>=C2=A0(vectors 16 17166=
)<br>=C2=A0(vector-slots 8 524482 10750)<br>=C2=A0(floats 8 54 84)<br>=C2=
=A0(intervals 56 292 144)<br>=C2=A0(buffers 992 15)<br>=C2=A0(heap 1024 446=
57 1840))<br><br></div>

--000000000000fd4f6c056bd322bd--




Acknowledgement sent to Zachary Kanfer <zkanfer@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#31397; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 29 May 2018 23:00:02 UTC

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