all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* *real* number of lines a window can display currently
@ 2003-10-07 16:07 Klaus Berndl
  2003-10-07 16:19 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Klaus Berndl @ 2003-10-07 16:07 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-14  6:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-07 16:07 *real* number of lines a window can display currently Klaus Berndl
2003-10-07 16:19 ` Stefan Monnier
2003-10-14  1:03   ` Alan Wehmann
2003-10-14  6:22   ` Klaus Berndl

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.