sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.61k stars 97 forks source link

refactor(packages): Remove unused typesetter-scoped cursor tracking #1981

Closed Omikhleia closed 5 months ago

Omikhleia commented 5 months ago

This was present since the very first commit of the raiselower package, but we do not have any use of such a thing anywhere else in the code base.

I think we can safely remove it...

I noticed it a while back, and remembered it when checking whether this raise/lower commands should use the new liners (the answer that question would be "no", it doesn't seem to me this case meets the criteria).

Another question, then should come its own issue shortly afterwards,.. I can tease it here, though: Regarding the signature of ouputYourself methods, why do we still need the typesetter at output time? It's job ought to be finished then! All we seem to need is... the frame. (I'm still checking the code to check if there is any counter-argument).

Omikhleia commented 5 months ago

This was present since the very first commit of the raiselower package

That is a02848e from 2014, and as can be seen there in other commands, at the time the cursor was in the typesetter state and there was no frame yet. The shift to frames occurred in a6ad32c later in 2014 -- but this small bit here was likely overlooked.

alerque commented 5 months ago

Another question, then should come its own issue shortly afterwards,.. I can tease it here, though: Regarding the signature of ouputYourself methods, why do we still need the typesetter at output time? It's job ought to be finished then! All we seem to need is... the frame. (I'm still checking the code to check if there is any counter-argument).

I think we're very close to being able to say "we don't". There used to be a lot of reasons we did need it, but I've been whittling away at them and I think the blockers are almost all gone.