unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Anders Lindgren <andlind@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16129@debbugs.gnu.org
Subject: bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before last window
Date: Mon, 6 Jan 2014 09:20:03 +0100	[thread overview]
Message-ID: <CABr8ebY6vP2o+SFqL-HKHLMNXsGtpJo5uf53nAvoyMB9D+3duA@mail.gmail.com> (raw)
In-Reply-To: <83bnzpu622.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2204 bytes --]

Hi!

I think the incorrect state occurs when the new early exit occurs from
redsplay_window. When I added the condition "&& PT == w->last_point", both
the recentering problem and speed issues were solved. However, I don't know
if this is the correct way to handle this, or if it breaks anything else.

    -- Anders


On Mon, Jan 6, 2014 at 4:45 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Mon, 6 Jan 2014 00:13:38 +0100
> > From: Anders Lindgren <andlind@gmail.com>
> > Cc: 16129@debbugs.gnu.org
> >
> > When "redisplay_window" is called, it goes into the case where
> > "try_cursor_movement" is called.
> >
> > Inside this routine, the row is picked up. The row (when using the
> TUTORIAL
> > example) has start and end at 46229. The point and last_point, however,
> are
> > 46228, so it assumes that the point haven't moved since the last
> redisplay.
> >
> > Clearly, "last_point" and "row" are not consistent with each other, which
> > is assumed by try_cursor_movement (if I read it correctly).
> >
> > The routine first declare this to be a "success" (in the neither forward
> > nor backward case). Later in the function it comes to the following
> > statement:
> >
> >   if (PT < MATRIX_ROW_START_CHARPOS (row)
> >       || PT > MATRIX_ROW_END_CHARPOS (row))
> >
> > This fails, making the function return " CURSOR_MOVEMENT_MUST_SCROLL",
> > which is turn cause "redisplay_window" to recenter the window.
>
> Thanks.  Your description is correct, and I already found that this is
> what happens.  (The silence doesn't necessarily mean no one is doing
> anything about the bug report ;-)
>
> I didn't yet have the time to figure out why the last_point field of
> the window is equal to point, while last_cursor_vpos points to the
> screen line that does not contain point; my current suspicion is that
> the post-command-hook somehow causes that.  But given that this is
> what happens, you will always see a recenter, because it means Emacs
> lost track of where point is in the window.  When Emacs is confused
> about this, it always recenters as the last resort.
>
> This still doesn't say why redisplay is so slow in this case, which
> was the initial bug reported here.  Stay tuned.
>

[-- Attachment #2: Type: text/html, Size: 2951 bytes --]

  reply	other threads:[~2014-01-06  8:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 14:34 bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before last window Anders Lindgren
2013-12-13 15:32 ` Eli Zaretskii
2013-12-13 15:36   ` Eli Zaretskii
2013-12-13 16:38 ` Stefan Monnier
2013-12-13 17:55   ` Anders Lindgren
2014-01-02 13:55     ` Anders Lindgren
2014-01-02 18:39       ` Anders Lindgren
2014-01-05 23:13         ` Anders Lindgren
2014-01-06  3:45           ` Eli Zaretskii
2014-01-06  8:20             ` Anders Lindgren [this message]
2014-01-06 16:33               ` Eli Zaretskii
2014-01-07  8:13                 ` Anders Lindgren
2014-01-10  9:31                   ` Eli Zaretskii
2014-01-10 18:52                     ` Anders Lindgren
2014-01-10 19:00                       ` Eli Zaretskii
2014-01-13 11:41                         ` Anders Lindgren
2014-01-13 14:47                           ` Stefan Monnier
2014-01-13 16:16                           ` Eli Zaretskii
2014-01-14 12:34                             ` Anders Lindgren
2014-01-14 16:25                               ` Eli Zaretskii
2014-01-16 12:24                                 ` Anders Lindgren
2014-01-16 14:42                                   ` Stefan Monnier

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=CABr8ebY6vP2o+SFqL-HKHLMNXsGtpJo5uf53nAvoyMB9D+3duA@mail.gmail.com \
    --to=andlind@gmail.com \
    --cc=16129@debbugs.gnu.org \
    --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).