GNU bug report logs - #14636
24.3.50.1; window-line-height doesn't seem to work, unless the point is at the end-of-buffer

Previous Next

Package: emacs;

Reported by: E Sabof <esabof <at> gmail.com>

Date: Sun, 16 Jun 2013 15:26:01 UTC

Severity: normal

Found in version 24.3.50.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: E Sabof <esabof <at> gmail.com>
Cc: 14636 <at> debbugs.gnu.org
Subject: bug#14636: 24.3.50.1; window-line-height doesn't seem to work, unless the point is at the end-of-buffer
Date: Sun, 16 Jun 2013 20:32:55 +0300
> Date: Sun, 16 Jun 2013 18:19:06 +0100
> From: E Sabof <esabof <at> gmail.com>
> Cc: 14636 <at> debbugs.gnu.org
> 
> You might be confusing posn-at-point (which returns the height of the
> character amoung other things), with pos-visible-in-window-p, which returns
> t or nil.

I'm not confusing them.  And pos-visible-in-window-p can return more
than just nil or t, see its doc string.

> In any case, the height of the character can be different from the height
> of the line, so they are not equivalent.

They are not equivalent, in the sense that a single call to
pos-visible-in-window-p will not do what window-line-height does.  You
need to call pos-visible-in-window-p twice, for the line you are
interested in and the one after it, to get the same information.

> So either a) the documentation is incomplete and misleading, or b)
> there is a bug in the implementation (which I think is more likely,
> given the arbitrary circumstances under which this function does and
> doesn't work).

There's no bug.  It looks arbitrary to you because whether the window
display is up-to-date when window-line-height runs is impossible to
predict.  Take a look at the source of window-line-height, and you
will see it.




This bug report was last modified 12 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.