Re: Hook like \AtEndDocument

2013-12-07 Thread Phil Holmes
- Original Message - 
From: David Kastrup d...@gnu.org



Check out URL:http://lsr.dsi.unimi.it/LSR/Item?id=630.  It's not clear
to me why this is not in
URL:http://lilypond.org/doc/v2.16/Documentation/snippets/ since it is
in the LilyPond tree under Documentation/snippets and it seems sort of
pointless to maintain it there without making it available.

Bug?

--
David Kastrup



Probably not.  For snippets to actually reach the documentation, they must 
be tagged with one of the headings that are in the snippet document (e.g.
Pitches, Rhythms, Expressive marks) - this one isn't, so it's not included 
in the docs.  I guess there are 3 options: don't worry; add a tag that is a 
section of the document; or update the snippets document with the other used 
tags.


--
Phil Holmes 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hook like \AtEndDocument

2013-12-07 Thread David Kastrup
Phil Holmes m...@philholmes.net writes:

 - Original Message - 
 From: David Kastrup d...@gnu.org

 Check out URL:http://lsr.dsi.unimi.it/LSR/Item?id=630.  It's not clear
 to me why this is not in
 URL:http://lilypond.org/doc/v2.16/Documentation/snippets/ since it is
 in the LilyPond tree under Documentation/snippets and it seems sort of
 pointless to maintain it there without making it available.

 Bug?

 Probably not.  For snippets to actually reach the documentation, they
 must be tagged with one of the headings that are in the snippet
 document (e.g.  Pitches, Rhythms, Expressive marks) - this one isn't,
 so it's not included in the docs.

That explains what happens, but that does not make it a non-bug.  It
seems rather pointless to maintain the snippet separately from the LSR
if we are never going to do anything with it.

 I guess there are 3 options: don't worry; add a tag that is a section
 of the document; or update the snippets document with the other used
 tags.

Or have some catchall document where not just the selected snippets are
shown.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hook like \AtEndDocument

2013-12-07 Thread Phil Holmes
- Original Message - 
From: David Kastrup d...@gnu.org

To: Phil Holmes m...@philholmes.net
Cc: Lilypond-User lilypond-user@gnu.org
Sent: Saturday, December 07, 2013 4:14 PM
Subject: Re: Hook like \AtEndDocument



Phil Holmes m...@philholmes.net writes:

- Original Message - 
From: David Kastrup d...@gnu.org



Check out URL:http://lsr.dsi.unimi.it/LSR/Item?id=630.  It's not clear
to me why this is not in
URL:http://lilypond.org/doc/v2.16/Documentation/snippets/ since it is
in the LilyPond tree under Documentation/snippets and it seems sort of
pointless to maintain it there without making it available.

Bug?


Probably not.  For snippets to actually reach the documentation, they
must be tagged with one of the headings that are in the snippet
document (e.g.  Pitches, Rhythms, Expressive marks) - this one isn't,
so it's not included in the docs.


That explains what happens, but that does not make it a non-bug.  It
seems rather pointless to maintain the snippet separately from the LSR
if we are never going to do anything with it.


I guess there are 3 options: don't worry; add a tag that is a section
of the document; or update the snippets document with the other used
tags.


Or have some catchall document where not just the selected snippets are
shown.

--
David Kastrup



http://code.google.com/p/lilypond/issues/detail?id=3709

--
Phil Holmes 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hook like \AtEndDocument

2013-12-03 Thread David Kastrup
Urs Liska u...@openlilylib.org writes:

 Hi all,

 is there a way to hook into the compilation process that allows me to
 do something when all parsing has been done?

 Concretely I want to use a Scheme function to collect information
 during the parsing (something like a log) and want to output this in
 sorted form to an external file.

 I see two ways to accompish this:

 a) write the log to an internal structure, then at the end sort it and
 write it to the file
 b) write it to the file immediately and call an external script at the end.

 Both approaches (I strongly prefer a) because I'd prefer not to rely
 on an external script) would need a trigger (or listener?) that calls
 a function when everything has been parsed (or when the whole
 compilation process has been finished).
 b) could be worked around by wrapping the lilypond call itself into a
 script, but as said I'd prefer a) anyway.

 Any ideas?

