I want to set the window size (maybe it is the frame
in emacs speaking). I use this for the config. It works, but something happened that confused me. for example, if I set the width 80 and the height 30. When I start the emacs. It initialize to wider than 80 and higher than 30 which I set previously, then in a flash, it shrinked to the width 80 and height 30.
What I want to ask is why it appeared like this? can I set the window size as soon as the emacs initialized? How?
a similar thing happened with the toolbar. I disable the toolbar like this
(tool-bar-mode 0)
when I initialize the emacs, the toolbar appears, but in a flash it disappeared. FYI, I put the (tool-bar-mode 0)
in the very first line of the .emacs file.
For the strangely resizing window:
Basically, Emacs brings up its window (frame) before it reads your .emacs
. Obviously it has to be some size. Of course, this is customizable. On Unix systems, you do this by setting an X resource, which works a bit like an environment variable: Emacs can check for the setting when it first runs before loading up all the elisp-parsing machinery and getting to work on your .emacs. On Windows, I think you can set these variables through the registry. See this EmacsWiki page for a description of how to set variables in the registry. You want the Emacs.Geometry
key.
I don't know if it's possible to change tool-bar-mode
as an X resource. I didn't bother, since the appearing and disappearing tool bar was much less irritating than a moving window!