From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: user-controlled load-path extension: load-dir Date: Thu, 10 Mar 2011 02:29:02 +0900 Message-ID: <874o7cjj8h.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87ei6mz24h.fsf@lifelogs.com> <20110306072147.GA11067@event-horizon.homenet> <871v2i525h.fsf@lifelogs.com> <87oc5lx607.fsf@lifelogs.com> <874o7ds37p.fsf@lifelogs.com> <4D7726E8.5090206@swipnet.se> <4D772988.4070209@gmail.com> <4D775002.8050100@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1299693071 16150 80.91.229.12 (9 Mar 2011 17:51:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Mar 2011 17:51:11 +0000 (UTC) Cc: Christoph Scholtes , tzz@lifelogs.com, emacs-devel@gnu.org To: Jan =?iso-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 09 18:51:07 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PxNXO-0002Nx-IU for ged-emacs-devel@m.gmane.org; Wed, 09 Mar 2011 18:51:06 +0100 Original-Received: from localhost ([127.0.0.1]:36377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxNXN-0005ao-Tc for ged-emacs-devel@m.gmane.org; Wed, 09 Mar 2011 12:51:06 -0500 Original-Received: from [140.186.70.92] (port=48691 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxN9b-0001ss-Bc for emacs-devel@gnu.org; Wed, 09 Mar 2011 12:26:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxN9U-0007Bh-5D for emacs-devel@gnu.org; Wed, 09 Mar 2011 12:26:25 -0500 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:53597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxN9T-00078t-KH for emacs-devel@gnu.org; Wed, 09 Mar 2011 12:26:24 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id E03919706AB; Thu, 10 Mar 2011 02:26:13 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 69C2A1A2749; Thu, 10 Mar 2011 02:29:02 +0900 (JST) In-Reply-To: <4D775002.8050100@swipnet.se> X-Mailer: VM 8.1.93a under 21.5 (beta29) "garbanzo" f5a5501814f5 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.224 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136976 Archived-At: Jan Dj=E4rv writes: > Christoph Scholtes skrev 2011-03-09 08.17: > > On 3/9/2011 12:06 AM, Jan D. wrote: > > > >> Another thing I really would like is for customize to > >> save its stuff in its own file and not in my .emacs. With a load-dir > >> this would be trivial. > > How about this: > > (setq custom-file "~/.emacs.d/init-custom.el") > > (load custom-file) > Yes, but this is missing the point. I can make an load-dir feature > in .emacs too. It is having this in emacs core, working without > extra user work that is the point. Yeah, except that as proposed you'll have to enable it in the init file anyway since it's off by default. It's also not entirely trivial, as experience in XEmacs shows that the decision about whether to load such things (specifically custom-file) *before* or *after* the user init file is a delicate one. I can only imagine that a load-dir would very likely be the source of numerous bugs as some snippets conflict with or depend on others but the automatic loader gets them in the wrong order. Note also that .d directories generally use some convention (such as file names starting with fixed width integers) that ensure that snippets sort in the right order. More modern systems use (please sit down, you're in for a shock) full-blown dependency systems (requires, provides, conflicts, etc) in the snippets, which avoids the need to maintain explicit order in favor of a partial order.