>>>>> Jim <[email protected]> writes: > I should note that the document string for `TeX-command-region' says > "If the master file for the document has a header, it is written to > the temporary file before the region itself. The document's header > is all text before `TeX-header-end'." > The way I read it, this comment disagrees with what `TeX-region-create' does. > (Do you agree?)
In literal sense this doc string isn't accurate, I think. The author must have presumed LaTeX document structure, where the preamble appears only once per document. Under this assumption, the behavior of `TeX-region-create' is reasonable; When the user type C-c C-r in the master file buffer and the region contains the preamble, the region should be used as-is in _region_.tex without adding anything. > If the `TeX-command-region' doc string and `TeX-region-create' do disagree, > do you think -> the doc string is wrong (incomplete) and needs updating, or -> the doc string reflects what was originally intended, and at some point in > the past someone changed the behaviour of `TeX-region-create' without > considering what `TeX-command-region' claims it does? Ideally, `TeX-region-create' should be updated to support ConTeXt, where preamble-like stuffs appear more than once per document. The problem is it wouldn't be such easy to achieve that reliably... Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopGenocide #CeasefireNOW #IProtestAgainstTrumpAndNetanyahu'sAttackOnIran,WhichViolatesInternationalLaw
