[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: scheme-function to provide value for \include
From:       Thomas Morley <thomasmorley65 () gmail ! com>
Date:       2016-06-28 8:44:25
Message-ID: CABsfGyXVR5X0ccZnZYot=mXCL9DNO+RxVPVOSEWpjinw_SWhNg () mail ! gmail ! com
[Download RAW message or body]

2016-06-28 9:23 GMT+02:00 Urs Liska <ul@openlilylib.org>:
> Hi all,
>
> I am surprised that \include refuses to accept a string that isn't passed
> literally but through a scheme-function:
>
> \version "2.19.43" givePath = #(define-scheme-function ()()
> "some/path/that/will/probably/not/be/found.ily") #(display (givePath))
> \include \givePath
>
> I would of course expect this to fail because it doesn't find the file, but
> instead I get:
>
> error: wrong or undefined identifier: `givePath'
>
> \include
>
> \givePath
>
> /tmp/frescobaldi-AbipCK/tmpMjey3N/document.ly:9:10: error: Unfinished main
> input
>
> \include
>
> \givePath
>
> some/path/that/will/probably/not/be/found.ily
>
> This value was found in the table: #<Music function #<procedure #f ()>>fatal
> error: failed files: "/tmp/frescobaldi-AbipCK/tmpMjey3N/document.ly"
>
> Am I missing something here, is this expected to fail?
>
> Urs



Hi Urs,

I'm not able to provide an explanation, but the following seems to work:

givePath =
#(define-scheme-function ()()
  "some/path/that/will/probably/not/be/found.ily")

\include #(givePath)

Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic