[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18739: 24.3; Request for a hook to be provided when scrolling will m
From: |
Eli Zaretskii |
Subject: |
bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor |
Date: |
Thu, 16 Oct 2014 18:54:00 +0300 |
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: josh+gnu@nispio.net, 18739@debbugs.gnu.org
> Date: Thu, 16 Oct 2014 11:13:59 -0400
>
> >> Does that include the case where window-start is changed
> >> so as to follow point or is it only the cases where window-start was
> >> changed explicitly by a scrolling command?
> > Both.
>
> So, could we say that this hook is supposed to be run if and only if
> the window-start marker is changed?
I don't think so, because set-window-buffer and split-window-internal
run the hook unconditionally, i.e. they don't check whether the
window-start changed.
> E.g. it is not called if the only change is that text has been
> inserted before window-start (hence the numeric value of
> window-start would be changed, but the marker still points to the
> same place).
As long as the old window-start is valid and point is in view, I don't
think the hook will be called, no.
But note that inserting text before window-start could cause
scrolling, if window-start was originally in a continued line, or if
text was added at the beginning of the line that was the window-start.
> And as for "when" it is run: any time after the marker's modification
> and before updating the glyph matrices?
Yes.
> Is it run before or after computing the new mode-line
Before.
> >> - how could a window-scroll-function distinguish the 3 cases:
> >> "set-window-buffer", "used a scroll command", "moved point out of
> >> viewport".
> > I have no idea (but this is not exactly a question about the doc
> > string).
>
> So, w.r.t the original question in the bug-report, we still don't have
> an answer.
I actually don't really understand what was the question anymore, see
the other thread of discussion.
> Do you happen to know where is the C code that changes point
> (in response to scrolling) in the redisplay?
The part that begins under the force_start label in redisplay_window,
and is conditioned by the window's force_start flag.
> > Did the above clarifications help you?
>
> Yes, thanks. I still don't really understand how/why follow-mode and
> em-smart.el work, tho.
Who does? ;-)
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, (continued)
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Stefan Monnier, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Josh, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Eli Zaretskii, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Josh, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Eli Zaretskii, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Josh, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Eli Zaretskii, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Eli Zaretskii, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Stefan Monnier, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Josh, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor,
Eli Zaretskii <=
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Stefan Monnier, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Eli Zaretskii, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Stefan Monnier, 2014/10/16
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Eli Zaretskii, 2014/10/17
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Stefan Monnier, 2014/10/17
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Eli Zaretskii, 2014/10/17
- bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor, Stefan Monnier, 2014/10/17