Pierre-Luc Gauthier <[email protected]> writes:
> Hi there,
>
> When I compile :
>
> test = {}
> \addQuote "test" \test
>
> I get :
>
> GNU LilyPond 2.21.7
> Processing `test.ly'
> Parsing...
> Interpreting music.../usr/share/lilypond/2.21.7/scm/part-combiner.scm:956:30:
> In procedure car in expression (car current-tail):
> /usr/share/lilypond/2.21.7/scm/part-combiner.scm:956:30: Wrong type
> (expecting pair): #f
>
> Can anyone corroborate ?
That's interesting. With my current version in /usr/local/bin I get
-*- mode: compilation; default-directory: "/tmp/" -*-
Compilation started at Tue Sep 22 14:35:27
lilypond /tmp/ba.ly
GNU LilyPond 2.21.0
Processing `/tmp/ba.ly'
Parsing...
Interpreting music...
warning: no music found in score
/tmp/ba.ly:2:18: warning: quoted music `test' is empty
\addQuote "test"
\test
/tmp/ba.ly:1: warning: no \version statement found, please add
\version "2.21.0"
for future compatibility
Success: compilation successfully completed
Compilation finished at Tue Sep 22 14:35:28
With current master, I instead get
-*- mode: compilation; default-directory: "/tmp/" -*-
Compilation started at Tue Sep 22 14:35:51
/usr/local/tmp/lilypond/out/bin/lilypond ba.ly
GNU LilyPond 2.21.7
Processing `ba.ly'
Parsing...
Interpreting
music.../usr/local/tmp/lilypond/out/share/lilypond/current/scm/part-combiner.scm:956:30:
In procedure car in expression (car current-tail):
/usr/local/tmp/lilypond/out/share/lilypond/current/scm/part-combiner.scm:956:30:
Wrong type (expecting pair): #f
Compilation exited abnormally with code 1 at Tue Sep 22 14:35:52
The code bombing out is clearly wrong:
(if (null? quote-contents)
(let find-non-empty ((current-tail (member raw-voice context-list)))
;; if voice has contents, use them, otherwise check next ctx
(cond ((null? current-tail) #f)
((and (pair? (car current-tail))
(pair? (cdar current-tail)))
(set! quote-contents (cdar current-tail)))
(else (find-non-empty (cdr current-tail))))))
because (null? current-tail) can never be true (it's either #f or a
pair). This should be (not current-tail) instead.
However, this particular buggy code has not changed for a long long
time, so a more recent change must have affected context-list which
previous to that change apparently always contained raw-voice somewhere,
or at least in the case you now posted.
--
David Kastrup
_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond