lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LILYPOND VERSION


From: David Kastrup
Subject: Re: LILYPOND VERSION
Date: Wed, 06 Jul 2016 20:06:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

rosros <address@hidden> writes:

> I would like to recover the value of the lilypond version statement to insert
> it in the tagline.
>
> With "\simple #(lilypond-version)" I can recover the current lilypond
> version which is not necessarily the same string.
>
> Is there a solution other than hard-coding it?

Looking at the code in lexer.ll (and elsewhere), the answer is quite
definitely "no".  The version number never leaves the bowels of the
tokenizer and is never stored anywhere in any form.  Since it is a
reserved word, you cannot even redefine the \version statement.

It would be a reasonable extension to store the version number in
version-seen but at the current moment it is merely set to #t when the
\version statement is encountered.

You can write

ver = "2.18.0"
\version #ver

...

and output #ver at some point of time.  That's probably the best you can
currently hope for.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]