From: "Perry E. Metzger" <perry@piermont.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Eli Zaretskii <eliz@gnu.org>, malsburg@posteo.de, emacs-devel@gnu.org
Subject: Re: [PATCH] Implement functions for measuring fonts and max chars per line
Date: Sun, 18 Jan 2015 21:56:43 -0500 [thread overview]
Message-ID: <20150118215643.6939487c@jabberwock.cb.piermont.com> (raw)
In-Reply-To: <c6391595-4b4e-40ae-96b8-7fac8b8bbb0e@default>
On Sun, 18 Jan 2015 16:38:01 -0800 (PST) Drew Adams
<drew.adams@oracle.com> wrote:
> > What I want is to know (by calculation) what the maximum height,
> > in lines, happens to be so I can shove that in for 'height in
> > default-frame-alist. (There are other uses for such information of
> > course, see above.)
>
> The max height in pixels is `x-display-pixel-height'.
>
> Divide that by the value returned by `frame-char-height' for your
> frame, or by whatever character height you intend to use, if
> you know it, to find the number of lines possible for the display.
>
> But that does not count the space needed for these things:
>
> 1. menu-bar - you can approximate this by
> `(frame-parameter nil 'menu-bar-lines)'.
>
> 2. tool-bar - similar: `tool-bar-lines'.
>
> 3. height of the window-mgr title bar and bottom border.
>
> 4. any other window-mgr stuff that is outside Emacs's
> visibility & control.
>
> So proceeding this way you need to do a little estimating,
> especially wrt window-mgr stuff.
I've played these games before, and it is a reasonable stop-gap for
what I'm trying to do, at least much of the time.
What would be nice would be the addition of a function that told one
the true maximum number of lines possible for a frame on the given
display, *or* if there was a non-integer value you could specify for
the "height" component of the frame-alist that simply meant "as much
as possible". (Both might actually be nice things to have.)
--
Perry E. Metzger perry@piermont.com
next prev parent reply other threads:[~2015-01-19 2:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 14:39 [PATCH] Implement functions for measuring fonts and max chars per line Titus von der Malsburg
2014-12-22 22:25 ` Titus von der Malsburg
2014-12-23 12:52 ` Titus von der Malsburg
2015-01-17 18:13 ` Titus von der Malsburg
2015-01-17 18:43 ` Eli Zaretskii
2015-01-17 20:38 ` Perry E. Metzger
2015-01-17 20:41 ` Eli Zaretskii
2015-01-17 22:21 ` Perry E. Metzger
2015-01-17 22:24 ` David Kastrup
2015-01-18 0:08 ` Perry E. Metzger
2015-01-18 0:11 ` Perry E. Metzger
2015-01-18 1:01 ` Michael Heerdegen
2015-01-18 3:42 ` Eli Zaretskii
2015-01-18 4:08 ` Perry E. Metzger
2015-01-18 15:37 ` Eli Zaretskii
2015-01-18 22:26 ` Perry E. Metzger
2015-01-19 0:38 ` Drew Adams
2015-01-19 2:56 ` Perry E. Metzger [this message]
2015-01-19 3:41 ` Eli Zaretskii
2015-01-19 13:31 ` Perry E. Metzger
2015-01-19 16:21 ` Eli Zaretskii
2015-01-19 21:49 ` Perry E. Metzger
2015-01-19 2:01 ` Michael Heerdegen
2015-01-19 3:37 ` Eli Zaretskii
2015-03-21 10:33 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150118215643.6939487c@jabberwock.cb.piermont.com \
--to=perry@piermont.com \
--cc=drew.adams@oracle.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=malsburg@posteo.de \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).