GNU bug report logs - #3602
23.0.94; window-line-height problems

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Thu, 18 Jun 2009 05:45:03 UTC

Severity: minor

Tags: confirmed, notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3602 in the body.
You can then email your comments to 3602 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3602; Package emacs. (Thu, 18 Jun 2009 05:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 18 Jun 2009 05:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <emacs-pretest-bug <at> gnu.org>
Subject: 23.0.94; window-line-height problems
Date: Wed, 17 Jun 2009 22:39:55 -0700
The behavior of this function seems broken, at least for LINE =
mode-line or header-line. And the doc is not good.
 
Doc string of `window-line-height' says this:
 
"Return height of current line if LINE is omitted or nil.  Return
height of header or mode line if LINE is `header-line' and
`mode-line'."
 
That seems to say that if you have a header line, then you can get its
height in pixels this way (window-line-height 'header-line), and
similarly for mode-line. But that doesn't seem to work.
 
emacs -Q
(setq Info-use-header-line t)
C-h i
M-: (window-line-height 'header-line) returns nil
M-: (window-line-height 'mode-line) returns nil
 
This part of the doc string is incomprehensible to me:
 
"Return nil if window display is not up-to-date." What does that mean?
And then it says "In that case, use `pos-visible-in-window-p' to
obtain the information." How to do that? What args to use with
`pos-visible-in-window-p', to find out the `window-line-height' for
the header-line, for instance? This paragraph is quite unclear to me.
 
Also, the function is called *-height, and the first part of the doc
string says that it returns the "height in pixels". But later in the
doc string we learn that the value (returned, presumably) is a list
(HEIGHT VPOS YPOS OFFBOT). That's contradictory. If the height in
pixels is returned, that is presumably an integer, not a list.
 
The Elisp manual repeats all of the confusion and other defects of the
doc string. In fact, it is almost verbatim the same text.
 

In GNU Emacs 23.0.94.1 (i386-mingw-nt5.1.2600)
 of 2009-05-24 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3602; Package emacs. (Mon, 10 Feb 2014 03:36:02 GMT) Full text and rfc822 format available.

Message #8 received at 3602 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 3602 <at> debbugs.gnu.org
Subject: Re: bug#3602: 23.0.94; window-line-height problems
Date: Sun, 09 Feb 2014 19:33:37 -0800
"Drew Adams" <drew.adams <at> oracle.com> writes:

> The behavior of this function seems broken, at least for LINE =
> mode-line or header-line. And the doc is not good.
>
> Doc string of `window-line-height' says this:
>
> "Return height of current line if LINE is omitted or nil.  Return
> height of header or mode line if LINE is `header-line' and
> `mode-line'."
>
> That seems to say that if you have a header line, then you can get its
> height in pixels this way (window-line-height 'header-line), and
> similarly for mode-line. But that doesn't seem to work.

(window-line-height 'mode-line)
=> nil

So I can confirm this bug.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 10 Feb 2014 03:36:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3602; Package emacs. (Mon, 10 Feb 2014 08:16:01 GMT) Full text and rfc822 format available.

Message #13 received at 3602 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 3602 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#3602: 23.0.94; window-line-height problems
Date: Mon, 10 Feb 2014 09:14:43 +0100
>> That seems to say that if you have a header line, then you can get its
>> height in pixels this way (window-line-height 'header-line), and
>> similarly for mode-line. But that doesn't seem to work.
>
> (window-line-height 'mode-line)
> => nil
>
> So I can confirm this bug.

The doc-string of `window-line-height' says ...

     Return nil if window display is not up-to-date.  In that case, use
    `pos-visible-in-window-p' to obtain the information.

... and the Elisp manual says ...

     If the display is not up to date, `window-line-height' returns
     `nil'.  In that case, `pos-visible-in-window-p' may be used to
     obtain related information.

... so I wonder how you can "confirm this bug" ;-)

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3602; Package emacs. (Mon, 10 Feb 2014 08:21:02 GMT) Full text and rfc822 format available.

Message #16 received at 3602 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 3602 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#3602: 23.0.94; window-line-height problems
Date: Mon, 10 Feb 2014 00:18:47 -0800
martin rudalics <rudalics <at> gmx.at> writes:

>> (window-line-height 'mode-line)
>> => nil
>>
>> So I can confirm this bug.
>
> The doc-string of `window-line-height' says ...
>
>      Return nil if window display is not up-to-date.  In that case, use
>     `pos-visible-in-window-p' to obtain the information.
>
> ... and the Elisp manual says ...
>
>      If the display is not up to date, `window-line-height' returns
>      `nil'.  In that case, `pos-visible-in-window-p' may be used to
>      obtain related information.
>
> ... so I wonder how you can "confirm this bug" ;-)

Is the window display not up to date when I hit `C-x C-e' after the form
up there?

Apparently not:

(progn (sit-for 1) (window-line-height 'mode-line))
=> (22 0 748 0)

So this doesn't seem to be a bug.  Closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug closed, send any further explanations to 3602 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 10 Feb 2014 08:21:04 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 10 Feb 2014 08:21:06 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 10 Mar 2014 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 108 days ago.

Previous Next


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