From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bruce Ingalls Newsgroups: gmane.emacs.help Subject: Re: desktop height? Date: Fri, 31 Jan 2003 00:11:28 GMT Organization: Road Runner - NYC 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; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1043972151 10568 80.91.224.249 (31 Jan 2003 00:15:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 31 Jan 2003 00:15:51 +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 18eOqT-0002kG-00 for ; Fri, 31 Jan 2003 01:15:49 +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 18eOqT-0005fW-01 for gnu-help-gnu-emacs@m.gmane.org; Thu, 30 Jan 2003 19:15:49 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.rdc-nyc.rr.com!news-out.nyc.rr.com!twister.nyc.rr.com.POSTED!not-for-mail User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2) Gecko/20021127 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 42 Original-NNTP-Posting-Host: 24.168.135.82 Original-X-Complaints-To: abuse@rr.com Original-X-Trace: twister.nyc.rr.com 1043971888 24.168.135.82 (Thu, 30 Jan 2003 19:11:28 EST) Original-NNTP-Posting-Date: Thu, 30 Jan 2003 19:11:28 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:109624 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:6141 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6141 Chris McMahan wrote: > Bruce Ingalls writes: >>Does anyone know a way to calculate the height of the desktop in elisp? ... > I've got the following code with sets the initial height based on the > current screen's resolution (working under WindowsXP with Emacs 21.2). > This assumes the font (defined in my .emacs as MY_FONT) is already > set. This is necessary to correctly return the frame-char-height. Would be nice to see the syntax to set MY_FONT ...> ;;; frame sizing functions ...> (defun fix-frame () ... Very nice. Worked on my Linux box, which makes me believe that your code is more portable. I did need to adjust it for the tray/panel/taskbar/statusbar, as you indicated. Consider renaming your functions, so that you can more easily remember them with sentence completion, and so that they better fit a name space. Instead of fix-frame, etc. try: frame-adjust frame-fix frame-enlarge While your code worked perfectly for Emacs, I had to adjust XEmacs. I also do this (already) in desktop-height-approx(). I'd like to hear from the community, as to which code works better for them. I remind users to adjust for their XEmacs & taskbars, when using your code, before making judgement. One last tradeoff with your code: the use of set-frame-height() is nice, in that it can change an already running Emacs, but, as opposed to frame-initial-frame-plist() or setq default-frame-plist(), it appears to be capable to screw up an emacs -nw and perhaps other console modes of Emacs/XEmacs.