all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Thorpe <rt@robertthorpeconsulting.com>
To: Emanuel Berg <embe8573@student.uu.se>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How can I change the default loading buffer?
Date: Sun, 02 Aug 2015 16:56:01 +0100	[thread overview]
Message-ID: <87mvy93cry.fsf@robertthorpeconsulting.com> (raw)
In-Reply-To: <871tfq1k58.fsf@nl106-137-147.student.uu.se> (message from Emanuel Berg on Thu, 30 Jul 2015 03:58:27 +0200)

Emanuel Berg <embe8573@student.uu.se> 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
this.
* 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.

BR,
Robert Thorpe



  reply	other threads:[~2015-08-02 15:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 10:17 How can I change the default loading buffer? Navy Cheng
2015-07-29 13:54 ` kastian
2015-07-29 14:32   ` kastian
2015-07-29 17:31     ` Navy Cheng
2015-07-29 20:11       ` Robert Thorpe
2015-07-29 22:43         ` Emanuel Berg
2015-07-30  0:38           ` Robert Thorpe
2015-07-30  1:58             ` Emanuel Berg
2015-08-02 15:56               ` Robert Thorpe [this message]
2015-08-05 20:19                 ` get Elisp reference to info files (was: Re: How can I change the default loading buffer?) Emanuel Berg
     [not found]                 ` <mailman.7859.1438806073.904.help-gnu-emacs@gnu.org>
2015-08-06  1:23                   ` get Elisp reference to info files Ted Zlatanov
2015-08-07 22:41                     ` Emanuel Berg
2015-08-07 23:06                       ` John Mastro
2015-08-07 23:19                         ` Emanuel Berg
2015-08-07 23:25                           ` John Mastro
2015-08-08 17:37                             ` Robert Thorpe
2015-08-09  1:24                               ` Emanuel Berg
2015-08-09  2:05                             ` Emanuel Berg
2015-08-09  2:23                               ` John Mastro
2015-08-09  2:30                                 ` Emanuel Berg

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvy93cry.fsf@robertthorpeconsulting.com \
    --to=rt@robertthorpeconsulting.com \
    --cc=embe8573@student.uu.se \
    --cc=help-gnu-emacs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.