Re: Scheme function returning \book

2019-01-16 Thread Lukas-Fabian Moser
Hi Aaron, Going back to the original function posted, if the output is meant to be a book that is more-or-less immutable and ready for printing, one could just do the following instead: \version "2.19.82" test = #(define-void-function (suffix) (string?)   (print-book-with-defaults #{   

Re: Scheme function returning \book

2019-01-16 Thread David Kastrup
Aaron Hill writes: > Here's an oddity: > > > \version "2.19.82" > test = #(define-scheme-function (suffix) (string?) #{ > \book { \bookOutputSuffix $suffix \score { b'4 } } #} ) > foo = \test "foo" > bar = \test "bar" > \foo \bar > > > This works. For historical reasons. It cannot

Re: Scheme function returning \book

2019-01-16 Thread David Kastrup
Thomas Morley writes: > Am Mi., 16. Jan. 2019 um 00:14 Uhr schrieb David Kastrup : >> >> Lukas-Fabian Moser writes: >> >> > Hi David, >> >> \test apparently expects a string argument. >> > >> > Aaargh, sorry, stupid me, and stupid copy'n'paste error. So, another try: >> > >> > \version

Re: Scheme function returning \book

2019-01-15 Thread Aaron Hill
On 2019-01-15 4:40 pm, Aaron Hill wrote: Here's an oddity: \version "2.19.82" test = #(define-scheme-function (suffix) (string?) #{ \book { \bookOutputSuffix $suffix \score { b'4 } } #} ) foo = \test "foo" bar = \test "bar" \foo \bar Oops. Probably shouldn't go around redefining

Re: Scheme function returning \book

2019-01-15 Thread Thomas Morley
Am Mi., 16. Jan. 2019 um 00:14 Uhr schrieb David Kastrup : > > Lukas-Fabian Moser writes: > > > Hi David, > >> \test apparently expects a string argument. > > > > Aaargh, sorry, stupid me, and stupid copy'n'paste error. So, another try: > > > > \version "2.19.82" > > > > test =

Re: Scheme function returning \book

2019-01-15 Thread Aaron Hill
Here's an oddity: \version "2.19.82" test = #(define-scheme-function (suffix) (string?) #{ \book { \bookOutputSuffix $suffix \score { b'4 } } #} ) foo = \test "foo" bar = \test "bar" \foo \bar This works. -- Aaron Hill ___ lilypond-user

Re: Scheme function returning \book

2019-01-15 Thread Aaron Hill
On 2019-01-15 4:11 pm, Kieren MacMillan wrote: Hi David, Does anybody have an idea what is supposed to distinguish a book from a bookpart outside of actual \book { \bookpart { ... } } usage? You can’t have multiple book parts in a single output file? That’s the way I understand it. Is

Re: Scheme function returning \book

2019-01-15 Thread David Kastrup
Kieren MacMillan writes: > Hi David, > >> Does anybody have an idea what is supposed to distinguish >> a book from a bookpart outside of actual >> >> \book { >> \bookpart { ... } } >> >> usage? > > You can’t have multiple book parts in a single output file? > That’s the way I understand it.

Re: Scheme function returning \book

2019-01-15 Thread Kieren MacMillan
Hi David, > Does anybody have an idea what is supposed to distinguish > a book from a bookpart outside of actual > > \book { > \bookpart { ... } } > > usage? You can’t have multiple book parts in a single output file? That’s the way I understand it. K.

Re: Scheme function returning \book

2019-01-15 Thread David Kastrup
Lukas-Fabian Moser writes: >>> \version "2.19.82" >>> >>> test = #(define-scheme-function (suffix) (string?)  #{ >>>   \book { >>>     \bookOutputSuffix #suffix >>>     \score { >>>   d4 >>>     } >>>   } >>> #} ) >>> >>> \test "surname" >>> >>> (still) causes a "Bad expression type"

Re: Scheme function returning \book

2019-01-15 Thread Lukas-Fabian Moser
\version "2.19.82" test = #(define-scheme-function (suffix) (string?)  #{   \book {     \bookOutputSuffix #suffix     \score {   d4     }   } #} ) \test "surname" (still) causes a "Bad expression type" error. Ah, well. Turns out that copying the code for \xxx here where \xxx was

Re: Scheme function returning \book

2019-01-15 Thread David Kastrup
Lukas-Fabian Moser writes: > Hi David, >> \test apparently expects a string argument. > > Aaargh, sorry, stupid me, and stupid copy'n'paste error. So, another try: > > \version "2.19.82" > > test = #(define-scheme-function (suffix) (string?)  #{ >   \book { >     \bookOutputSuffix #suffix >    

Re: Scheme function returning \book

2019-01-15 Thread Lukas-Fabian Moser
Hi David, \test apparently expects a string argument. Aaargh, sorry, stupid me, and stupid copy'n'paste error. So, another try: \version "2.19.82" test = #(define-scheme-function (suffix) (string?)  #{   \book {     \bookOutputSuffix #suffix     \score {   d4     }   } #} ) \test

Re: Scheme function returning \book

2019-01-15 Thread David Kastrup
Lukas-Fabian Moser writes: > Folks, > > is it possible for a scheme function to return a whole \book ? > > test = #(define-scheme-function (suffix) (string?)  #{ >   \book { >     \bookOutputSuffix #suffix >     \score { >   d4 >     } >   } > #} ) > > \test > > causes a "Bad expression

Scheme function returning \book

2019-01-15 Thread Lukas-Fabian Moser
Folks, is it possible for a scheme function to return a whole \book ? test = #(define-scheme-function (suffix) (string?)  #{   \book {     \bookOutputSuffix #suffix     \score {   d4     }   } #} ) \test causes a "Bad expression type" error. In