Subject: bug#16691: 24.3.50; emacs_backtrace.txt

From: martin rudalics <[email-masked]>
Date: Mon, 10 Feb 2014 09:14:33 +0100

>> - int x, y: Where and how are these set for a particular row (including
 >>    header- and mode-line) and when and how are these eventually consumed?
 >>    This is the greatest mystery for me so far.
 >
 > They are assigned in display_line and display_string.  Examples from
 > display_line:
 >
 >   row->y = it->current_y;

Does the value set here account for extra_line_spacing or is the latter
(as I presume) handled separately?

 >   [...]
 >   if (it->current_x - it->pixel_width < it->first_visible_x)
 >     row->x = x - it->first_visible_x;
 >
 > Mode line and header line are generated from strings, so look in
 > display_mode_line and display_string.

I tried that but never found anything useful there.  I suppose the
header line has current_y always set to 0.  But the mode line?

My confusion comes partly from window_text_bottom_y which returns a
position above the mode line, so apparently the mode line is handled
separately.  But the header line is included in the height returned.
And window_box_height does not include the header line in the return
value.

I understand that most of these are handled by some kind of internal
magic but I can't locate that magic yet.

 > Not sure what you mean by "consumed".  Consumed by whom and for what
 > purposes?

I suppose when exposing the window (another part of Emacs display which
I don't understand yet).  What would current_y else be used for?

 >> - int visible_height: "Partially visible rows may be found at the top
 >>    and bottom of a window."  Is it true that we can draw partially
 >>    visible rows at the top of the window?
 >
 > I think this is only possible when a single row is too large to fit a
 > window.

I see.  So this is not about having the top of a line only partially
visible.

martin