lilypond-user
[Top][All Lists]
Advanced

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

Re: \version statement, etc.


From: Paul Scott
Subject: Re: \version statement, etc.
Date: Tue, 17 Oct 2017 12:19:45 -0700
User-agent: NeoMutt/20170609 (1.8.3)

On Tue, Oct 17, 2017 at 01:58:16PM -0500, David Wright wrote:
> On Tue 17 Oct 2017 at 11:31:46 (-0700), Paul Scott wrote:
> > On Tue, Oct 17, 2017 at 08:14:06PM +0200, David Kastrup wrote:
> > > Paul Scott <address@hidden> writes:
> > > 
> > > > On Tue, Oct 17, 2017 at 08:03:44PM +0200, David Kastrup wrote:
> > > >> 
> > > >> That is the whole _point_ of a warning: LilyPond is able to complete
> > > >> the job which _may_ mean that it works perfectly but it cannot be
> > > >> sure.  For example, because it does not know for which version some
> > > >> file has been written.
> > > >
> > > > I am trying to use version statements correctly and efficiently.
> > > > Why doesn't my example work or how should I do it differenly?
> 
> Perhaps you might think of the version statement like the strand line
> on a beach which shows how high the water has ever been.
> 
> When you wrote LP files for 2.18.2, using its notation, you probably
> put \version 2.18.2 in the files. Those files will, in the absence of
> incompatible changes to LP's behaviour, still work with 2.19.49, say.
> 
> If LP were to make such changes, or you were to re-edit those files
> for some reason, you would start by running convert-ly which would
> update them and change the version to suit. That's like the sea
> pushing the strand line further up the beach.
> 
> But files you write now will contain \version 2.19.49 (I'm lagging),
> and might have modern constructions in them that LP 2.18.2 wouldn't
> understand. Whether or not those construction throw an error, the
> version warning will alert you to the fact that LP might misinterpret
> what it read from the file.

Thank you for your explanation and I believe I have long understood
of \version statements.

> > > LilyPond expects a \version statement in the main file.  Put one there.
> > > convert-ly can do this for you (probably leave off the -d option).
> > 
> > In all my projects the .ily file with the \version statement is the main
> > file with the music in it.  There is .ly file for each instrument/part
> > which includes the .ily file.  I haven't had to put a \version statement
> > in each .ly file until 2.19.80.
> 
> But it's pointless *not* to include a version statement. You aren't
> expected to keep editing it so that it remains "up to date".

The single \version statement in the main .ily file gives the version for
the code.  I wouldn't have different versions of code in different parts
of the project.

And yes I don't use convert-ly.  I have many editing tools to keep my
code current and even to update a project written with older code.
Just search and replace in emacs is one of my most used tools.

> The only time I miss them out is when writing an MWE for posting
> here. I would like people running 2.18.2 (and older) to be able
> to run them without the hassle of editing them, but I can't be sure
> about how low a version number would still be valid. For an MWE
> it hardly matters because the code can easily be examined in its
> entirety without much effort.

I always use a \version for a MWE.

Thank you for your reply,

Paul





reply via email to

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