lilypond-user
[Top][All Lists]
Advanced

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

Re: "In procedure list-tail in expression (list-tail input-file (- # 2))


From: David Wright
Subject: Re: "In procedure list-tail in expression (list-tail input-file (- # 2)): value out of range"
Date: Tue, 21 Mar 2017 13:05:42 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue 21 Mar 2017 at 13:13:58 (-0400), Jeffery Shivers wrote:
> On Tue, Mar 21, 2017 at 12:51 PM, Urs Liska <address@hidden> wrote:
> >
> > Just to clarify before anyone is getting confused: This is most surely
> > not a general issue with LilyPond but with the module loading code in
> > the "scholarly" package. "input-file" here is a list split from the
> > (*location*) string.
> 
> Thanks.
> 
> > Then the last two elements of that list are retrieved, and for some
> > reason the location list here doesn't have enough elements.
> >
> > Please insert the line
> > (dummy (ly:message "\n\n\ninput-file: ~a\n\n\n" input-file))
> > between the lines starting with "(input-file" and "(ctx" in module.ily
> > (around line 77) and tell me what the output is (presumably immediately
> > before the crash). Maybe give the output of a failing and a crashing
> > compilation.
> 
> The problem was subtracting 2 from (length  input-file) for `ctx`:
>       (input-file (string-split (car (ly:input-file-line-char-column
> (*location*))) #\/ ))
>       (ctx (list-tail input-file (- (length input-file) 2)))
> 
> This corrects that:
>       (ctx (list-tail input-file (- (length input-file) 1)))
> 
> Sorry for the noise everyone. Don't know why I didn't look there
> before posting. Should have eaten my Wheaties first.

What is all this? It looks like someone trying to get at the
basename of a filename. Are there not library functions in the
language for doing this correctly, ie honouring the filename
and line ending conventions of the platform?

Cheers,
David.



reply via email to

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