[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *real* number of lines a window can display currently
From: |
Klaus Berndl |
Subject: |
Re: *real* number of lines a window can display currently |
Date: |
14 Oct 2003 08:22:17 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
On Tue, 07 Oct 2003, Stefan Monnier wrote:
> > `window-displayed-height' is a built-in function
> > (window-displayed-height &optional WINDOW)
> [...]
> > This is what i search for GNU Emacs 21.X... Does something like this exist
> > or is there another way to reach my goal?
>
> I don't think such a thing exists or can be coded in elisp (the
> count-screen-lines function fails in several cases other the one you
> mention). But coding it in C shouldn't be too difficult: just look at the
> number of rows in the glyph matrix [he said, pretending he known what he's
> talking about].
Hmm, could i write a feature-request for this? ;-)
>
> I'm curious to know what you need it for,
Could be needed by tools like ECB which uses tree-buffers. ECB currently does
a very smart recentering of a tree-buffer, so always a maximum of useful
informations are visible, e.g. as many subnodes as possible if a node is
expanded. ECB can currently use `count-screen-lines' for this and this works
perfect except for some very seldom (or almost pathological ;-) cases....
But nevertheless such a function would help to write the code even better
working perfectly for all cases.
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