unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
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 12:01:47 +0200	[thread overview]
Message-ID: <54268B0B.1020203@gmx.at> (raw)
In-Reply-To: <838ul5tpfu.fsf@gnu.org>

 > Do you see the line number in the mode line of that window increasing,
 > after the cursor gets stuck, each time forward-line is run in that
 > window?

It gets updated normally until and including when the cursor is at the
partially visible line.  After that it gets updated with every
stuttering step, that is, when after three seconds the display actually
scrolls.  So FWIW the line number is congruent wrt to what I see on the
screen.

 >> (1) The bug is not reproducible with Emacs 24-4, only with current
 >>       trunk.
 >
 > That's strange, since the code to which you pointed is present in both
 > branches.

The remaining aspects like the need for a maximized frame and the fact
that the changes must be in my .emacs are much more strange.

 >> The bug might be related to your changes from 2014-07-09.
 >
 > I guess you meant 2014-07-04?  There are no changes in all of xdisp.c
 > from 2014-07-09 or from a day before or after that (to account for
 > possible local time differences).  A bzr revno would be useful.

I took the dates from trunk's ChangeLog.  On the release they appear as
of 2014-07-04.  More precisely I meant this change:

	* xdisp.c (redisplay_window): If redisplay of a window ends up
	with point in a partially visible line at end of the window, make
	sure the amended position of point actually has smaller Y
	coordinate; if not, give up and scroll the display.  (Bug#17905)

 >> (gdb) p new_vpos
 >> $1 = 426
 >> (gdb) p w->cursor.y
 >> $2 = 432
 >> (gdb)
 >>
 >> In this particular case the display should be scrolled since otherwise
 >> point ends up on the partially visible line.  But the test
 >>
 >> 	  if (new_vpos >= w->cursor.y)
 >>
 >> fails to trigger that.
 >
 > I cannot test a fix unless I have a way to reproduce the problem.

I can trigger the problem instantaneously here, so I can do anything you
propose.  OTOH sharing my recipe could be a very tedious endeavour.

 > Since you can reproduce it, could you propose a solution?  One simple
 > solution would be to add this:
 >
 >        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?  BTW is there a way to print the value returned by a macro in
gdb?

martin





  reply	other threads:[~2014-09-27 10:01 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 [this message]
2014-09-27 11:22               ` Eli Zaretskii
2014-09-27 13:36                 ` martin rudalics
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54268B0B.1020203@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).