[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "include" music-function
From: |
David Kastrup |
Subject: |
Re: "include" music-function |
Date: |
Thu, 05 Jan 2012 13:50:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Jan-Peter Voigt <address@hidden> writes:
> Hello David,
>> Any reason you don't just do #{ \include #file #} here?
>>
> yes there is:
> --snip--
> \version "2.15.21"
>
> #(define-public includeLocal (define-music-function (parser location
> file)(string?)
> (let ((outname (format "~A.ly" (ly:parser-output-name parser)))
> (locname (car (ly:input-file-line-char-column location))))
> (if (or (string=? outname locname)(string-suffix? outname
> locname))
> #{ \include $file #}
> (make-music 'SequentialMusic 'void #t)))))
>
> \includeLocal "test.ily"
> --snip--
> this places the include in some context, generated by #{ #}.
Ah yes. ly:parse-file does not help either?
--
David Kastrup
Re: "include" music-function, David Kastrup, 2012/01/05
- Re: "include" music-function, Jan-Peter Voigt, 2012/01/06
- Re: "include" music-function, Jan-Peter Voigt, 2012/01/06
- Re: "include" music-function, Jan-Peter Voigt, 2012/01/06
- Re: "include" music-function, David Kastrup, 2012/01/06
- Re: "include" music-function, Carl Sorensen, 2012/01/06
- Re: "include" music-function, Jan-Peter Voigt, 2012/01/07
Re: "include" music-function, David Kastrup, 2012/01/07