unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Andrus <darthandrus@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 9324@debbugs.gnu.org, antoine.levitt@gmail.com
Subject: bug#9324: 24.0.50; Movement past end of screen causes weird jump
Date: Sat, 20 Aug 2011 09:33:31 +0200	[thread overview]
Message-ID: <ABF1A4F2-E2A7-4783-B282-B0AA00B04C67@gmail.com> (raw)
In-Reply-To: <83r54hqkz8.fsf@gnu.org>

On Aug 19, 2011, at 9:06 PM, Eli Zaretskii wrote:
>> From: Ivan Andrus <darthandrus@gmail.com>
>> Date: Fri, 19 Aug 2011 20:38:09 +0200
>> Cc: antoine.levitt@gmail.com,
>> 9324@debbugs.gnu.org
>> 
>> Okay, I think I can reliably reproduce it now.  Sorry it took so long to get it right.  Anyway it seems to require both highlight-parentheses-mode and hl-sexp-mode as well as a custom mode-line face.  I invoke it with:
>> 
>> emacs -Q -l ~/.emacs.d/elpa/highlight-parentheses-1.0.1/highlight-parentheses.el -l ~/.emacs.d/local/hl-sexp.el ~/vcs/emacs/bug-example-3.el
> 
> Sorry to disappoint you, but I cannot reproduce this even with this
> precise recipe.  I downloaded the latest hl-sexp.el and
> highlight-parentheses.el, and used them exactly as shown, albeit the
> leading directories were different, and I still cannot see the
> problem.  Emacs behaves as expected.

Aaargh!  After running the progn, do you see all of line starting with 208, or just the continuation of it.  How about increasing the :line-width?  If I increase it to 8 I stop seeing the buggy behavior, so maybe at 4 you can see it?  

I was able to step through redisplay_window and watch where point changes from 
BUF PT: 2418 of 1..2419 GAP: 2419 SZ=2000
to
BUF PT: 1224 of 1..2419 GAP: 2419 SZ=2000

Here's what I did.  I have done it a few times now, so if you need me to look at other data I can.

  cd ~/vcs/emacs/local/src/
  gdb $EMACS
  break xdisp.c:14951
  break xdisp.c:14939
  break xdisp.c:14946
  run -Q -l ~/.emacs.d/elpa/highlight-parentheses-1.0.1/highlight-parentheses.el -l ~/.emacs.d/local/hl-sexp.el ~/vcs/emacs/bug-example-3.el

interact with emacs evaluating the font and progn blocks continuing as necessary.  Evaluate the forward-sexp and then start stepping through with emacs:
  
Breakpoint 3, redisplay_window (window=4307577381, just_this_one_p=0) at xdisp.c:14951
14951	      if (new_vpos >= 0)
(gdb) p new_vpos
$1 = 336
(gdb) list
14946		  new_vpos = window_box_height (w);
14947		}
14948	
14949	      /* If we need to move point for either of the above reasons,
14950		 now actually do it.  */
14951	      if (new_vpos >= 0)
14952		{
14953		  struct glyph_row *row;
14954	
14955		  row = MATRIX_FIRST_TEXT_ROW (w->desired_matrix);
(gdb) 
14956		  while (MATRIX_ROW_BOTTOM_Y (row) < new_vpos)
14957		    ++row;
14958	
14959		  TEMP_SET_PT_BOTH (MATRIX_ROW_START_CHARPOS (row),
14960				    MATRIX_ROW_START_BYTEPOS (row));
14961	
14962		  if (w != XWINDOW (selected_window))
14963		    set_marker_both (w->pointm, Qnil, PT, PT_BYTE);
14964		  else if (current_buffer == old)
14965		    SET_TEXT_POS (lpoint, PT, PT_BYTE);
(gdb) n
14955		  row = MATRIX_FIRST_TEXT_ROW (w->desired_matrix);
(gdb) n
14956		  while (MATRIX_ROW_BOTTOM_Y (row) < new_vpos)
(gdb) prow
y=0 x=0 pwid=112 a+d=12+3=15 phys=12+3=15 vis=15  L=0 T=16 R=0
start=90 end=106 ENA DISP
(gdb) n 40
14956		  while (MATRIX_ROW_BOTTOM_Y (row) < new_vpos)
(gdb) n
14957		    ++row;
(gdb) 
14956		  while (MATRIX_ROW_BOTTOM_Y (row) < new_vpos)
(gdb) 
14957		    ++row;
(gdb) 
14956		  while (MATRIX_ROW_BOTTOM_Y (row) < new_vpos)
(gdb) 
14959		  TEMP_SET_PT_BOTH (MATRIX_ROW_START_CHARPOS (row),
(gdb) prow
y=330 x=0 pwid=105 a+d=12+3=15 phys=12+3=15 vis=15  L=0 T=15 R=0
start=1224 end=1239 ENA DISP
(gdb) ppt
BUF PT: 2418 of 1..2419 GAP: 2419 SZ=2000
(gdb) n
14962		  if (w != XWINDOW (selected_window))
(gdb) prow
y=330 x=0 pwid=105 a+d=12+3=15 phys=12+3=15 vis=15  L=0 T=15 R=0
start=1224 end=1239 ENA DISP
(gdb) ppt
BUF PT: 1224 of 1..2419 GAP: 2419 SZ=2000


To be honest I'm not sure how new_vpos was set since the other breakpoints are not triggered after having evaluated forward-sexp.  The breakpoint on "new_vpos = window_box_height (w) / 2;" is hit, but after evaluating the progn, so I'm confused.  Of course I have no idea if I'm even asking the right questions, but maybe you can tell me what else I need to look at.

-Ivan




  reply	other threads:[~2011-08-20  7:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18 20:48 bug#9324: 24.0.50; Movement past end of screen causes weird jump Ivan Andrus
2011-08-18 21:11 ` Antoine Levitt
2011-08-19  8:25   ` Eli Zaretskii
2011-08-19  9:54     ` Ivan Andrus
2011-08-19 10:02     ` Ivan Andrus
2011-08-19 10:41       ` Eli Zaretskii
2011-08-19 16:19         ` Ivan Andrus
2011-08-19 16:51           ` Antoine Levitt
2011-08-19 17:15           ` Eli Zaretskii
2011-08-19 18:38             ` Ivan Andrus
2011-08-19 19:06               ` Eli Zaretskii
2011-08-20  7:33                 ` Ivan Andrus [this message]
2011-08-20 11:29                   ` Eli Zaretskii
     [not found]                     ` <0760243C-31D8-492E-99BE-86D87D7601F6@gmail.com>
2011-08-20 14:37                       ` Eli Zaretskii
2011-08-25 20:11                     ` Ivan Andrus
2011-08-25 20:59                       ` Antoine Levitt
2011-08-26 10:32                         ` Eli Zaretskii
2011-08-26 10:20                       ` 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=ABF1A4F2-E2A7-4783-B282-B0AA00B04C67@gmail.com \
    --to=darthandrus@gmail.com \
    --cc=9324@debbugs.gnu.org \
    --cc=antoine.levitt@gmail.com \
    --cc=eliz@gnu.org \
    /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).