From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.devel Subject: Re: user-controlled load-path extension: load-dir Date: Tue, 8 Mar 2011 22:03:34 -0800 Message-ID: <20110309060329.GA2042@event-horizon.homenet> References: <87ei6mz24h.fsf@lifelogs.com> <20110306072147.GA11067@event-horizon.homenet> <871v2i525h.fsf@lifelogs.com> <87oc5lx607.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" X-Trace: dough.gmane.org 1299650640 10173 80.91.229.12 (9 Mar 2011 06:04:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Mar 2011 06:04:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 09 07:03:56 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 1PxCUy-0000GH-9R for ged-emacs-devel@m.gmane.org; Wed, 09 Mar 2011 07:03:52 +0100 Original-Received: from localhost ([127.0.0.1]:44108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxCUx-0007J6-Lp for ged-emacs-devel@m.gmane.org; Wed, 09 Mar 2011 01:03:51 -0500 Original-Received: from [140.186.70.92] (port=59498 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxCUp-0007Hw-5D for emacs-devel@gnu.org; Wed, 09 Mar 2011 01:03:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxCUm-00045i-Qg for emacs-devel@gnu.org; Wed, 09 Mar 2011 01:03:43 -0500 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:45872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxCUm-00045X-Lx for emacs-devel@gnu.org; Wed, 09 Mar 2011 01:03:40 -0500 Original-Received: by iyf13 with SMTP id 13so272109iyf.0 for ; Tue, 08 Mar 2011 22:03:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=cGLl09vutLTdQHpdcD7URcDMGpzOCP+RAqGk1nAJo4Q=; b=UUdtXMzyGfBvqzPbia2EkUj2UEhpomX++MAIeOulDLqMuF69su8r93c6GAEOJguTl3 dRvhFteTNGANt5DWl9rRME9427dP+X4OaHfgObQC/sJULfm9vikcqKvG+kdRmiYkgWtV LrdSVzn9cmV3UWsuJmevTkqU+9IQZpJ73RmmY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=qDqKuY/cUYwI2T/9XlLneINb8ksRJjfHROUvjhg0WtXzqabwyNRtzWdm/xPWWGIoqg yfJlvXSMITkFjqSZvQguvuMSIsdjV9qB1Wsfkc/5Oj8opOUJCl7Ce++lMr3a8tNg2zcn xPwrBRPzbu6W/uHEik7qKuuCZMXF975JuatUI= Original-Received: by 10.43.50.199 with SMTP id vf7mr7776205icb.125.1299650619489; Tue, 08 Mar 2011 22:03:39 -0800 (PST) Original-Received: from event-horizon.homenet (115.sub-75-196-97.myvzw.com [75.196.97.115]) by mx.google.com with ESMTPS id 8sm1250996iba.4.2011.03.08.22.03.37 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 22:03:38 -0800 (PST) Content-Disposition: inline In-Reply-To: <87oc5lx607.fsf@lifelogs.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 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:136934 Archived-At: --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 08, 2011 at 04:26:32AM -0600, Ted Zlatanov wrote: > On Mon, 07 Mar 2011 21:46:10 -0500 Stefan Monnier wrote:=20 >=20 > >> I think this proposal is really about code snippets that people would > >> otherwise just cut and paste into their .emacs file. The average > >> user's .emacs often winds up containing mostly code they found > >> somewhere and use without really understanding it. Dropping each > >> snippit in its own file would be a big help if the user ever did need > >> to debug some problem with his init, or if he decided one day to > >> actually learn elisp. >=20 > SM> I'm far from convinced it's better for people to drop random chunks of > SM> configuration into separate files rather than all in the .emacs file. >=20 > It's not "better," it's what people already do. Emacs would just make > it easier than the current situation, which is to drop a file plus edit > the .emacs every time a file is added or deleted. What other choice is > there to modularize .emacs? >=20 > SM> If you're talking about downloading random files containing > SM> configuration code (so the user doesn't have to create a file, invent= ing > SM> a file name for it), then maybe that could make sense, but I haven't > SM> seen such files very much, and I suspect many of them could easily be > SM> turned either into themes or into packages installable via package.el. >=20 > Obviously that works for package managers like el-get. >=20 > OK, let's say I have the 8 files I listed earlier (tzz.emacs.*.el). I > want to load them modularly. So I put them in the load-dir. Do I have > to make 8 packages? And every time I update one of those files, do I > have to repackage it with a new version? That seems workable but > tedious compared to the code proposed by Ben Key and Evans Winner. >=20 > If you're against including the load-dir in the core and enabling it by > default, how about making it a GNU ELPA package so it's easily > installable? >=20 > On Tue, 8 Mar 2011 01:14:37 -0600 Ben Key wrote:=20 >=20 > BK> I am attaching to this message a quick implementation of this feature= I > BK> threw together in about an hour. I am not familiar with the Emacs pa= ckage > BK> mechanism but I am certain that this could be converted to an Emacs p= ackage > BK> without too much work thus making it easier to install. >=20 > On Tue, 08 Mar 2011 02:58:03 -0700 Evans Winner wrote:= =20 >=20 > EW> For what it's worth, this is the thing I have in my .emacs. > EW> It does what I want it to, which is just to allow me to > EW> break my .emacs into various not-excessively-long files > EW> organized by subject, like email config, org-mode config and > EW> so-forth. >=20 > Thanks for your code. Both of your solutions are similar to what I > would like to use, but Mike Mattie's concerns about startup behavior > (mainly for daemon mode, for --batch mode, and when there are errors) > are valid. The recursion behavior should probably not be the default by > parallel with other such systems I listed, e.g. /etc/rc.d and Bazaar's > plugins directory. It's easy enough to make it optional or to write a > snippet that loads a specific subdirectory. The argument I have against > recursion is that it's hard to tell at a glance what's going to get > loaded. I have thought alot about your proposal for automatic loading so that it is not necessary to edit anything, just drop a file in. There is some real appeal for that kind of a feature ... but it is hard to implement. By hard to implement I mean really hard. Just because a file is opened and written to, it is not necessarily ready to load. I hit C-x s alot when tweaking files ... Even if I hacked some kind of inotify support to watch a directory for IO activity I would never know when to actually load it. If you can somehow signal when a collection is ready for re-scanning I can see an implementation ... >=20 > It seems no one thinks prompting about new or changed files in the > load-dir is worthwhile, so never mind about that part of my proposal. I don't discount your idea, it's just hard to make a really reliable implementation IMHO. >=20 > Thanks > Ted >=20 >=20 --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) iEYEABECAAYFAk13GDEACgkQdfRchrkBInkxvwCg0yx8jaSZ0krjhRH1zieYmujC MbAAoJHdGb6MEJFB1OFGNCrroVX412zF =XVMN -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--