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

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

Re: set window size on init


From: Jonathan Groll
Subject: Re: set window size on init
Date: Sat, 14 Nov 2009 08:51:54 +0200
User-agent: Mutt/1.5.18 (Linux mail 2.6.28-xen3-U-64 x86_64)

On Wed, Nov 11, 2009 at 03:05:06PM -0500, despen@verizon.net wrote:
Eli Zaretskii <eliz@gnu.org> writes:

From: Xah Lee <xahlee@gmail.com>
Date: Tue, 10 Nov 2009 11:57:14 -0800 (PST)

i have, at the end of my .emacs this code:

; set window size to 100x58 chars.
(set-frame-size (selected-frame) 100 58)

however, it doesn't work.
But eval-region the code itself would work.

Does it help to run this from term-setup-hook or window-setup-hook?

The reason for the inconsistency is that Emacs initializes the GUI
display at some specific point during startup, and any customizations
of the display before that point will generally be overridden.

It might but this page suggests some solutions:

http://emacsblog.org/2007/01/29/maximize-on-startup-part-1/

(The one with the initial-frame-alist seems most useful.)

The same Ryan McGeary who wrote the above blog entry also wrote
maxframe.el:
http://files.emacsblog.org/ryan/elisp/maxframe.el

I find it works perfectly well for me with GNU emacs under Linux if it
is one of the last things invoked in .emacs.

Under OS X I manually set frame-size as maxframe makes the frame too
big. This is the function I use to set frame-size manually for my
specific display:

;;maximize frame function for darwin - by Nurullah Akkaya on help-gnu-emacs
(defun na-resize-frame-big ()
  "Set size"
  (interactive)
  (set-frame-width (selected-frame) 178)
  (set-frame-height (selected-frame) 50 )
  (set-frame-position (selected-frame) 0 1))


Regards,
Jonathan




reply via email to

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