From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: lompik@voila.fr, 18545@debbugs.gnu.org
Subject: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window
Date: Sat, 27 Sep 2014 15:36:49 +0200 [thread overview]
Message-ID: <5426BD71.4000705@gmx.at> (raw)
In-Reply-To: <8361g9tijj.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 3139 bytes --]
> AFAIU, this means the window is not being redrawn on each
> forward-line; not even its mode line is updated. You should be able
> to confirm this if you turn on trace-redisplay (assuming you've built
> with GLYPH_DEBUG, a.k.a. "--enable-checking=glyphs") -- you will not
> see the window announced in the trace. (Btw, turning off
> blink-cursor-mode removes a lot of clutter from the redisplay trace,
> so I suggest to do that in these experiments.)
I attach an output, can't make much head or tail of it. The *sidebar*
window is the one with the problem, the .emacs window the one on the
right of it.
> If you add to the function that calls forward-line a message showing
> point, do you see the value of point move on each forward-line even
> though the window is not redrawn?
Simply copied from the *Messages* buffer the positions appear as:
17
22
27
32
37
42
47
52
57
62
67
72
77
82
87
92
97
102
107
112
117
122 [28 times]
127
132 [21 times]
137 [23 times]
142 [23 times]
147 [7 times]
Auto-saving...
147 [3 times]
152
157 [22 times]
162 [23 times]
167 [23 times]
172 [9 times]
Each line contains four characters and apparently stuttering begins
at position 122.
>> > if (!cursor_row_fully_visible_p (w, 0, 0))
>> > {
>> > w->cursor.vpos = -1;
>> > clear_glyph_matrix (w->desired_matrix);
>> > goto try_to_scroll;
>> > }
>> >
>> > after the call to set_cursor_from_row on line 16322.
>> >
>> > If this doesn't work, please see why.
>>
>> It fails to do anything because running cursor_row_fully_visible_p
>> returns at
>>
>> if (!MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row))
>> return 1;
>>
>> and this one apparently fails to detect that the row is partially visible
>> because of
>>
>> (gdb) p row->height
>> $5 = 16
>> (gdb) p row->visible_height
>> $6 = 16
>>
>> Any ideas?
>
> What is last_visible_y in that window? To see that, step into
> try_window called on line 16235, wait until it calls start_display,
> and look at it.last_visible_y.
At the xdisp.c line reading:
while (it.current_y < it.last_visible_y)
I have
(gdb) p it.last_visible_y
$7 = 442
and (just to confirm the earlier posted) at the xdisp.c line reading
if (new_vpos >= w->cursor.y)
I have:
(gdb) p new_vpos
$10 = 426
(gdb) p w->cursor.y
$11 = 432
>> BTW is there a way to print the value returned by a macro in gdb?
>
> Yes, just print it:
>
> (gdb) p MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)
Here I get
(gdb) p MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)
No symbol "__FILE__" in current context.
> If this doesn't work, perhaps you didn't build with -g3,
I used CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3'
> or your
> compiler is buggy.
Hmm...
martin
As an aside, in my function calling `forward-line' I found this
;; (unless (pos-visible-in-window-p (point) (selected-window))
;; (recenter (- (window-height) 2)))) ; what for did I use that ?
commented out at least since 2008-06-24. Apparently something here did
behave differently many years ago. BTW, the bug does not disappear when
I comment in those lines.
[-- Attachment #2: trace-redisplay.txt --]
[-- Type: text/plain, Size: 9460 bytes --]
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
trying display optimization 1
017fce48 ( *Minibuf-1*): optimization 1
redisplay_internal 0
01963f50 (*scratch*): same window start
01963f50 (*scratch*): 1
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (50, 500, 16, 426)
expose_window (50, 500, 16, 426)
expose_frame (0, 926, 50, 16)
expose_window (0, 926, 50, 16)
expose_frame (0, 926, 1664, 16)
expose_window (0, 926, 72, 16)
expose_window (72, 926, 1592, 16)
expose_frame (72, 926, 1592, 16)
expose_window (72, 926, 0, 16)
expose_window (72, 926, 1592, 16)
redisplay_preserve_echo_area (8)
redisplay_internal 0
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
redisplay_preserve_echo_area (9)
redisplay_internal 0
04fa38f0 ( *sidebar*): cursor movement
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0
04fa38f0 ( *sidebar*): same window start
04fa38f0 ( *sidebar*): 1
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (0, 564, 50, 16)
expose_window (0, 564, 50, 16)
expose_frame (72, 868, 1592, 48)
expose_window (72, 868, 0, 48)
expose_window (72, 868, 1592, 48)
redisplay_preserve_echo_area (8)
redisplay_internal 0
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
redisplay_preserve_echo_area (9)
redisplay_internal 0
04fa38f0 ( *sidebar*): cursor movement
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 836, 1592, 80)
expose_window (72, 836, 0, 80)
expose_window (72, 836, 1592, 80)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 836, 1592, 80)
expose_window (72, 836, 0, 80)
expose_window (72, 836, 1592, 80)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 644, 1592, 272)
expose_window (72, 644, 0, 272)
expose_window (72, 644, 1592, 272)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 564, 1592, 352)
expose_window (72, 564, 0, 352)
expose_window (72, 564, 1592, 352)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 580, 1592, 336)
expose_window (72, 580, 0, 336)
expose_window (72, 580, 1592, 336)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 580, 1592, 320)
expose_window (72, 580, 0, 320)
expose_window (72, 580, 1592, 320)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 612, 1592, 160)
expose_window (72, 612, 0, 160)
expose_window (72, 612, 1592, 160)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame garbaged
redisplay_preserve_echo_area (11)
redisplay_internal 0
01963f50 (*scratch*): same window start
01963f50 (*scratch*): 1
04fa38f0 ( *sidebar*): same window start
04fa38f0 ( *sidebar*): 1
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 500, 1592, 416)
expose_window (72, 500, 0, 416)
expose_window (72, 500, 1592, 416)
expose_frame (72, 804, 1592, 16)
expose_window (72, 804, 0, 16)
expose_window (72, 804, 1592, 16)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 740, 1592, 176)
expose_window (72, 740, 0, 176)
expose_window (72, 740, 1592, 176)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 756, 1592, 48)
expose_window (72, 756, 0, 48)
expose_window (72, 756, 1592, 48)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 772, 1592, 48)
expose_window (72, 772, 0, 48)
expose_window (72, 772, 1592, 48)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 788, 1592, 112)
expose_window (72, 788, 0, 112)
expose_window (72, 788, 1592, 112)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 804, 1592, 48)
expose_window (72, 804, 0, 48)
expose_window (72, 804, 1592, 48)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 820, 1592, 48)
expose_window (72, 820, 0, 48)
expose_window (72, 820, 1592, 48)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): forced window start
expose_frame (72, 804, 1592, 48)
expose_window (72, 804, 0, 48)
expose_window (72, 804, 1592, 48)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
expose_frame (72, 836, 1592, 64)
expose_window (72, 836, 0, 64)
expose_window (72, 836, 1592, 64)
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
redisplay_internal 0
04fa38f0 ( *sidebar*): forced window start
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
04f98ad0 (.emacs): try_scrolling
redisplay_preserve_echo_area (8)
redisplay_internal 0
04f98ad0 (.emacs): same window start
04f98ad0 (.emacs): 1
redisplay_preserve_echo_area (9)
redisplay_internal 0
04fa38f0 ( *sidebar*): cursor movement
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0
04fa38f0 ( *sidebar*): same window start
04fa38f0 ( *sidebar*): 1
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0
redisplay_preserve_echo_area (8)
redisplay_internal 0
next prev parent reply other threads:[~2014-09-27 13:36 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 13:34 bug#18545: 24.4.50: Bug - forward-line inside with-selected-window lompik
2014-09-24 15:14 ` Stefan Monnier
2014-09-24 15:50 ` lompik
2014-09-25 13:55 ` Eli Zaretskii
2014-09-25 13:59 ` Eli Zaretskii
2014-09-25 15:20 ` Eli Zaretskii
2014-09-25 17:41 ` lompik
2014-09-25 17:51 ` Eli Zaretskii
2014-09-25 18:14 ` lompik
2014-09-25 18:31 ` Eli Zaretskii
2014-09-25 19:06 ` lompik
2014-09-25 19:18 ` Eli Zaretskii
2014-09-25 20:05 ` lompik
2014-09-26 7:31 ` Eli Zaretskii
2014-09-26 12:48 ` Stefan Monnier
2014-09-26 13:29 ` Eli Zaretskii
2014-09-26 14:13 ` Stefan Monnier
2014-09-26 15:20 ` Eli Zaretskii
2014-09-26 19:32 ` Stefan Monnier
2014-09-27 7:05 ` Eli Zaretskii
2014-09-27 14:45 ` lompik
2014-09-27 15:45 ` Eli Zaretskii
2014-09-27 7:35 ` martin rudalics
2014-09-27 8:53 ` Eli Zaretskii
2014-09-27 10:01 ` martin rudalics
2014-09-27 11:22 ` Eli Zaretskii
2014-09-27 13:36 ` martin rudalics [this message]
2014-09-27 16:06 ` Eli Zaretskii
2014-09-27 17:25 ` Stefan Monnier
2014-09-27 17:35 ` Eli Zaretskii
2014-09-27 17:53 ` Stefan Monnier
2014-09-27 19:03 ` martin rudalics
2014-09-27 19:38 ` Eli Zaretskii
2014-09-27 19:55 ` Eli Zaretskii
2014-09-28 9:34 ` martin rudalics
2014-09-28 16:29 ` Eli Zaretskii
2014-09-28 17:51 ` Eli Zaretskii
2014-09-28 19:03 ` martin rudalics
2014-09-28 19:25 ` Eli Zaretskii
2014-09-28 20:25 ` martin rudalics
2014-09-29 0:31 ` lompik
2014-09-29 6:16 ` Eli Zaretskii
2014-09-29 13:47 ` Eli Zaretskii
2014-09-29 14:21 ` lompik
2014-09-29 16:49 ` Eli Zaretskii
2014-09-29 22:56 ` lompik
2014-09-30 2:38 ` Eli Zaretskii
2014-09-27 19:01 ` martin rudalics
2014-09-27 19:27 ` Eli Zaretskii
2014-09-27 19:01 ` martin rudalics
2014-09-27 19:25 ` Eli Zaretskii
2014-09-28 9:33 ` martin rudalics
2014-09-28 16:33 ` Eli Zaretskii
2014-09-28 19:04 ` martin rudalics
2014-09-28 19:24 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5426BD71.4000705@gmx.at \
--to=rudalics@gmx.at \
--cc=18545@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=lompik@voila.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.