From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Calling (package-initialize) sooner during initialization Date: Mon, 30 Mar 2015 16:44:04 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427748274 30012 80.91.229.3 (30 Mar 2015 20:44:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Mar 2015 20:44:34 +0000 (UTC) Cc: emacs-devel To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 30 22:44:25 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 1YcgXl-0002U1-Hh for ged-emacs-devel@m.gmane.org; Mon, 30 Mar 2015 22:44:21 +0200 Original-Received: from localhost ([::1]:35894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcgXk-0005Bo-Vb for ged-emacs-devel@m.gmane.org; Mon, 30 Mar 2015 16:44:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcgXY-0005BY-Uw for emacs-devel@gnu.org; Mon, 30 Mar 2015 16:44:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcgXU-00012L-Ff for emacs-devel@gnu.org; Mon, 30 Mar 2015 16:44:08 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcgXU-00012H-C0 for emacs-devel@gnu.org; Mon, 30 Mar 2015 16:44:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAGvvdVRBbthL/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMFCwsOJhIUGA0kiBOiEYt4eAODPgMDg20EqDs X-IPAS-Result: AgUFAGvvdVRBbthL/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMFCwsOJhIUGA0kiBOiEYt4eAODPgMDg20EqDs X-IronPort-AV: E=Sophos;i="5.01,1,1400040000"; d="scan'208";a="114988665" Original-Received: from 65-110-216-75.cpe.pppoe.ca (HELO fmsmemgm.homelinux.net) ([65.110.216.75]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Mar 2015 16:44:05 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 19546AE0BC; Mon, 30 Mar 2015 16:44:04 -0400 (EDT) In-Reply-To: (Artur Malabarba's message of "Mon, 30 Mar 2015 20:01:53 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:184571 Archived-At: > Option 2) Instead of us manually telling users to add > `(package-initialize)' to their init-files, we have Emacs do that > automatically. Similar to how `custom.el' adds a call to > `custom-set-variables' the first time you save a variable; package.el > could add a call to `package-initialize' the first time you install a > package. I think that's the way to go, indeed. > This would be a one-time-thing (and would take some intelligent coding > to prevent annoyiances). I think "only add it if that string can't be found in ~/.emacs yet" should do it reliably enough. There's still one hard problem to solve, I think: How to make it so that Customizing package variable `foo-bar' works right (which requires loading foo-autoloads beforehand, usually done by package-initialize), while making it so that Customizing package-load-list and package-directory-list also works correctly (which requires delays package-initialize to after those custom-settings are applied)? -- Stefan