From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Radon Rosborough Newsgroups: gmane.emacs.devel Subject: Re: Summary and next steps for (package-initialize) Date: Mon, 21 Aug 2017 13:33:51 -0700 Message-ID: References: <83tw12cocz.fsf@gnu.org> <83d17qcfa1.fsf@gnu.org> <83h8x0c206.fsf@gnu.org> <83efs4byzj.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1503347689 19043 195.159.176.226 (21 Aug 2017 20:34:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 Aug 2017 20:34:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 21 22:34:43 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 1djtPC-0004Sq-5M for ged-emacs-devel@m.gmane.org; Mon, 21 Aug 2017 22:34:38 +0200 Original-Received: from localhost ([::1]:52717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djtPI-0002Yy-OX for ged-emacs-devel@m.gmane.org; Mon, 21 Aug 2017 16:34:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djtPA-0002YW-Ui for emacs-devel@gnu.org; Mon, 21 Aug 2017 16:34:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djtP9-0007A0-VM for emacs-devel@gnu.org; Mon, 21 Aug 2017 16:34:36 -0400 Original-Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:38028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1djtP8-00078Z-FR; Mon, 21 Aug 2017 16:34:34 -0400 Original-Received: by mail-lf0-x22a.google.com with SMTP id y15so71239633lfd.5; Mon, 21 Aug 2017 13:34:34 -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=a2MxaH0a8Jy4kbqJrCcSsg+xCiNzNkDEBvETuG1spj4=; b=kewKiv5ZB9l/xN89/LnAWP8G/Kl1j7k64seGgkAOAESzVSqj/geEoL371VXCgX60+K 7PGnZJudKph6tiH1XEmwDkp4/l+0pFR4Kz7gOkpeY6USTPIgnTf+aX7+c8QSyJ9LBRtB ZCTTZN7HL/xtffwuOcEoexoZvehWiHBQMsZY10oaXfTXdk9FNYZu/vwu6y1IifezkWei vLRuYaHn+RbDyvoTp1vn7y8OtT9Ta5qO0OYKBVBiYBP+uME4WqDOgwIyZgSsd7nP+8ul XpaGPymxG17w42K4Eirjm0NH3yO3wibOMIAmF2/U0sq3X2n+YdROymBPzi6xaJlaUfTf x32g== 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=a2MxaH0a8Jy4kbqJrCcSsg+xCiNzNkDEBvETuG1spj4=; b=pHVCohPfz5HOPLp3s9tVC5T+YrTRWZiR+oZS4+Kvy16KG+0c6f63TE8cQRjMqZsnsd hOVekONwsgsfG3P3k+YtuUZqWkcrsSW4pnLK+F8ObKB4Z4OcxfiMXvl4b5X+e/mY65cA atjMo5tL0RFuQR2P2yP97KAGRFMLrwBLjZwnrms79JAk+ScPXa4+jKsY5TR7pNkxwuee Ergym1iARLUBjbXGDRQJ10WmRQIWsTvEEULA6ylS+4j/7AnqIyWn0inr2GeOsGqqbZlM TrlQszLD3a/cx9KW0bdJU5yrqbyQTPntpXUTL4dNmdKydBKZ3K5VXI6vSay6W0ON52M9 IeyQ== X-Gm-Message-State: AHYfb5gI6NXwgt/b7pDXMw+Eer6eqSvAUEFvG8/5cF83hzAw9AnO0d+z 5Ey6aJN1lr8WsAyNIVhHXSqqUb1pLyO+7tcigw== X-Received: by 10.25.190.201 with SMTP id o192mr715127lff.246.1503347672493; Mon, 21 Aug 2017 13:34:32 -0700 (PDT) Original-Received: by 10.25.80.3 with HTTP; Mon, 21 Aug 2017 13:33:51 -0700 (PDT) In-Reply-To: <83efs4byzj.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22a 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:217669 Archived-At: > You are unfairly challenging me with stuff I know very little about > and therefore might make suggestions that are laughable. I'm sorry. That wasn't my intention at all. I fully expect anyone else to jump in and point out flaws in my reasoning, or to propose alternative solutions. I'm not trying to suggest that because you made the suggestion, you also have to have all the answers. The only reason I'm attacking the proposal of only calling `package-initialize' in startup.el is that I believe it's not only difficult but fundamentally impossible to find any solution. I outlined the reasons for that in my other email: PROPOSITION: Calling `package-initialize' only in startup.el is impossible without one of the following consequences: 1. It is impossible to customize `package-load-list' and `package-user-dir'. 2. We must add a second init-file. 3. The user cannot add package customizations to their init-file without using `after-init-hook'. 4. Packages are not activated automatically. PROOF: [...] And if somebody finds a flaw in that reasoning, then I'm all ears. But otherwise, it seems futile to try to find a solution in this direction. > That being said, one possibility is to have a function in package.el > scan the user init file for the definition of package-load-list, and > process that line before loading the packages. I really don't want to sound rude, but... *please* no. That would be a horrible hack. It will fail in so many different circumstances: package-load-list set in a different file, package-load-list set dynamically, package-load-list set in an unconventional way, package-load-list set by a macro, etc. etc. etc. Emacs Lisp is Turing-complete. It is futile for Emacs to try to understand it. In particular, Rice's theorem [1] says that all nontrivial behavioral properties of Turing-complete code (such as whether the user's init-file sets `package-load-list' or not) are formally undecidable. So this approach is doomed to failure from the very start. [In fact, whether the user's init-file calls `package-initialize' is also formally undecidable, so it will always be impossible to prevent duplicate calls from being inserted on occasion...] [1]: https://en.wikipedia.org/wiki/Rice%27s_theorem