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: Friendly discussion about (package-initialize) Date: Thu, 10 Aug 2017 10:06:34 -0700 Message-ID: References: <83inhwrqvh.fsf@gnu.org> <83h8xfsx5m.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 1502384851 24118 195.159.176.226 (10 Aug 2017 17:07:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 Aug 2017 17:07:31 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 10 19:07:26 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 1dfqvd-0005wV-BC for ged-emacs-devel@m.gmane.org; Thu, 10 Aug 2017 19:07:25 +0200 Original-Received: from localhost ([::1]:54295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfqvj-000301-PD for ged-emacs-devel@m.gmane.org; Thu, 10 Aug 2017 13:07:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfqvY-0002yM-53 for emacs-devel@gnu.org; Thu, 10 Aug 2017 13:07:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfqvW-0007pf-S9 for emacs-devel@gnu.org; Thu, 10 Aug 2017 13:07:20 -0400 Original-Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:33921) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dfqvU-0007ny-Uq; Thu, 10 Aug 2017 13:07:17 -0400 Original-Received: by mail-lf0-x236.google.com with SMTP id g25so6312356lfh.1; Thu, 10 Aug 2017 10:07:16 -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=gO7mCYpQjk9ImzILAtJvw/eSvwA8iiiY/eOG+2gJ+NM=; b=sCboK8HCrpOpGWuEtSDZT6/W9dAsczwmfwhL95lmR5fVZqxPEev93cPCOKELtX7iNb 68zKUgQgD302dGg8HcNYoZBfoDpwUpBF8eKawGoKkiwf5mKnERI9Bn5MyeplrwoQSYif rZSVZu8YHrop1kgo77OYztIMRIPLugCR6xyI8WRBC9f1yD1NPg9QN+djCdZ2OwFNY1H0 twWpXclU7oySHPpNMhUEVGiogfLzGu2/Xv9JZ1kJtLUToz20SO6XRtcvuqG5rLjj2I+d 44ihc8lVq5WxDMJc+eF13AN5qhdHCFXozTK+sSxnXO3rOM05wMhECTbgWhkC92h3x817 PLjg== 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=gO7mCYpQjk9ImzILAtJvw/eSvwA8iiiY/eOG+2gJ+NM=; b=N5dFbwoM3qAnOCVDY9yR6SRJKA+MND4RWciPkRdMfET5QfX/4vE+FIDLO3WnNYKTtN 5VMg3uGoEDNR8Dhc3pay9/fmiOTH9y8oaWAkg6qqdOFuxYMJdp3a0c+RR2Xck9gIVy6D uxFDKSvvTO0D5wlZpWxdM3wu9I/YYrMW2cS8xaGdhQCqvXmFF+LjSNQlRKTWg9uumKtA k03BcVIT6Cr1r6QzOththG9G1mymrB6QfQtJij2ngpGe3Qhrn6rQhLUCsHcyLV9FHgUG EgdRw9FTHna6MmLyibnuqDneUWN53KU44HEJEddryM3OxcANlnxvRu7GuvuK4rYRSZnY exkA== X-Gm-Message-State: AHYfb5jmvYpXT2xp59/KTSzDnVvFijor9KLRldHW2y+gDgZVs0RVCsTW AMMqFq9Wvcz6X/OQCaEeIGQXcGAqRUkAsSw= X-Received: by 10.46.22.90 with SMTP id 26mr4815141ljw.144.1502384834635; Thu, 10 Aug 2017 10:07:14 -0700 (PDT) Original-Received: by 10.46.64.86 with HTTP; Thu, 10 Aug 2017 10:06:34 -0700 (PDT) In-Reply-To: <83h8xfsx5m.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::236 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:217395 Archived-At: > This sounds like a contradiction. [...] Now I'm utterly confused. Sorry, it looks like I failed to provide enough context in the name of being concise. Let me try again. The issue is complicated because there are actually a number of different issues at play, which all interact in different ways. Firstly, let me describe my ideal world. This would be a world in which `package-initialize' was not called automatically anywhere, or inserted into the init-file, or anything. However, new users could still benefit from package.el because Emacs would generate a template init-file which would contain a call to `package-initialize', if no init-file already existed. Now there is also the question of where it is appropriate to call `package-initialize'. IMO, the only appropriate place to call it is in the user's init-file. Doing it anywhere else smells like unnecessary magic, and limits customizability. For example, calling it in startup.el after loading the init-file means that package customizations cannot be put in the init-file (unless you use `after-init-hook', an advanced and rather nonstandard approach), but the package management system still works after init. Can you possibly think of any setup that would be *more* confusing to new users? Then there is the issue of Emacs automatically modifying the init-file to stick a call to `package-initialize' in it. I think this behavior is disgusting because of how fragile and nonstandard it is. Now let me address your specific concerns. > If we call package-initialize from startup.el, why does it have to > also be called from the init files? IMO, it should not be called anywhere. I think having it only called in startup.el would be a reasonable compromise. Having Emacs insist on putting the call into the init-file, but then *also* calling it in startup.el, makes no sense. > since you are opposed to Emacs putting tyhis call to init files, why > do you disagree that calling package-initialize in startup.el is > wrong? I do think that the correct place to call `package-initialize' is in the init-file, but I object to Emacs taking care of this automatically. It might seem like the best solution at first glance, but doing it this way has a laundry list of horrible side effects (see my original email). > that's where Emacs performs all the initialization for the upcoming > session, and that should include initializing the packages which > need initialization. Like I said, having the call be only in startup.el would be a perfectly reasonable compromise IMO. My main issue is with Emacs modifying the init-file automatically. Does this make more sense? I can elaborate, but briefly: 1. I want `package--ensure-init-file' to go away ASAP. 2. I think Emacs should generate a template init-file; in addition to making `package--ensure-init-file' mostly superfluous, this would have other advantages in terms of improving default user experience. 3. If possible, I'd like startup.el to not call `package-initialize' either, but this is an order of magnitude less important than (1) and (2). Best, Radon