unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Klaus Berndl <klaus.berndl@sdm.de>
Subject: *real* number of lines a window can display currently
Date: 07 Oct 2003 18:07:26 +0200	[thread overview]
Message-ID: <usmm52fr5.fsf@sdm.de> (raw)


What i search for is a function which gives me the *real* number of lines a
certain window displays currently....neither `window-height' nor
`window-text-height' nor `window-body-height' are usable for this because
none of them consider the current font-height of text in the buffer or if
images are displayed (so some lines of the buffer in the window are higher
than others etc..).

What would help is (count-screen-lines (window-start) (window-end)) but
unfortunately not in all situations: This works only correct if the end of
the buffer is not before the window-end, means there are no "empty" lines left
in the window. If there are "empty" lines then these ones are not count :-(

The `window-displayed-lines' function of XEmacs is better:

`window-displayed-height' is a built-in function
(window-displayed-height &optional WINDOW)

Documentation:
Return the number of lines currently displayed in WINDOW.
This counts the actual number of lines displayed in WINDOW
(as opposed to `window-height').  The modeline and horizontal
scrollbar do not count as lines.  If there is some blank space
between the end of the buffer and the end of the window, this
function pretends that there are lines of text in the default
font there.

This is what i search for GNU Emacs 21.X... Does something like this exist or
is there another way to reach my goal?

Thanks a lot,
Klaus


-- 
Klaus Berndl			mailto: klaus.berndl@sdm.de
sd&m AG				http://www.sdm.de
software design & management	
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220

             reply	other threads:[~2003-10-07 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-07 16:07 Klaus Berndl [this message]
2003-10-07 16:19 ` *real* number of lines a window can display currently Stefan Monnier
2003-10-14  1:03   ` Alan Wehmann
2003-10-14  6:22   ` Klaus Berndl

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=usmm52fr5.fsf@sdm.de \
    --to=klaus.berndl@sdm.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.
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).