all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris McMahan <cmcmahan+n@one.net>
Subject: Re: desktop height?
Date: 31 Jan 2003 08:48:52 -0500	[thread overview]
Message-ID: <u1y2t4egr.fsf@one.net> (raw)
In-Reply-To: Qaj_9.1112$KG1.893884@twister.nyc.rr.com

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
  ====================================

      reply	other threads:[~2003-01-31 13:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-28  6:47 desktop height? Bruce Ingalls
2003-01-28 14:27 ` Phillip Lord
2003-01-28 18:32   ` Bruce Ingalls
2003-01-28 18:48     ` Phillip Lord
2003-01-28 21:09       ` Bruce Ingalls
2003-01-31  8:07     ` Lee Sau Dan
2003-01-30 14:40 ` Chris McMahan
2003-01-31  0:11   ` Bruce Ingalls
2003-01-31 13:48     ` Chris McMahan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u1y2t4egr.fsf@one.net \
    --to=cmcmahan+n@one.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.