From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Summary and next steps for (package-initialize) Date: Thu, 24 Aug 2017 23:34:10 +0200 Message-ID: <634d4e4f-701d-47af-8a09-e358f441668f@gmail.com> References: < <83tw12cocz.fsf@gnu.org> <83wp5xat6i.fsf@gnu.org> <2d035e42-006b-e76e-2b3f-75f2dfd87bb7@taydin.org> <58ac4c14-3f26-4b21-806a-aa2326ce3d2b@default> <98f114b6-191e-43f9-b505-9362b9382508@default> <<83fucg99cj.fsf@gnu.org> <435fbbb8-6135-7cd9-d852-1da5f20f3f8f@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1503610504 11208 195.159.176.226 (24 Aug 2017 21:35:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2017 21:35:04 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 To: Drew Adams , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 24 23:34:58 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkzmC-0002VC-AN for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2017 23:34:56 +0200 Original-Received: from localhost ([::1]:50580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkzmI-0006w7-Sw for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2017 17:35:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkzlc-0006vq-AV for emacs-devel@gnu.org; Thu, 24 Aug 2017 17:34:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkzlX-00067Y-DK for emacs-devel@gnu.org; Thu, 24 Aug 2017 17:34:20 -0400 Original-Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:33763) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dkzlX-00066e-5k for emacs-devel@gnu.org; Thu, 24 Aug 2017 17:34:15 -0400 Original-Received: by mail-wr0-x230.google.com with SMTP id f8so2193078wrf.0 for ; Thu, 24 Aug 2017 14:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=lwUMZf6wquCrPuXNlXbEcizFvVQYHuMQE/q4lw05i1I=; b=Ra4mnOxKyNaazClfYuOmS89v4y0MdSf/zeWJKAdUpR9Fw3i/VqUZ+ivP6Nx/bdeaOU V7p7HysJ06SnAJyYInPfZdnLznQteKQvQO/tRpVQ20ngp6u3QZG+XGRcDqcdCU9sfLKe o+LONTSUyjviQRWN3fd4coFq7HVNOD9bXSS6Z2MEhRVqsJ2v38Gak47ZJZEfFL8B2OQ9 BRNbV/Te6Q4e5xNk05J4KWXEByDSQNw9x8tqDi/OmWiE6zobuZm1fVFy12PNL0jKQwGZ 3DcArFinLFBF8UpqVjVvHfcX068X5APpx3DYLGzrCCVjWr62yTt27EELoAfhOlsN2FNb qCGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lwUMZf6wquCrPuXNlXbEcizFvVQYHuMQE/q4lw05i1I=; b=agWyuzxJYKo7PCBj9u2ovilL/Vu03mSYQvqN1OhGeeGuYXwsSEvRcT8sm4UyBGGxv9 oUaeLi8NHLjlrcH4LjNUoHgQjzqAQACS+tyqHfKsof5kvzfN8vwbPMry208bwgbx8ig2 kyUrMpYPfD9gLyexBXOBTUHXA09KwDIS5ZfAhayCFhX6U0r9XEJdCNvBMVRtoYImHm0+ buii0Rt9JKiP3DGS7l5dosF7Ap4kqQbQi2HTkbGEE67L4KHA8skD8ZqjA1T4kV8NP4l6 E+8t1WQoRqJe2XTFTXM24VjTvy2Uqt2CbhPIyh2rDWejilnEw3Ka8QQnkAoFdgnSmYX8 EZMg== X-Gm-Message-State: AHYfb5hRr5GlO1XrcLwgDQwi9hoDL5xdgmf/Rw8I4qfIs4wVeH8Nsywd vXr4aifSnaHmh7qRIuA= X-Received: by 10.223.128.39 with SMTP id 36mr4267481wrk.250.1503610452427; Thu, 24 Aug 2017 14:34:12 -0700 (PDT) Original-Received: from [192.168.1.82] (43.225.24.109.rev.sfr.net. [109.24.225.43]) by smtp.gmail.com with ESMTPSA id q16sm35141wmg.30.2017.08.24.14.34.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 14:34:11 -0700 (PDT) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:217788 Archived-At: On 2017-08-24 20:29, Drew Adams wrote: > That does modify much of what I've said. If "activating the package > system" means just processing the autoloads for packages that have > been "installed", so that it is like doing `update-directory-autoloads' > in each part of `load-path', then I guess I don't have a problem with > such automatic "activation". I just double checked to make sure :) package-initialize does this: … (unless no-activate (dolist (elt package-alist) (package-activate (car elt)))) … Then package-activate calls package-activate-1, which calls package--load-files-for-activation, which calls package--activate-autoloads-and-load-path and calls `load' on all package files that were *already loaded* which is this: (defun package--activate-autoloads-and-load-path (pkg-desc) "Load the autoloads file and add package dir to `load-path'. PKG-DESC is a `package-desc' object." …) SUmmarizing, package-initialize sets up the loadpath to include directories of all installed packages, and loads their autoload files. Additionally, it reloads any already loaded (or `require'd) package file (it checks load-history for that): ;; Call `load' on all files in `package-desc-dir' already present in ;; `load-history'. This is done so that macros in these files are updated ;; to their new definitions. If another package is being installed which ;; depends on this new definition, not doing this update would cause ;; compilation errors and break the installation. Cheers, Clément.