[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: desktop height?
From: |
Chris McMahan |
Subject: |
Re: desktop height? |
Date: |
31 Jan 2003 08:48:52 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Thanks! Your suggestion on the name changes is excellent. I'll make
that change here as well.
As for setting MY_FONT, here's the code (with some more context around it):
;;;===================================================
;;; Set the default font and frame size for all frames
;;;===================================================
(defconst MY_FONT "-*-Lucida Console-normal-r-*-*-11-*-*-*-c-*-iso8859-15")
;;; Set the default font to return the appropriate character height
;;; for the initial height calculation
(set-frame-font MY_FONT)
;;; initial window position settings, height and vertical position is
;;; automatically calculated from within the .emacs-config file
;;; The top left corner is 0 0, the bottom right is -1 -1
(defconst MY_INITIAL_WIDTH 120)
(defconst MY_INITIAL_LEFT -15)
The reason I do it with the consts is that I place all of the settings
(email, proxy, directory locations and such) within my .emacs file,
then call a .emacs-config file from there to do the actual
configurations based on the settings.
- Chris
Bruce Ingalls <bingalls@CUT-this-SPAM-BLOCK.fit-zones.com> writes:
> 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.
>
--
(. .)
=ooO=(_)=Ooo========================
Chris McMahan | cmcmahan-AT-one.net
====================================