help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: frames and reading of .emacs?


From: Jan Even Nilsen
Subject: Re: frames and reading of .emacs?
Date: Thu, 08 Jan 2004 10:01:18 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630

Martin Stemplinger wrote:
AFAIK the settings are controlled by the variable
initial-frame-alist. Its documentation says

You can specify geometry-related options for just the initial frame
by setting this variable in your `.emacs' file; however, they won't
take effect until Emacs reads `.emacs', which happens after first creating
the frame.  If you want the frame to have the proper geometry as soon
as it appears, you need to use this three-step process:
* Specify X resources to give the geometry you want.
* Set `default-frame-alist' to override these options so that they
  don't affect subsequent frames.
* Set `initial-frame-alist' in a way that matches the X resources,
  to override what you put in `default-frame-alist'.

I tried this, and it works like before in some respects, the frame appears in position (given by X or whatever) and then pops into its assigned place, but not the right size.

My .emacs now looks like this after some stripping:
------------------------------------------------------------------
(setq default-frame-alist '((top . -00) (left . 300) (width . 89) (height . 51) (cursor-color . "red"))) (setq initial-frame-alist '((top . -00) (left . 300) (width . 89) (height . 51)))

(custom-set-faces
'(default ((t (:stipple nil :background "khaki" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 125 :width semi-condensed :family "misc-fixed"))))
 '(region ((t (:background "lightgoldenrod3"))))
)
-----------------------------------------------------------------

On startup the following happen:
1) The frame is moved to the right position, i.e. top and left is read from the first line, but the width and height is wrong, its 80x25 (wherever that came from). M-x new-frame gets right size.

Questions: Is width and height not read? But initial-frame-alist's value is ((top . 0) (left . 300) (width . 89) (height . 51)) when i check, so it must be read. Why does not emacs use these last two sizes on startup, while it uses the first two? Are they overridden by some other mechanism (afterwards? No visible size change though)?

2) The first line of custom-set-faces, the '(default ... is set OK, but the '(region ... is not right. Regions gets marked with white on blue. There is nothing wrong with the syntax here because when using
(load-file "~/.emacs") it is read and used OK.

Question: Again, is there some other mechanism overriding this setting upon startup? BTW: The region is not set righ by M-x new-frame, I need to (load-file "~/.emacs") in every new frame :-(

I have now stripped down the .emacs, and I am still puzzled, so I hope someone can give me a hint as to what my new emacs is doing. I know that an existing default.el would be read last, but there is no such file on my system, as far as I can see.

Sincerely, Even
on
GNU Emacs 21.3.1 (i386-mandrake-linux-gnu, X toolkit, Xaw3d scroll bars) of 2003-08-27 on ke.mandrakesoft.com, modified by Mandrake




reply via email to

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