From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.devel Subject: Re: user-controlled load-path extension: load-dir Date: Tue, 8 Mar 2011 10:49:18 -0800 Message-ID: References: <87tyfeq6hg.fsf@gmail.com> 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 1299610184 14263 80.91.229.12 (8 Mar 2011 18:49:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2011 18:49:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 08 19:49:40 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 1Px1yW-0003Au-7R for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2011 19:49:40 +0100 Original-Received: from localhost ([127.0.0.1]:50333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Px1yV-00028t-H9 for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2011 13:49:39 -0500 Original-Received: from [140.186.70.92] (port=49402 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Px1yQ-00028d-1w for emacs-devel@gnu.org; Tue, 08 Mar 2011 13:49:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Px1yO-0003tG-HJ for emacs-devel@gnu.org; Tue, 08 Mar 2011 13:49:33 -0500 Original-Received: from p3plsmtpa01-09.prod.phx3.secureserver.net ([72.167.82.89]:53016) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Px1yO-0003t6-7x for emacs-devel@gnu.org; Tue, 08 Mar 2011 13:49:32 -0500 Original-Received: (qmail 31565 invoked from network); 8 Mar 2011 18:49:30 -0000 Original-Received: from unknown (209.85.161.41) by p3plsmtpa01-09.prod.phx3.secureserver.net (72.167.82.89) with ESMTP; 08 Mar 2011 18:49:30 -0000 Original-Received: by fxm5 with SMTP id 5so6384338fxm.0 for ; Tue, 08 Mar 2011 10:49:28 -0800 (PST) Original-Received: by 10.223.14.137 with SMTP id g9mr917598faa.8.1299610158980; Tue, 08 Mar 2011 10:49:18 -0800 (PST) Original-Received: by 10.223.81.66 with HTTP; Tue, 8 Mar 2011 10:49:18 -0800 (PST) In-Reply-To: <87tyfeq6hg.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 72.167.82.89 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:136903 Archived-At: On Tue, Mar 8, 2011 at 1:58 AM, Evans Winner wrote: > the init process. =A0Anyway, for what it's worth. =A0This is the > sort of functionality I expected when I heard about the > ~/.emacs.d/ concept, and was surprised when that's not what > it was. I was also surprised that it wasn't possible to refactor my .emacs file in this way. Though it occurred to me after my last post that the average non-programmer probably would never feel the need to refactor his .emacs. For what it's worth (approximately the cost of the electrons used for this message), here's the code I added to the end of my .emacs to do what I believe we're discussing: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (defvar init-directory "~/.emacs.d/init-el" "Directory in which PJ keeps elisp files to be executed on startup") (push init-directory load-path) (byte-recompile-directory init-directory 0) (mapc 'load (mapcar (lambda(x) (substring x 0 -3)) (directory-files init-directory nil ".*\\.el$"))) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The part about byte-compiling the elisp files is totally unnecessary, but it makes me feel better to think that things are slightly more efficient than they could have been. ;-) -PJ