From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.devel Subject: Re: Calling (package-initialize) sooner during initialization Date: Sun, 12 Apr 2015 12:07:24 +0200 Message-ID: <20150412100724.GA3498@odonien> References: <20150411231042.GA25541@odonien> <20150412082125.GA490@odonien> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1428833261 7319 80.91.229.3 (12 Apr 2015 10:07:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Apr 2015 10:07:41 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 12 12:07:36 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YhEne-0005Q3-Ln for ged-emacs-devel@m.gmane.org; Sun, 12 Apr 2015 12:07:34 +0200 Original-Received: from localhost ([::1]:44790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhEne-0001dg-1I for ged-emacs-devel@m.gmane.org; Sun, 12 Apr 2015 06:07:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhEna-0001dZ-B1 for emacs-devel@gnu.org; Sun, 12 Apr 2015 06:07:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhEnX-0001E8-4X for emacs-devel@gnu.org; Sun, 12 Apr 2015 06:07:30 -0400 Original-Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:33362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhEnW-0001Dz-UB for emacs-devel@gnu.org; Sun, 12 Apr 2015 06:07:27 -0400 Original-Received: by wiax7 with SMTP id x7so44266693wia.0 for ; Sun, 12 Apr 2015 03:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=rjKoxyLismVcmS5ZC/CqdIUL6aU8/i3vlCfm4eaAOwo=; b=c76pGcZB0LyAQcAKxqo3WMlK1MWRgDNNeVjCYz/3cO+rlRjEC/zbCI2bveuMTarwdc B6rIuk9UiQqoCyQ8mAOgMo7haL3UH0g0pAZaoP1+/mKtxAK6lqLlg6btI7VLYPIg9LzM IvuitIKudZZNDnU82Qj1cS1NCyF7B+QyZBG68VH5P4CeoneOwwo4RH3xla8AnONTUhGg Do9KsjXHS7fLsImAyW9yuftCChxE1AiLVhui/ZFiI4Be3H2en4uSOUhhWf57we3dQC3c qGm2bDA0lMIaGXxuOXNWSQJieh+BU8MbYJrcCRcfvNz4dja3KnuENHeJ+mYz3mHREwfA G3Eg== X-Received: by 10.180.91.77 with SMTP id cc13mr12125155wib.88.1428833246423; Sun, 12 Apr 2015 03:07:26 -0700 (PDT) Original-Received: from localhost (xdsl-78-34-240-244.netcologne.de. [78.34.240.244]) by mx.google.com with ESMTPSA id eu3sm6338786wjb.16.2015.04.12.03.07.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Apr 2015 03:07:25 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20150412082125.GA490@odonien> User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185326 Archived-At: > We discussed this already. There's the issue of configuring package.el > before loading it and/or before calling package-initialize. OK, I've checked again and sighted eight customization candidates in package.el: - package-enable-at-startup: Would be equivalent to the proposed environment variable. - package-load-list: Needs to be configured before. - package-archives: Needs to be configured before for non-interactive package installation. - package-pinned-packages: Needs to be configured before for non-interactive package installation. - package-user-dir: Needs to be configured before. - package-directory-list: Needs to be configured before. - package-check-signature and package-unsigned-archives: Can be customized afterwards So, while setting the environment variable in my proposal would equal the (setq package-enable-at-startup nil) trick in combination with the necessary customization and (package-initialize) at a later point in the init file, it would be clunkier than the status quo. Another possible technical solution to this would be introducing an extra configuration file containing the listed startup/package-related options only that is read in before the init file. Finally, to suggest a non-technical solution to this "problem" of new users not knowing about (package-initialize) for the use of functionality from packages they've installed from package archives, why not improve existing documentation? GNU ELPA's homepage is minimal. Its documentation seems to be the "Packages" section of the Emacs info manual. Linking to it would be a fair improvement opportunity. MELPA's "Getting started" page explains the need for and placement of (package-initialize) reasonably well, perhaps an explanation of the gotchas involved would be useful. Marmalade has an interactive walkthrough, yet doesn't mention (package-initialize) at all. Adding that part to its homepage would be better than passing the responsibility to package developers getting issues reported by users not aware of this. I would generally be interested in empirical evidence of the numbers and package archives involved in such bug reports to see whether my suggestions are right on the mark.