[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: desktop height?
From: |
Bruce Ingalls |
Subject: |
Re: desktop height? |
Date: |
Fri, 31 Jan 2003 00:11:28 GMT |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2) Gecko/20021127 |
Chris McMahan wrote:
Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> 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.