[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The future of Follow Mode - a proposal.
From: |
Eli Zaretskii |
Subject: |
Re: The future of Follow Mode - a proposal. |
Date: |
Sat, 20 Feb 2016 15:05:16 +0200 |
> Date: Sat, 20 Feb 2016 12:44:15 +0000
> Cc: address@hidden
> From: Alan Mackenzie <address@hidden>
>
> > The functions we talk about currently don't know what they are invoked
> > for. Your envisioned changes imply that they should behave
> > differently depending on whether the results will be used for layout
> > of the current window or the next/previous window in a group. That's
> > part of the changes I had in mind. They are not trivial. But without
> > them, what you want to do will not work reliably.
>
> How about adding an extra boolean parameter to the move_it_* functions,
> perhaps called `physical', which when set would mean the function would
> have to adjust its iterator when crossing a window boundary, when not set
> would work the same way as it currently does? `vertical-motion' would
> also need this extra &optional parameter, possibly a few other defuns,
> too.
I don't think it's a boolean. It should be the buffer position where
the window should be switched. So probably 2 parameters, for the
beginning and end of the window. Maybe also the window to switch to.
And then you need to implement the handling of these new arguments.
> There are around 150 calls to move_it_*. I'm guessing that most of these
> would set `physical' to false, perhaps more of the ones in window.c would
> use true.
Maybe, I don't know. The problem is that these functions are called
in several layers, and all of them will have to know about these new
arguments. Also, some utility functions, like pos_visible_p, are
called in different situations, so the caller will have to supply
those arguments as required in each case.
> > > As an example, `compute_window_start_on_continuation_line' would have to
> > > use the dimensions of the previous window to determine the window-start.
> > > Jiggling the various windows around after text changes or scrolling is
> > > going to be the hard part of the coding.
>
> > Yes, and the result will be non-trivial changes in the overall logic,
> > because redisplaying a window will no longer be independent of other
> > windows.
>
> Yes. This is what is currently implemented in Follow Mode.
No, I mean that redisplay of all the windows in a group will have to
be done in one go, not one window at a time.
- The future of Follow Mode - a proposal., Alan Mackenzie, 2016/02/18
- Re: The future of Follow Mode - a proposal., Eli Zaretskii, 2016/02/18
- Re: The future of Follow Mode - a proposal., Alan Mackenzie, 2016/02/19
- Re: The future of Follow Mode - a proposal., Eli Zaretskii, 2016/02/19
- Re: The future of Follow Mode - a proposal., Alan Mackenzie, 2016/02/19
- Re: The future of Follow Mode - a proposal., Eli Zaretskii, 2016/02/19
- Re: The future of Follow Mode - a proposal., Alan Mackenzie, 2016/02/20
- Re: The future of Follow Mode - a proposal.,
Eli Zaretskii <=
- Re: The future of Follow Mode - a proposal., Alan Mackenzie, 2016/02/23
- Re: The future of Follow Mode - a proposal., Stefan Monnier, 2016/02/23
- Re: The future of Follow Mode - a proposal., Eli Zaretskii, 2016/02/24
- Re: The future of Follow Mode - a proposal., Stefan Monnier, 2016/02/24
- Re: The future of Follow Mode - a proposal., Eli Zaretskii, 2016/02/24
- Re: The future of Follow Mode - a proposal., Stefan Monnier, 2016/02/24
- Re: The future of Follow Mode - a proposal., Eli Zaretskii, 2016/02/24
- Re: The future of Follow Mode - a proposal., Stefan Monnier, 2016/02/24
- Re: The future of Follow Mode - a proposal., Eli Zaretskii, 2016/02/25
- Re: The future of Follow Mode - a proposal., Stefan Monnier, 2016/02/25