From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: Customizable modes and package.el Date: Sat, 7 Nov 2015 22:26:01 -0500 Message-ID: <450F4FF4-8ABE-4BC2-B944-67D10971EEC7@gmail.com> References: <87fv8mcz6h.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1446953175 7879 80.91.229.3 (8 Nov 2015 03:26:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Nov 2015 03:26:15 +0000 (UTC) To: Emacs development discussions , bruce.connor.am@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 08 04:26:11 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 1ZvGcM-0002hC-FG for ged-emacs-devel@m.gmane.org; Sun, 08 Nov 2015 04:26:10 +0100 Original-Received: from localhost ([::1]:46007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvGcL-0000NF-OM for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 22:26:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvGcI-0000N4-Fc for emacs-devel@gnu.org; Sat, 07 Nov 2015 22:26:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvGcF-0000Qc-Ak for emacs-devel@gnu.org; Sat, 07 Nov 2015 22:26:06 -0500 Original-Received: from mail-qk0-x22a.google.com ([2607:f8b0:400d:c09::22a]:33789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvGcF-0000QX-75 for emacs-devel@gnu.org; Sat, 07 Nov 2015 22:26:03 -0500 Original-Received: by qkas77 with SMTP id s77so55693360qka.0 for ; Sat, 07 Nov 2015 19:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=C/LiCJsJBWASP6qlHKBMvPCjROaTlxgr/AMia3gh6OE=; b=XW7O03d+wxCx7L2kbcfMougDfRqRLAMyrzzRzUkV+Yas5VGeYoMPogHiUytewIJhT/ 6Uf2iLcVnLRZSNs2AAUIBiK0E8lWTq8kM53o8Jrps8qEFb9/Bb5ZKNku3eivfoe2S8b8 0nqD9AUa23Wtojp3DBLtFsFIJlRcqAGtUS3NlQpcV8uBvzUkAzZ61AnheunNm+KV3l+Z BXw/NGmOOUTzq7U8ZZBBAa5vA75yNi8RErV1O7n3owFx9I7v0M0ufw6Du24V7FX4Pu9R trmQ/jiO/s/l8ffOz48/b7l003Mif5J0SkKWZIDtUzEhcW6aT8jqVPvK1EPNsVoftrnE lgBw== X-Received: by 10.55.31.30 with SMTP id f30mr21882056qkf.5.1446953162868; Sat, 07 Nov 2015 19:26:02 -0800 (PST) Original-Received: from [10.0.1.23] (c-71-58-212-112.hsd1.pa.comcast.net. [71.58.212.112]) by smtp.gmail.com with ESMTPSA id 21sm2240133qgj.21.2015.11.07.19.26.02 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Nov 2015 19:26:02 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3094) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c09::22a 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:193581 Archived-At: On Mar 30, 2015, at 1:28 PM, Stefan Monnier = wrote: >=20 >>>> That's not an option, because the user may need/want to run some = Elisp >>>> code of his own choosing *before* package-initialize is called. >>>> E.g. in my case, I need to set package-load-list and >>>> package-directory-list before package-initialize runs. >>> `package-initialize' could look into some file like >>> ~/.emacs.d/package-init.el and load that before initializing. >> Please, not Yet Another File That Changes Emacs' Behaviour >=20 > Exactly. So, for these reasons, "the solution" is to add > "(package-initialize)" in the ~/.emacs file. See also Bug#21858. Adding (package-initialize) to a user-controlled file is ugly if it has = the consequence that it breaks startup of any older Emacs on the system. = =20 Also, note that the action is not undoable from the menus, even though = installing a package can be done via the menu. Simple kludge: (if (fboundp =E2=80=98package-initialize) (package-initialize)) But, reasonably: Treat .emacs as something only the user changes. `custom-file=E2=80=99 = is what can be changed by Emacs. (But that one is loaded too late, in = this case.) If packages are present, can=E2=80=99t (package-initialize) be called = unconditionally before .emacs is loaded? In response to Stefan = Monnier=E2=80=99s message from 3/30/2015, perhaps package-load-list and = package-directory-list can be set elsewhere, or their functionality = eliminated. Or they could be set in .emacs with a new macro such as=20 (eval-before-load=20 (setq package-load-list =E2=80=A6)) or even (set-package-load-list XXX) (set-package-directory-list YYY) Even the ~/.emacs.d/package-init.el file proposed by Artur seems more = reasonable than what is done now, and it wouldn=E2=80=99t require an = extra pass over the user=E2=80=99s .emacs.