[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: user-controlled load-path extension: load-dir

From: Mike Mattie
Subject: Re: user-controlled load-path extension: load-dir
Date: Sat, 5 Mar 2011 23:21:51 -0800
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Mar 04, 2011 at 09:18:22PM -0600, Ted Zlatanov wrote:
> On Fri, 04 Mar 2011 22:33:35 +0100 Dimitri Fontaine <address@hidden> wrote: 
> DF> Tom Tromey <address@hidden> writes:
> >> If somebody added the feature you want to Emacs, presumably it would
> >> only be in Emacs 24, leaving you in the same situation.
> DF> Point.  I would still prefer to depend on user-load-path or something,
> DF> it strikes me as more general: you don't have to edit existing scripts.
> Tom is talking about one thing (package management) and we're talking
> about another (generic Lisp snippet management).  Sure, you can do the
> latter with the former, but it's a long stretch and is fighting the
> user.  Look, if I just want to put a file with
> (setq myvar xyz)
> or the el-get initialization, or whatever in the user-load-path, why do
> I have to make a package out of it?
> By analogy consider some of the software that lets you put a snippet in
> a conf.d directory, obviously implying that this is convenient for the
> user.  This is just a sampling from my machine:
> apache2
> newer crons (/etc/cron.d)
> AppArmor
> Grub
> libpaper
> sudo
> logrotate
> rsyslog
> modprobe
> sane
> Why not provide the same level of convenience in Emacs?  Other than
> security, what's the argument against it?  We all understand the
> benefits of modularization made easy, right?
> Ted

There are ways to solve the problem you are looking at without wiring more
logic into Emacs. Use the .emacs file as a more sophisticated loader for a
complex configuration when necessary.

I have done this with my Grail project (on EmacsWiki), as has tidyconfig.
I would look at these solutions first before proposing code that has to
be wired into the bootstrap codepath.

There are a number of issues a reliable loader should address:

how does it handle errors ?

how does it handle --batch ?

how does it handle --daemon ?

how simple,transparent,debuggable is the loader code ?

I have not seen any code so far in your proposal unless I accidentally
skipped or deleted a message with it.

Attachment: pgpEG7dGZRvkl.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]