[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tick Reduction
From: |
Stefan Monnier |
Subject: |
Re: Tick Reduction |
Date: |
Fri, 19 Nov 2021 13:22:16 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>> Clearly, we would benefit from a formal markup language (and one which
>> includes some way to align text into columns).
>
> AFAIU, markup is generally separate from layout, so aligning text is
> not part of what markup is supposed to solve.
Not sure what you mean: in order to know that the columns need to be
aligned, the code that does the layout will need to be told about it by
some markup.
>> Note that for the column display, I think we actually need an
>> extension to the current `space` thingy on the `display` property
>> which is able to align columns even without the buffer's data
>> telling the redisplay at which precise pixel position it should be
>> aligned (instead it should just add space until the columns are
>> visually aligned).
> This goes against the very basics of how our display engine is
> designed:
Yup, I know :-(
> it examines text one character at a time and makes layout
> decisions as part of that examination. What you want would AFAIU
> require the display engine perform layout of the entire window above
> the line currently being laid out, before the layout of the current
> line can be performed.
AFAIK, the way the display engine works currently, when we process
a given char at POS, we have already processed all the chars between
`window-start` and POS, so I think we could handle the case of "align
with some previous line" (with some non-trivial caveats since it means
that future changes in that previous line would need to cause POS to be
re-processed, which may require disabling some optimizations).
Of course, to really auto-align columns, we can't just "align
with some previous line", but we'd also need to align with some
subsequent line, which means it can't be done in a single pass.
Stefan
- Re: Tick Reduction, (continued)
- Re: Tick Reduction, Stefan Monnier, 2021/11/19
- Re: Tick Reduction, Eli Zaretskii, 2021/11/19
- Re: Tick Reduction,
Stefan Monnier <=
- Re: Tick Reduction, Eli Zaretskii, 2021/11/19
- Re: Tick Reduction, Stefan Monnier, 2021/11/19
- Re: Tick Reduction, Eli Zaretskii, 2021/11/19
- Re: Tick Reduction, Stefan Monnier, 2021/11/19
- Re: Tick Reduction, Eli Zaretskii, 2021/11/20
- Re: Tick Reduction, Stefan Monnier, 2021/11/20
- Re: Tick Reduction, Eli Zaretskii, 2021/11/20
- Re: Tick Reduction, Stefan Monnier, 2021/11/20
- Re: Tick Reduction, Eli Zaretskii, 2021/11/20
- Re: Tick Reduction, Stefan Monnier, 2021/11/20