From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jan Even Nilsen Newsgroups: gmane.emacs.help Subject: Re: frames and reading of .emacs? Date: Thu, 08 Jan 2004 10:01:18 +0100 Organization: University of Bergen Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1073553445 11119 80.91.224.253 (8 Jan 2004 09:17:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2004 09:17:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 08 10:17:16 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeWI0-0005tG-00 for ; Thu, 08 Jan 2004 10:17:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AeXEI-00013y-JD for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jan 2004 05:17:30 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.e.nsc.no!nsc.no!nextra.com!uio.no!nntp.uib.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 67 Original-NNTP-Posting-Host: cardiff.nersc.no Original-X-Trace: toralf.uib.no 1073554295 63849 129.177.42.105 (8 Jan 2004 09:31:35 GMT) Original-X-Complaints-To: abuse@uib.no Original-NNTP-Posting-Date: 8 Jan 2004 09:31:35 GMT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 X-Accept-Language: en-us, en In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:119862 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15805 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15805 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