Check out URL:http://lsr.dsi.unimi.it/LSR/Item?id=630.  It's not clear
to me why this is not in
URL:http://lilypond.org/doc/v2.16/Documentation/snippets/ since it is
in the LilyPond tree under Documentation/snippets and it seems sort of
pointless to maintain it there without making it available.

Bug?

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hook like \AtEndDocument

2013-12-03 Thread Urs Liska

Am 03.12.2013 10:16, schrieb David Kastrup:

Urs Liska u...@openlilylib.org writes:


Hi all,

is there a way to hook into the compilation process that allows me to
do something when all parsing has been done?

Concretely I want to use a Scheme function to collect information
during the parsing (something like a log) and want to output this in
sorted form to an external file.

I see two ways to accompish this:

a) write the log to an internal structure, then at the end sort it and
write it to the file
b) write it to the file immediately and call an external script at the end.

Both approaches (I strongly prefer a) because I'd prefer not to rely
on an external script) would need a trigger (or listener?) that calls
a function when everything has been parsed (or when the whole
compilation process has been finished).
b) could be worked around by wrapping the lilypond call itself into a
script, but as said I'd prefer a) anyway.

Any ideas?

Check out URL:http://lsr.dsi.unimi.it/LSR/Item?id=630.


OK, trying to digest this.
Do I get this  right when I say:

- write a function annotate to be used in the main input file.
  This function saves some information (say location plus a comment) to 
an internal

  structure that is defined public.
- use this function in the input files to annotate items in the score
- write another function process-annotations.
  This function uses the technique described in the snippet to make a new
  score from itself which will then be processed after the current 
score has been finished.
  This new score contains a function that can read the data from the 
previously defined

  data structure from the original annotate function.
  (Or alternatively this new score doesn't do more than calling an 
external script when
  annotate would have written everything to a temporary file 
immediately.)

?

Urs


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hook like \AtEndDocument

2013-12-03 Thread Jan-Peter Voigt
Hi Urs,

Am 03.12.2013 11:12, schrieb Urs Liska:
 OK, trying to digest this.
 Do I get this  right when I say:
 
 - write a function annotate to be used in the main input file.
   This function saves some information (say location plus a comment) to
 an internal
   structure that is defined public.
yes

 - use this function in the input files to annotate items in the score
yes

 - write another function process-annotations.
   This function uses the technique described in the snippet to make a new
   score from itself which will then be processed after the current score
 has been finished.
   This new score contains a function that can read the data from the
 previously defined
   data structure from the original annotate function.
this would be an engraver placed in the score context, that does this
processing inside the finalize slot.

If you look in edition.scm lines 480 following in my lalily project,
you find an annotation engraver, that does it this way. There is a music
function \todo short description that inserts the annotation in
the music as a TextScript with an annotation properties, which is
fetched by the engraver.
At the bottom of the file, you can place
\markuplist \annolist
to display the annotations in the pdf.
And there is also a *-todo.log file created.
Just a this-is-how-I-didit ;)

Best, Jan-Peter


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hook like \AtEndDocument

2013-12-03 Thread Urs Liska

Am 03.12.2013 11:41, schrieb Jan-Peter Voigt:

Hi Urs,

Am 03.12.2013 11:12, schrieb Urs Liska:

OK, trying to digest this.
Do I get this  right when I say:

- write a function annotate to be used in the main input file.
   This function saves some information (say location plus a comment) to
an internal
   structure that is defined public.

yes


- use this function in the input files to annotate items in the score

yes


- write another function process-annotations.
   This function uses the technique described in the snippet to make a new
   score from itself which will then be processed after the current score
has been finished.
   This new score contains a function that can read the data from the
previously defined
   data structure from the original annotate function.

this would be an engraver placed in the score context, that does this
processing inside the finalize slot.

If you look in edition.scm lines 480 following in my lalily project,
you find an annotation engraver, that does it this way. There is a music
function \todo short description that inserts the annotation in
the music as a TextScript with an annotation properties, which is
fetched by the engraver.
At the bottom of the file, you can place
\markuplist \annolist
to display the annotations in the pdf.
And there is also a *-todo.log file created.
Just a this-is-how-I-didit ;)


Thank you very much for this.
I've had a little look into it and will have a hard time having a closer 
look ;-)


But I definitely have the impression I will have to go through much of 
this in order not to reinvent the wheel so many times (using wood 
instead of rubber ...)


Urs


Best, Jan-Peter


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user