From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 4449301: * etc/NEWS: Improve documentation of 'package-initialize'. Date: Wed, 23 Oct 2019 14:12:11 +0200 Message-ID: References: <20191022021600.2389.91268@vcs0.savannah.gnu.org> <20191022021602.B41B3209DE@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="17296"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 23 14:13:25 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iNFW1-0004PQ-5B for ged-emacs-devel@m.gmane.org; Wed, 23 Oct 2019 14:13:25 +0200 Original-Received: from localhost ([::1]:34100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNFVz-0000p7-RB for ged-emacs-devel@m.gmane.org; Wed, 23 Oct 2019 08:13:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60683) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNFV4-0000kS-9e for emacs-devel@gnu.org; Wed, 23 Oct 2019 08:12:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNFV3-0007yI-3O for emacs-devel@gnu.org; Wed, 23 Oct 2019 08:12:26 -0400 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:39789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNFV2-0007y2-UH for emacs-devel@gnu.org; Wed, 23 Oct 2019 08:12:25 -0400 Original-Received: by mail-pl1-x635.google.com with SMTP id s17so9990153plp.6 for ; Wed, 23 Oct 2019 05:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=//98IdB0Ta5AjnxtnJpP529HGlC6C594s24GvkABODk=; b=ACMQR63N13+k48YBdCcMBZjEYwGWv3JUty/LTJbqrKjnV6DpU7GD/xi3p+qtyE98Z9 qX+OLaUZ1Iex/aSW9pod+2H3Ol8ncXIEdkGGe9pGXTrd0Eu0FCoinhfluu8SDMlNI8lI O6xrufgl3KAp0ZHmai4Nmq7tFAgDKft6d/MFIdziE0B7XjpiUeoboHLTOiABXr92kMzs d94uFslHs8zoYaBOGgR7lgnJSnomfcEzUcknwqJlMWmGh0hOcozaaAdvpeH8jT/kY447 uRJ8tpf2AyAxTbQTdzZRr77H/AKYWy3IZP0VLmXmpRe82phutWHa6H5OS9LgNqUmNleG X5/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=//98IdB0Ta5AjnxtnJpP529HGlC6C594s24GvkABODk=; b=liEvfIJK0TjIx/yi334UJujVAtaJpvETqLXkDJZdo6whUtNjhlM89Wa7Ma2xQ/mTqD fnv7ke/4vfaaxO9gxW7rC8sJfd16QqPtuhWjIRkcraGPvffmekRyBK5NLP4gTlx1Rlbc FZgyfHHup6JArFfkZPuHkdkIA6dJBiJZPGN+rsVxzBvPF/APvFwtVBa6AES+xFeJQKBO sahCq7MFO5sFQulE9Pk/XtTvNEIehLpUTgM4XRBVBabtzFHQkesRcJbIDYNvCcLIvRCq Hx5i6PA67gfh8pWZoiQRxmSQP2c2u4s9jfqHiGloJxMKe8/p6FQHhYqJ4izWPCiRFAgm QZRg== X-Gm-Message-State: APjAAAWqJ5bfuLYCSqGIXXCS54NN79LIznQMPsuJ8iPlPBKEzg85sOLO imXm4H2uCAeDV67kye/0Njc4fzj9R8kVEeyIGj/X0+jJ X-Google-Smtp-Source: APXvYqzfOC460beJDv8b0yn9JUHatgU2JJZ1qbokjsBX8ou3UTGBqk5v2PuCaALDu9rF9gI1vsbsEr26BX70Rfy5zWQ= X-Received: by 2002:a17:902:a98c:: with SMTP id bh12mr9485369plb.128.1571832743065; Wed, 23 Oct 2019 05:12:23 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::635 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241357 Archived-At: Stefan Monnier writes: > > +(when (version< emacs-version "27.1") > > + (package-initialize)) > > That doesn't do the right thing with the current `master` (nor will it > with Emacs-27.1's pretest). Good point, thanks. > Maybe a better option is > > (when package-enable-at-startup > (package-initialize)) Yes, that would work. But I'm not sure I understand this variable in gener= al. It is a defcustom (a user option), but: 1. It's ineffective when set from the custom interface, since it has to be in the early init file. Right? 2. It is a user option, but gets set automatically by package-initialize. This makes it a bit confusing, because describe-variable says: package-enable-at-startup is a variable defined in =E2=80=98package.el=E2= =80=99. Its value is nil Original value was t I initially thought this meant *I* had changed it for some reason, because that's usually what it means when Emacs reports that it has changed, and then I was confused when I couldn't find out where. Only after a while did I understand that this is a user option that doubles as a variable that tracks if the package system was initialized or not. Would this be better as a defvar instead? Or should we introduce a new variable to mean that we are already initialized? I don't mean to rehash old discussions here, so feel free to refer me to earlier discussions if you've already had them. > or > > (unless package-activated-list > (package-initialize)) That could also work. Do we prefer not to do this by version? For example, my suggestion would probably have been: (unless (< emacs-major-version 27) (package-initialize)) Best regards, Stefan Kangas