unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to set window size in .emacs and have that size respected?
@ 2009-01-13  9:45 WalterGR
  2009-01-13 16:03 ` Peter Dyballa
       [not found] ` <mailman.4768.1231862617.26697.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: WalterGR @ 2009-01-13  9:45 UTC (permalink / raw)
  To: help-gnu-emacs

In my .emacs ("22.2.1 of 2008-09-05 on vernadsky, modified by Ubuntu")
I set the window size (after changing the default font size):

(set-frame-height (selected-frame) 71)
(set-frame-width (selected-frame) 100)

The width is respected, but the height is not.  During startup, it
first grows the height to 70.  (Hypothesis: 71 is a few pixels too
tall to fit vertically in the screen, so Emacs drops it down to 70.)
Some initialization text flashes at the bottom of the screen.  Then
the height is reduced to 67.

In fact, for any size <71, Emacs will always reduce it by 3.  e.g.
(set-frame-height (selected-frame) 60) will end up with the height
being 57.

How do I get Emacs to respect my chosen window height?

Thanks,

Walter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to set window size in .emacs and have that size respected?
  2009-01-13  9:45 How to set window size in .emacs and have that size respected? WalterGR
@ 2009-01-13 16:03 ` Peter Dyballa
       [not found] ` <mailman.4768.1231862617.26697.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2009-01-13 16:03 UTC (permalink / raw)
  To: WalterGR; +Cc: help-gnu-emacs


Am 13.01.2009 um 10:45 schrieb WalterGR:

> How do I get Emacs to respect my chosen window height?


Remove tool-bar, menu-bar, window decoration?

--
Mit friedvollen Grüßen

   Pete

The problem with the French is that they don't have a word for «  
entrepreneur ».
				– George W. Bush







^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to set window size in .emacs and have that size respected?
       [not found] ` <mailman.4768.1231862617.26697.help-gnu-emacs@gnu.org>
@ 2009-01-13 16:08   ` WalterGR
  2009-01-13 16:17     ` WalterGR
  0 siblings, 1 reply; 6+ messages in thread
From: WalterGR @ 2009-01-13 16:08 UTC (permalink / raw)
  To: help-gnu-emacs

On Jan 13, 8:03 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 13.01.2009 um 10:45 schrieb WalterGR:
>
> > How do I get Emacs to respect my chosen window height?
>
> Remove tool-bar, menu-bar, window decoration?

I disable the tool-bar prior to setting the height.  The menu-bar and
window decoration are enabled.

But I don't think that's the problem.  While it's going through the
start-up process, Emacs shows the menu-bar and window decoration, sets
the height to what I choose, and then suddenly reduces the height by 3
lines.  It's the reduction-by-3 (which happens no matter which height
I select) that confuses me.

Thanks,

Walter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to set window size in .emacs and have that size respected?
  2009-01-13 16:08   ` WalterGR
@ 2009-01-13 16:17     ` WalterGR
  2009-01-13 16:24       ` WalterGR
  0 siblings, 1 reply; 6+ messages in thread
From: WalterGR @ 2009-01-13 16:17 UTC (permalink / raw)
  To: help-gnu-emacs

On Jan 13, 8:08 am, WalterGR <walte...@gmail.com> wrote:
> On Jan 13, 8:03 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
>
> > Am 13.01.2009 um 10:45 schrieb WalterGR:
>
> > > How do I get Emacs to respect my chosen window height?
>
> > Remove tool-bar, menu-bar, window decoration?
>
> I disable the tool-bar prior to setting the height.  The menu-bar and
> window decoration are enabled.
>
> But I don't think that's the problem.  While it's going through the
> start-up process, Emacs shows the menu-bar and window decoration, sets
> the height to what I choose, and then suddenly reduces the height by 3
> lines.  It's the reduction-by-3 (which happens no matter which height
> I select) that confuses me.
>
> Thanks,
>
> Walter

Oh, I get it now...  Your message led me to the right Google
incantation, and I found

http://osdir.com/ml/emacs.bugs/2002-11/msg00143.html

which suggests "This is a known problem, but nobody knows how to fix
it."  Unfortunate.

Walter



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to set window size in .emacs and have that size respected?
  2009-01-13 16:17     ` WalterGR
@ 2009-01-13 16:24       ` WalterGR
  2009-01-14  9:50         ` Torben Knudsen
  0 siblings, 1 reply; 6+ messages in thread
From: WalterGR @ 2009-01-13 16:24 UTC (permalink / raw)
  To: help-gnu-emacs

On Jan 13, 8:17 am, WalterGR <walte...@gmail.com> wrote:
> Oh, I get it now...  Your message led me to the right Google
> incantation, and I found
>
> http://osdir.com/ml/emacs.bugs/2002-11/msg00143.html
>
> which suggests "This is a known problem, but nobody knows how to fix
> it."  [snip]

...which doesn't seem to be true.  I solved the problem satisfactorily
by adapting a solution from [1]:

(defun maximize-window-vertically ()
  (interactive)
  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
	    		 '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0)))
(maximize-window-vertically)

Thanks,

Walter

[1] http://ubuntuforums.org/showthread.php?t=782196


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to set window size in .emacs and have that size respected?
  2009-01-13 16:24       ` WalterGR
@ 2009-01-14  9:50         ` Torben Knudsen
  0 siblings, 0 replies; 6+ messages in thread
From: Torben Knudsen @ 2009-01-14  9:50 UTC (permalink / raw)
  To: help-gnu-emacs

I also had problems controlling the position and size of my emacs
window.  I ended up with the below for reasons I don't recall.

;; Sizing emacs via .Xresources did not work perfectly for me.  
;; Therefore the below is included
(setq default-frame-alist '((top . 0) (left . 1440) (width . 80) (height . 64)))
(setq initial-frame-alist '((top . 0) (left . 1440) (width . 80) (height . 64)))

-- 
Associate Prof. Ph.D Torben Knudsen	Mobile	: (+45) 2787 9826
Section of Automation and Control,	Direct	: 6 8694
Department of Electronic Systems,	Email	: tk@es.aau.dk   
Aalborg University 
Fredrik Bajersvej 7 
DK-9220 Aalborg Ø
Denmark 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-14  9:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-13  9:45 How to set window size in .emacs and have that size respected? WalterGR
2009-01-13 16:03 ` Peter Dyballa
     [not found] ` <mailman.4768.1231862617.26697.help-gnu-emacs@gnu.org>
2009-01-13 16:08   ` WalterGR
2009-01-13 16:17     ` WalterGR
2009-01-13 16:24       ` WalterGR
2009-01-14  9:50         ` Torben Knudsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).