[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: score-level headers made global
From: |
Ishizaki |
Subject: |
Re: score-level headers made global |
Date: |
Mon, 15 Aug 2005 15:16:54 +0900 |
Hi,
by seeing various codes which call ly_make_anonymous_module,
I simply thought it was safer to give "false" to this function.
But writing "SCM nid = ly_make_anonymous_module (true);" was OK on my computer.
Its output was same as giving "false".
//
Regarding this problem, I feel it is better to be re-considered how
Lilypond must handle these header definitions by core developers.
As Mr. Bengtsson pointed out, when \paper{printallheaders=##t} is set,
its output gets more strange (but at least understandable) with my patch
applyed.
Here, pleae let me explain why I got concerned with this.
When I write small ensemble score and parts, I want to divide headers
from each source ly files to avoid many copy&paste-ing.
For example, a "inst1.ly" is like this;
\include "headers.ly"
\header {
instrument = "instr1"
}
\score{
...
}
and "headers.ly" is like this;
\header {
composer = "composer"
title = "title"
opus = "opus"
}
But originally this did not output as I wanted, the latter header def in
"inst1.ly" override headers in "headers.ly" and all contents in
"headers.ly" was ignored.
So, I made patch (and it made another problem arouse).
Recently I noticed that I can live without my patch by writing ly files like
these;
inst1.ly:
\header {
\include "headers.ly"
instrument = "instr1"
}
\score{
...
}
headers.ly:
composer = "composer"
title = "title"
opus = "opus"
So, all my patches should be removed again, then printallheaders works as
intended ?
Any thoughts?
Thank you,
------------------------------------------------------------------------
| Yoshinobu Ishizaki |
| http://www2c.biglobe.ne.jp/~isizaki/ |
------------------------------------------------------------------------
On Sun, 14 Aug 2005 15:19:31 -0700
Graham Percival <address@hidden> wrote:
>
> On 14-Aug-05, at 3:03 PM, Han-Wen Nienhuys wrote:
>
> > Graham Percival wrote:
> >> There's a header patch that's waiting for Han-Wen to look at it. I
> >
> >> don't
> >> know if it fixes this, but you could try it.
> >> --- lilypond-org/lily/lily-parser.cc 2005-08-06
> >22:30:23.000000000 > +0900
> >> +++ lilypond/lily/lily-parser.cc 2005-08-06 21:48:29.000000000
> >> +0900
> >> @@ -220,7 +220,13 @@
> >> {
> >> SCM id = parser->lexer_->lookup_identifier("$defaultheader");
> >> if (!ly_is_module (id))
> >> - id = ly_make_anonymous_module (be_safe_global);
> >> -
> >> - return id;
> >> + {
> >> + return ly_make_anonymous_module (be_safe_global);
> >> + }
> >> + else
> >> + {
> >> + SCM nid = ly_make_anonymous_module (false);
> >
> > generally looks ok, but why is nid non-safe?
>
> I don't know; this patch was sent by Yoshinobu Ishizaki. I don't
> understand how the parser works. Yoshinobu-san?
>
> - Graham
>