-include-string parser (format \\include
\~A\\n file)))
(make-music 'SequentialMusic 'void #t)))
\includeIfNotDef #'defs defs.ly
--snip--
Conclusion: To write a different include music-function, use
(ly:parser-include-string parser (format \\include \~A\\n file)) so
that this can be done
Hello Carl, Hello David,
thanks for your replies!
I will read through those threads next week. This might help me understand what
is happening under the hood.
The basic include is working as expected. But I think it would be a nice
feature if one could search for files to include using scheme.
Jan-Peter Voigt jp.vo...@gmx.de writes:
Am 06.01.2012 10:17, schrieb Jan-Peter Voigt:
Am 06.01.2012 09:35, schrieb Jan-Peter Voigt:
Hello David,
the \sourcefilename hint is helpful! Thank you!
If I use this in my function and do a ly:parser-clone, the location
is up to date:
...
Now I
Ah, yes ... I will rewrite this, when I'm in my machine again
Cheers, Jan-Peter
Am 07.01.2012 um 09:42 schrieb David Kastrup d...@gnu.org:
Jan-Peter Voigt jp.vo...@gmx.de writes:
Am 06.01.2012 10:17, schrieb Jan-Peter Voigt:
Am 06.01.2012 09:35, schrieb Jan-Peter Voigt:
Hello David,
set some output-suffix!)
This is a usable solution to me. But I would like to have the correct
location info available, while parsing the included file.
Is it possible to create an arbitrary include-music-function? This
would make it possible, to (for example) include all files in a
directory
Am 06.01.2012 09:35, schrieb Jan-Peter Voigt:
Hello David,
the \sourcefilename hint is helpful! Thank you!
If I use this in my function and do a ly:parser-clone, the location is
up to date:
...
Now I will look, if this is working also with ly:parser-include-string
while resetting filename
Am 06.01.2012 10:17, schrieb Jan-Peter Voigt:
Am 06.01.2012 09:35, schrieb Jan-Peter Voigt:
Hello David,
the \sourcefilename hint is helpful! Thank you!
If I use this in my function and do a ly:parser-clone, the location
is up to date:
...
Now I will look, if this is working also with
Jan-Peter Voigt jp.vo...@gmx.de writes:
Here are the two functions I implemented ... still a bit clumsy, but
it works for now ... if you are interested *how* and *why* to use
them, don't hesitate to mail me!
If anybody is game for digging up the old discussion: I don't think it
makes sense to
On 1/6/12 7:28 AM, David Kastrup d...@gnu.org wrote:
Now I don't want to repeat old mistakes, but I don't really have the
time for an extended investigation. So if somebody gives me all the
data in a manner that does not require all too much thinking on my side,
I might try putting that kind of
the correct
location info available, while parsing the included file.
Is it possible to create an arbitrary include-music-function? This
would make it possible, to (for example) include all files in a
directory or matching a specific pattern.
Cheers,
Jan-Peter
.
Is it possible to create an arbitrary include-music-function? This
would make it possible, to (for example) include all files in a
directory or matching a specific pattern.
Any reason you don't just do #{ \include #file #} here?
--
David Kastrup
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
Jan-Peter Voigt jp.vo...@gmx.de 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
Hello David,
Am 05.01.2012 13:50, schrieb David Kastrup:
Ah yes. ly:parse-file does not help either?
yes it does, thanks ... but ...
--snip--
#(define-public includeLoc (define-music-function (parser location
file)(string?)
(let ((outname (format ~A.ly (ly:parser-output-name
Jan-Peter Voigt jp.vo...@gmx.de writes:
This does not work ... the var music is not known in the file
included with ly:parse-file.
There has been a function ly:parser-parse-file in 2.12 - and if my
memory doesn't trick me, there has been discussion on devel why and
how to remove it.
This
with the location name and
only includes the file if they match. (This should not work, if you
have set some output-suffix!)
This is a usable solution to me. But I would like to have the correct
location info available, while parsing the included file.
Is it possible to create an arbitrary include-music
16 matches
Mail list logo