help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Speed up Emacs startup


From: Anselm Helbig
Subject: Re: Speed up Emacs startup
Date: Wed, 23 Nov 2005 01:07:23 +0100
User-agent: Wanderlust/2.11.30 (Wonderwall) Emacs/21.4 Mule/5.0 (SAKAKI)

hi again, sebastien, 

> I've completely avoided that problem by using a `try-require'
> function: if the package is not installed, it'll just go on as
> if nothing happened.
> 
> [...]
> 
> If I would spend some time on customizing that function, it
> could even tell the user the list of missing packages. Better
> can't be.

you could as well code an advice for require and/or load. but maybe
that's just a matter of taste. i prefer to use as much of the
`built-in' infrastructure as possible. 

another drawback of you approach: if someone copies snippets of your
.emacs, they won't work unless he or she copies your
`try-require'-defun as well. this cannot happen if you'd use
`require', and you can nevertheless have additional functionality with
`defadvice'. 

but all this depends on your needs, like, how many different
installations you have to use, and how you share your .emacs with
others.

> > i only left `require's in my .emacs if the package is either very
> > small (browse-killring+), binds a lot of keys (vcursor), i really need
> > it every time (ido, session) or if i was just too lazy to update my
> > autoloads yet.
> >
> > tell me if you know other reasons to keep them. 8-)
> 
> My only reason to keep the require explicitly in the `.emacs'
> configuration file is then, still, the wish of completeness
> about what I personally loads when using Emacs on my PC.

you pay with your longer startup time for that. and regarding your
`wish for completeness': many of emacs' functions are autoloaded, all
the programming modes, for example. but you don't you feel incomplete
when you open the first c-file in a session, do you? 8-)

> > i cut my startup time down from 16s to 4s using autoloads. i think it
> > was worth it. 8-)
> 
> My only problem is, and therefore you're right, I've still have
> to wait 24 seconds for my Emacs to be ready to accept my input...

hum. thinking about it, there is another way, apart from autoloads, to
make emacs start faster: you can dump your own executable with all
your packages already loaded. read more about it here:

        (info "(Elisp)GNU Emacs Internals")

there's also a page on emacswiki.org about this, with a more detailed
explanation on how to actually use this. i tried it, and ran into some
problems, my dumped emacs behaved sort of weird - maybe you're more
determined and can make it work for you. 8-)

anyway, there are many ways to achieve things in emacs, so everyone
can take what they like best and customize the hell out of this
beast. 

but, hey, the way _i_ use emacs is of course the best. and my taste in music
is superior as well. 8;->>

kind regards and (all-hail-emacs), 

anselm


reply via email to

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