Others have considered using gnuserve and emacsclient , and I would suggest compiling in emacs (the ability to go to compilation errors is a win).
But, especially .emacs acceleration can be done:
Byte compiling an .emacs file that you can do automatically using this piece of code
Replacing as many operators as possible (require 'package) autoload ed. This will delay lisp loading until it is needed. Using this technique allowed me to speed up my startup s> 6 seconds to <1. This requires a bit of work, because not all libraries are correctly labeled autoload .
Removing code / features that you no longer use.
Try running emacs with the --no-site-file option to avoid downloading unnecessary packages when installing site-start.el .
If you are really serious, you can roll your own emacs with your favorite functionality already loaded. This, of course, means that it makes more active changes to what you have in .emacs , because it is part of a binary file. Follow the link for information on how to use dump-emacs .
Buy a faster computer and / or faster disk.
How to determine what your .emacs loads
Now, how do you know what your .emacs loads? To remove functionality or to postpone it? Check the *Messages* buffer containing strings, for example:
Loading /home/tjackson/.emacs.tjackson.el (source) ...
Loading /home/tjackson/installed/emacs/lisp/loaddefs.el (source) ... done
Loading /user/tjackson/.elisp/source/loaddefs.el (source) ... done
Loading autorevert ... done
Loading /home/tjackson/.emacs.tjackson.el (source) ... done
If you notice, the Loading statements can .emacs.tjackson.el : the first .emacs.tjackson.el ends with ... , and the last line shows the loading of .emacs.tjackson.el ...done . All of these files are downloaded from my .emacs.tjackson.el file. All other loads are atomic.
Note. If you have a large .emac, it is possible that the *Messages* buffer will lose some of the messages, since it only stores a fixed amount of information. You can add this option at an early stage to .emacs to save all messages:
(setq message-log-max t)
Note: the 'load command will suppress messages if its fourth argument nomessage not zero, so delete all such calls (or, we advise 'load and force the fourth argument to be nil ).
Trey Jackson Apr 22 '09 at 20:44 2009-04-22 20:44
source share