From: Stefan Monnier <monnier@iro.umontreal.ca>
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: Fri, 26 Sep 2014 15:32:11 -0400 [thread overview]
Message-ID: <jwvtx3u9og3.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <83h9zutnlb.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Sep 2014 18:20:48 +0300")
>> >> Why does
>> >> (with-selected-window (get-buffer-window "*Completions*")
>> >> (recenter 5))
>> >> require an explicit call to wset_redisplay from recenter, whereas
>> >> (with-selected-window (get-buffer-window "*Completions*")
>> >> (forward-line 1))
>> >> doesn't need an explicit call to wset_redisplay (or bset_redisplay) from
>> >> forward-line?
>> > I think that's because forward-line moves point, while recenter
>> > doesn't.
>> But I don't see why moving point would help: calling wset_redisplay
>> should only change the fact that this window is considered for
>> redisplay
> There are redisplay optimizations that don't depend on whether we
> consider a window for redisplay; see around line 13700 in xdisp.c from
> emacs-24. You will see a little ways below that place that we test
> point against its recorded value in w->last_point, for example.
Right, but these are only for the current-buffer/selected-window,
whereas the example modifies another window (and another buffer), so
they first need to be considered (via [bwf]set_redisplay) before
anything else will look at them.
>> so if it's needed for the recenter case, that means that
>> without it, the window would not be considered at all
> 'with-selected-window makes' the offending window selected, and the
> selected window is always considered for redisplay, right?
No. If it were the wset_redisplay you added would have been a no-op.
Oh, wait I see it now. We do test if point changed, in
redisplay_window:15965:
if (!just_this_one_p
&& REDISPLAY_SOME_P ()
&& !w->redisplay
&& !f->redisplay
&& !buffer->text->redisplay
&& BUF_PT (buffer) == w->last_point)
return;
So indeed changing point ends up doing the moral equivalent of bset_redisplay.
Stefan
next prev parent reply other threads:[~2014-09-26 19:32 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 [this message]
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
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=jwvtx3u9og3.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--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.