* bug#3602: 23.0.94; window-line-height problems
@ 2009-06-18 5:39 Drew Adams
2014-02-10 3:33 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2009-06-18 5:39 UTC (permalink / raw)
To: emacs-pretest-bug
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)'
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#3602: 23.0.94; window-line-height problems
2009-06-18 5:39 bug#3602: 23.0.94; window-line-height problems Drew Adams
@ 2014-02-10 3:33 ` Lars Ingebrigtsen
2014-02-10 8:14 ` martin rudalics
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-10 3:33 UTC (permalink / raw)
To: Drew Adams; +Cc: 3602
"Drew Adams" <drew.adams@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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#3602: 23.0.94; window-line-height problems
2014-02-10 3:33 ` Lars Ingebrigtsen
@ 2014-02-10 8:14 ` martin rudalics
2014-02-10 8:18 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: martin rudalics @ 2014-02-10 8:14 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 3602
>> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#3602: 23.0.94; window-line-height problems
2014-02-10 8:14 ` martin rudalics
@ 2014-02-10 8:18 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-10 8:18 UTC (permalink / raw)
To: martin rudalics; +Cc: 3602
martin rudalics <rudalics@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/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-10 8:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-18 5:39 bug#3602: 23.0.94; window-line-height problems Drew Adams
2014-02-10 3:33 ` Lars Ingebrigtsen
2014-02-10 8:14 ` martin rudalics
2014-02-10 8:18 ` Lars Ingebrigtsen
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.