[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overriding tagline in a custom init file?
From: |
-Eluze |
Subject: |
Re: Overriding tagline in a custom init file? |
Date: |
Sat, 1 May 2010 13:48:30 -0700 (PDT) |
Reinhold Kainhofer wrote:
>
>
>> this raises the question why there is no such option, enabling to setup a
>> user specific environment or style without having to manipulate this
>> crucial file (and to adapt it for each new version).
>
> Absolutely! It would also make lilypond-book much simpler, since currently
> the
> book preamble is added to all included .ly files. This looks awful if you
> click on an image to get the LilyPond file!
>
> AFAICS, "all" that needs to be done is to
> -) add a new option to lilypond e.g. -duser-init=settings.ily
> -) in init.ly include that file (if the option is given) right before
> \maininput
>
> In principle, all steps are easy (adding a command line option, checking
> for
> existence of command line option, including a file).
> The problem is the combination:
>
> The \include has to be done conditionally, and the check for the command
> line
> option has to be done in Scheme. This means that the include also has to
> be
> done in Scheme... Unfortunately, the processing of \include in a lilypond
> file
> is already done by the parser, so I don't know of any way to properly
> include
> a file using Scheme...
>
> I have tried:
>
>
> #(if (ly:get-option 'user-init)
> (display (format "\\include \"~a\"" (ly:get-option 'user-init)))
> (ly:parser-parse-string parser
> (format "\\include \"~a\"" (ly:get-option 'user-init))))
> \maininput
>
> But this does not seem to have any effect: It includes the file (since a
> syntax error in the included file causes lilypond to fail), but the
> settings
> (header block) are not used...
>
> Cheers,
> Reionhold
>
thanks for these clarifying statements!
so i conclude we will not get such an option until these problems are
solved.
i have now now added an option user-init=… in my little batch program which
then \includes that file.
(btw this seems more efficient than to copy the files into a temporary one
since if errors occur, the log points to the real file(s). )
--
View this message in context:
http://old.nabble.com/Overriding-tagline-in-a-custom-init-file--tp28379733p28423184.html
Sent from the Gnu - Lilypond - Dev mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Overriding tagline in a custom init file?,
-Eluze <=