[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get warnings for unused parts of a file?
From: |
Leo Correia de Verdier |
Subject: |
Re: How to get warnings for unused parts of a file? |
Date: |
Fri, 1 Oct 2021 13:49:54 +0200 |
Funny!
I have no idea. Smarter people on this list will certainly know, though.
> 1 okt. 2021 kl. 13:31 skrev Omid Mo'menzadeh <omid.mnzadeh@gmail.com>:
>
> Thank you for your reply. This is working, but like this:
> main = #(if (not (defined? 'is-loaded-file))
> #{
> \score { \vocal }
> #}
> )
>
> \main
>
> Any idea why it wouldn't work without defining the main variable? It's fine
> for me, but I don't get why the following snippet does not work for me:
> #(if (not (defined? 'is-loaded-file))
> #{
> \score { \vocal }
> #}
> )
>
> I'm using Lilypond 2.22.1 if that makes a difference.
>
> On Tue, Sep 14, 2021 at 12:44 PM Leo Correia de Verdier
> <leo.correia.de.verdier@gmail.com> wrote:
> There might be more elegant ways to do it (there probably is), but I have a
> variable I define in my output files, is-loaded-file and then I can use #(if
> (defined? 'is-loaded-file) … ) in the definition files to test. This requires
> a situation where there’s a clear separation between ”definition files” and
> ”output files”, but works quite well for me.
>
>
> > 14 sep. 2021 kl. 09:52 skrev Omid Mo'menzadeh <omid.mnzadeh@gmail.com>:
> >
> > Hello all. This might be a weird thing to seek, but here is the scenario:
> > I have several files defining (but not using) different parts of the score,
> > which other files use to construct several output types.
> >
> > But the problem is the command `lilypond -l WARNING -o /path/to/file.ly`
> > does not show a warning for the following example file:
> > ghigh = \relative c {
> > \clef "treble_8"
> > \time 4/4
> > \voiceOne
> > c2 |
> > }
> >
> > It does, if I include the following part at the end of the file:
> > \book {
> > \ghigh
> > }
> >
> > But the problem is that when I include it in another file, I get an extra
> > output!
> >
> > A possible solution could look like an `if __name__ == "__main__"` clause
> > in Python, but I don't know if we have a similar variable available in
> > Lilypond.
> > Thanks in advance,
> > Omid
>
- Re: How to get warnings for unused parts of a file?, Omid Mo'menzadeh, 2021/10/01
- Re: How to get warnings for unused parts of a file?,
Leo Correia de Verdier <=
- Re: How to get warnings for unused parts of a file?, David Kastrup, 2021/10/01
- Re: How to get warnings for unused parts of a file?, Jean Abou Samra, 2021/10/01
- Re: How to get warnings for unused parts of a file?, David Kastrup, 2021/10/01
- Re: How to get warnings for unused parts of a file?, Jean Abou Samra, 2021/10/01
- Re: How to get warnings for unused parts of a file?, Omid Mo'menzadeh, 2021/10/02
- Re: How to get warnings for unused parts of a file?, David Kastrup, 2021/10/02
- Re: How to get warnings for unused parts of a file?, Omid Mo'menzadeh, 2021/10/02
- Re: How to get warnings for unused parts of a file?, David Kastrup, 2021/10/02
- Re: How to get warnings for unused parts of a file?, Omid Mo'menzadeh, 2021/10/02
- Re: How to get warnings for unused parts of a file?, David Kastrup, 2021/10/02