Re: What should the relation between \book / \bookpart be?

David Kastrup <[email protected]>
Newsgroups gmane.comp.gnu.lilypond.devel
Organization Organization?!?
Message-ID <[email protected]>
Simon Albrecht <[email protected]> writes:

> On 08/08/2026 19:45, David Kastrup wrote:
>> Simon Albrecht <[email protected]> writes:
>>
>>>> What is wrong with a \bookpart?
>>> It causes a page break,
>> That is correct.  Maybe some way of being able to merge several
>> bookparts into one might make sense.
>
> I also had the thought of providing Scheme function(s) like (name not
> scrutinised) \squashIntoOneBookpart #'identifier or similar.
>
>>> and I understood your goal was to allow for the greatest possible
>>> flexibility in reusing segments of a project inside/outside of \book
>>> and \bookpart. That was me reading between the lines, which I felt to
>>> be necessary.
>> Well, the idea was to avoid roadblocks that are hard to understand.
>> "Why doesn't this work" should have an answer people can get behind.
>> I just have a bad imagination about "people".
>
> Would it be hard to give a clear error message when \book{} blocks are
> nested for example?

Once book blocks are properly recognized.  The problem in the parser is
that if you want to avoid unhelpful messages like

"Unexpected token BOOK"

you actually need to specify the code for which you want an error
message.  And if you write all the code and it is properly recognized
and people are apparently trying to achieve something particular with
it, then leaves the question of whether "I am sorry Dave but I am afraid
I can't do that" is really the best possible action when you know what
the user wants and you know how to achieve it.

-- 
David Kastrup
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.