From: Eli Zaretskii <eliz@gnu.org>
To: Anders Lindgren <andlind@gmail.com>
Cc: 16129-done@debbugs.gnu.org
Subject: bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before last window
Date: Mon, 06 Jan 2014 18:33:02 +0200 [thread overview]
Message-ID: <8338l1t6ip.fsf@gnu.org> (raw)
In-Reply-To: <CABr8ebY6vP2o+SFqL-HKHLMNXsGtpJo5uf53nAvoyMB9D+3duA@mail.gmail.com>
> Date: Mon, 6 Jan 2014 09:20:03 +0100
> From: Anders Lindgren <andlind@gmail.com>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 16129@debbugs.gnu.org
>
> 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.
Indeed, this was my conclusion as well. (Except that PT is not quite
right, as the window could be displaying a buffer that is not the
current one at that early point in redisplay_window.)
What this caused was that the window redisplay was mistakenly skipped,
but then we marked that window's display "accurate", which confused
the heck out of the display engine.
So I installed the patch below to fix this regression, and I'm marking
this bug done. Feel free to reopen if there are any leftovers.
Btw, I strongly recommend against messing with window-start (or
anything else that potentially requires redisplay) in a
post-command-hook: doing so disables some important redisplay
optimizations, and can easily trigger subtle misfeatures. I suggest
to look for a better method to do what follow-mode needs to do, even
if that means we'd have to implement a special hook we don't yet have.
Thanks.
=== modified file 'src/xdisp.c'
--- src/xdisp.c 2014-01-01 17:44:48 +0000
+++ src/xdisp.c 2014-01-06 16:21:39 +0000
@@ -15621,7 +15621,8 @@ redisplay_window (Lisp_Object window, bo
&& REDISPLAY_SOME_P ()
&& !w->redisplay
&& !f->redisplay
- && !buffer->text->redisplay)
+ && !buffer->text->redisplay
+ && BUF_PT (buffer) == w->last_point)
return;
/* Make sure that both W's markers are valid. */
next prev parent reply other threads:[~2014-01-06 16:33 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
2014-01-06 16:33 ` Eli Zaretskii [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8338l1t6ip.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=16129-done@debbugs.gnu.org \
--cc=andlind@gmail.com \
/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.