From: Mike Mattie <codermattie@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Feature Request : autoload-form
Date: Sun, 30 Mar 2008 14:35:08 -0700 [thread overview]
Message-ID: <20080330143508.44888605@reforged> (raw)
In-Reply-To: <e30f0f320803300424s6215e966v859f8822d054853f@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4146 bytes --]
On Sun, 30 Mar 2008 12:24:19 +0100
"paul r" <paul.r.ml@gmail.com> wrote:
> 2008/3/30, Richard Stallman <rms@gnu.org>:
>
> > I don't think we should install this in Emacs, though. Something
> > like autoload should be kept simple and limited.
>
> I think of autoload as a particular case of the general need to
> "eval-on-event-then-call". Therefore, I do not see why evaluating a
> form is less simple than loading a file. Form evaluation is, indeed,
> less limited but I don't see why it should be a disadvantage here.
>
> > If loading a certain file needs load-path to be set a certain way,
> > the user should simply set load-path that way, perhaps in .emacs.
> > It is a bad idea to have files that only work right if load-path
> > is temporarily changed; rather than adding a new file to Emacs
> > to cope with that situation, it would be better to redesign the
> > Lisp code that appears to need it.
>
> You are understanding most of the problem I'm facing. I'll try to give
> you some more information in a manner as concise as possible.
> I wrote a system called TidyConfig for emacs. It is not a mode, it is
> a system. Its ultimate goal is to allow people to share effectively
> what usualy resides in .emacs. Some people want to do that, because
> they have very similar usage profiles, although not exactly the same.
> Users copies can be synced using a DVCS. The best example I see is
> people in my company, who all use TidyConfig and this way avoid
> duplicated efforts. To achieve that :
> - I got rid of the monolithic .emacs, so that bits of configuration
> go into dedicated "modules". There is a module for C-mode, one for
> Muse-mode etc. One module resides in one file. Modules are shared in
> your network of friends/colleagues ... anybody syncing with you, so
> they are "network-specific" but not "user-specific".
> - To allow fine-tuning, a user can use "module configuration file",
> which is an other file, with personal tweaking in it. Those conf files
> are not shared and are usually optional. They are user specific, and
> private. Exemple : the ERC module does a lot of configuration, but it
> can not set up username, password etc because this information is
> user-specific.
>
> Any module is optional, this is the whole point of this project. Each
> user simply choose in a list what modules he wants to use. He can
> chose to load them at startup time, or "later when needed". In this
> last case, I obviously use autoload.
>
> I could put, at beginning of *every* modules, a (load-file
> "thisModuleConfigurationFile" t). This is what I did before, but I do
> not find that elegant, nor fully satisfactory in many ways for the
> needs, so it now is to the TidyConfig system to carry proper loading
> of modules.
>
> Here we are. I currently have no option to do so, except putting the
> form I want to eval in a dummy file and registering this file with
> autoload. This is now what I do, and please believe I don't feel
> pround of that ugly hack :)
>
> If you want to visit my upstream TidyConfig repository, and why not
> give it a try, you can go to
> http://emacs.kekerekex.net:8008/tidyconfig-vanilla/summary . It is
> versionned through mercurial, so you can also do a "hg clone" of this
> url. It could maybe be used as a playground for people here to try and
> share some lisp before checking in into the trunk, and also to get
> hands on DVCS. There is an up to date documentation in english.
>
> Hope that was not too long ... Thanks.
I wrote something very similar, but different on some design points. It boiled down
to my "modules" having a three part form:
[define meta-data & hooks ]
[ load w/require ]
[ setup ]
I would define things like install hooks before the loading part. If anything went wrong with loading
needed libraries, my load function could execute the install hooks, and re-evaluate the module.
loading would be a bunch of require forms.
The setup would configure and integrate the features.
If you want to know more drop me a mail off-list.
> -- Paul
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-03-30 21:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 20:05 Feature Request : autoload-form paul r
2008-03-29 4:20 ` Stefan Monnier
2008-03-29 9:49 ` paul r
2008-03-29 19:40 ` Stefan Monnier
2008-03-30 5:49 ` Richard Stallman
2008-03-30 11:24 ` paul r
2008-03-30 15:03 ` Stefan Monnier
2008-03-30 22:28 ` paul r
2008-03-31 7:58 ` Levin Du
2008-03-30 19:55 ` Richard Stallman
2008-03-30 21:35 ` Mike Mattie [this message]
2008-03-31 16:24 ` Richard Stallman
2008-03-31 17:36 ` paul r
2008-03-31 21:31 ` Mike Mattie
2008-04-02 2:53 ` Richard Stallman
2008-04-02 12:44 ` paul r
2008-04-02 17:34 ` Richard Stallman
2008-04-02 19:06 ` paul r
2008-04-02 21:07 ` Don Armstrong
2008-04-03 4:30 ` Stephen J. Turnbull
2008-04-03 5:01 ` Don Armstrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080330143508.44888605@reforged \
--to=codermattie@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).