From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Phillip Lord Newsgroups: gmane.emacs.help Subject: Re: desktop height? Date: 28 Jan 2003 14:27:38 +0000 Organization: BIOSCI/MRC Human Genome Mapping Project Resource Centre Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1043764318 9647 80.91.224.249 (28 Jan 2003 14:31:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2003 14:31:58 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18dWln-0002TA-00 for ; Tue, 28 Jan 2003 15:31:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dWlL-00029a-01 for gnu-help-gnu-emacs@m.gmane.org; Tue, 28 Jan 2003 09:30:55 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!server1.netnews.ja.net!hgmp.mrc.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: bromine.hgmp.mrc.ac.uk Original-X-Trace: niobium.hgmp.mrc.ac.uk 1043764059 28543 193.62.192.35 (28 Jan 2003 14:27:39 GMT) Original-X-Complaints-To: news@net.bio.net Original-NNTP-Posting-Date: Tue, 28 Jan 2003 14:27:39 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93 Original-Xref: shelby.stanford.edu gnu.emacs.help:109494 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6014 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6014 >>>>> "Bruce" == Bruce Ingalls writes: Bruce> Does anyone know a way to calculate the height of the desktop Bruce> in elisp? Bruce> I'd like Emacs to start up with maximum height. For that Bruce> matter, I'd like XEmacs, and various OSes to work. Bruce> In Linux X Window, the following works reasonably well: Bruce> (/ (- (x-display-pixel-height) 50) (frame-char-height))) Bruce> I can get reasonably close with Bruce> (/ (x-display-pixel-height) Bruce> (* (/ (font-default-size-for-device) 2) 3)) Bruce> which works in w32 XEmacs as Bruce> (/ (x-display-pixel-height) Bruce> (* (/ (string-to-number (font-default-size-for-device)) 2) Bruce> 3)) Bruce> or w32 Emacs as Bruce> (/ (x-display-pixel-height) 18) Bruce> I'd also like to hear of testing on other OSes. If someone Bruce> has a better solution, please send it! Thanks ahead. I used to probe the display to get what is effectively a maximised emacs, on start up. I stopped doing this because probing in this way misses things like the Gnome toolbar (which I still want to be visible). In recent years I've just gone onto setting it by hand. Cheers Phil