Alex Rivera | Logout

How can I make Emacs start-up faster?

Asked 2009-04-22T19:12:01.040
78

I use Emacs v. 22 (the console version, either remotely with PuTTY or locally with Konsole) as my primary text editor on Linux. It takes a while to load up each time I start it though, probably almost a second, although I never timed it. I tend to open and close Emacs a lot, because I'm more comfortable using the Bash command-line for file/directory manipulation and compiling.

How can I speed up the start-up time?

Edit
Report

2 Answers

30

Don't close Emacs every time you want to use the shell. Use Ctrl-Z to move Emacs to the background and the fg command in Bash to move it back to the foreground.

answered 2009-04-22T19:22:57.347
11

One thing that helped me reduce the load time of my .emacs, in addition to autoload (as others have suggested), is eval-after-load. In the following example, delaying the call to sql-set-product saves you from having to load sql in your .emacs, making the exisiting sql autoloads more effective.

(eval-after-load "sql"
  '(progn
     (sql-set-product 'mysql)
     (setq sql-mysql-options '("-C" "-t" "-f" "-n"))
     (setq sql-sqlite-program "sqlite3")
     ))

Of course, for some packages there will be a hook available that you can do the same thing, but sometimes there isn't, or else this way just proves easier to think about.

answered 2009-04-28T17:17:28.007

Your Answer