[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: window-height function lies!
From: |
Rodolfo Medina |
Subject: |
Re: window-height function lies! |
Date: |
Wed, 01 Oct 2008 20:13:29 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.50 (gnu/linux) |
Rodolfo Medina <rodolfo.medina@gmail.com> wrote:
>> But, the remarkable result is that, the value returned by
>> window-height turns to be *false* when the buffer contains a line
>> longer that the screen width (a line that continues on the following
>> line).
Nikolaj Schumacher <me@nschum.de> writes:
> I was a little confused by this sentence at first. Because no matter
> how long I made the lines, `window-height' remained the same. But then
> I understood, you think it should get smaller, because fewer lines are
> displayed, right?
Yes, that's right.
> However `window-height' is related to the window and
> independent of the buffer. It relates to `move-to-window-line', not
> `goto-line'.
>
> You might want to use:
>
> (1+ (count-lines (window-start) (window-end)))
All right that works for `too long' lines. But still window-height fails in
info buffers and TeX mode buffers, that contain chapter and node titles with
bigger characters. Any way to solve that?
Thanks
Rodolfo