bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lilypond-book fails on identical snippets


From: Han-Wen Nienhuys
Subject: Re: lilypond-book fails on identical snippets
Date: Sun, 2 May 2010 21:44:04 -0300

On Sun, May 2, 2010 at 6:11 PM, Mats Bengtsson <address@hidden> wrote:

>> \begin{lilypond}
>>  { c' }
>> \end{lilypond}
>>
>>
>> \begin{lilypond}
>>  { c' }
>> \end{lilypond}
>>
>> ----------------------------------------------------------------------
>>
>>
>> called with
>>
>>  lilypond-book --output=out zzz.tex
>>
>> causes the following error:
>>
>
> Probably, since the file name is generated based on some hash function of
> the code snippet, so both snippets get the same file name. How likely is
> this to happen in a practical document? Well, perhaps it is, since it could
> be some short example just showing a clef or a C major scale or whatever,
> that appears several times in a document.

 The case where snippets are repeated from the same or an another
document is one that we are optimizing for, as it is common (eg.
translated lilypond manuals), so it should be handled correctly.

Why are we running diffs against the on-disk file, if we are
generating the name based on a hash of the contents?  If the file
exists, by definition it has the correct contents. (this assumes
atomic writes, which is reasonable given the size of a snippet)



>>  File "/usr/local/bin/lilypond-book", line 1768, in filter_pipe
>>    error (_ ("`%s' failed (%d)") % (cmd, exit_status))
>> TypeError: 'str' object is not callable
>>

looks like a silly syntax problem in the .py file.


-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]