[Top][All Lists]

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

Re: How can I change the default loading buffer?

From: Robert Thorpe
Subject: Re: How can I change the default loading buffer?
Date: Sun, 02 Aug 2015 16:56:01 +0100

Emanuel Berg <address@hidden> writes:
> OK, so what is the method to find out (or rule of
> thumb) what you shouldn't put directly into .emacs but
> instead into `emacs-startup-hook'?

Have a look at (info "(elisp)Startup Summary") and see if any of it
applies to you.  Check from the bottom of the list up.

You can only delay things as far at step 24, so there's little
use in worrying much about the earlier steps.  For people who use the
session manager and --daemon they could cause problems though.

This is how it is for me, going backwards, last step first:

* 24.  `emacs-startup-hook' and `term-setup-hook' are run.
* 23.  initial-buffer-choice.  Because the initial-buffer-choice is set
here, what happens in emacs-startup-hook can change it.  What happens in
the init file can't though.  I use this feature.  I setup
initial-buffer-choice to my ToDo file.  In emacs-startup-hook I look for
a bookmark into my init file, if it exists then I jump to it.
* 22.  Exit point for --batch.  If you use Emacs a lot in batch mode
it's worth doing a lot of visual stuff in emacs-startup-hook because
that way it won't slow down your batch programs.
* 21.  Other command line options.  I think this includes files
specified on the command line.
* 20.  Initial echo area message.  Not very important.
* 19.  Terminal specific lisp library.  This can be important if you use
terminal emulation and need one of these.  I've never had to worry about
* 18.  Set the mode of *scratch*.
* 17.  Run after-init-hook.
* 16.  Set after-init-time.  I think this is used in measuring how fast
Emacs init is.  If you use after-init-hook or emacs-startup-hook then
the stuff in those isn't measured.  In different situations you may want
that or not want it.  You can always put everything into the init file
temporarily just to see how long the full init takes.
* 15.  Initialize packages.  This is important, packages aren't
initialized in the init file.  There has been some discussion about
changing this.  Many people change it by putting package-initialize in
their init file.
* 14.  Load abbrevs.  Abbrevs are rarely used programmatically so I
don't think this matters much.
* 13.  Load "default" library.  I've never used that.
* 12.  Loading of the init file.

Robert Thorpe

reply via email to

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