What is the proper way of printing the current date? Also bug report

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

What is the proper way of printing the current date? Also bug report

Sven Axelsson
I have been using

#(use-modules (srfi srfi-19))
today = #(date->string (current-date) "~B ~d, ~Y")

to get the current date so I can include that in the tagline of my music.

This does cause the message
WARNING: #f: imported module (srfi srfi-19) overrides core binding
`current-time'
in the log, but it didn't seem to cause any problems.

This usually works great, but on one particular tune that uses many

\once \override Beam #'positions = #'(-2.5 . -3.0)

this would cause Lilypond to fail with the message
ERROR: Wrong type (expecting pair): ()

It was almost driving me crazy, since I thought the error came from the
overrides themselves, using pairs and all. The really strange thing is
that using a single beam override caused no error, using a few printed
the error but still generated correct output, and using even more would
cause Lilypond to generate no output at all.

Obviously this is caused by some strange Guile interactions that I don't
understand. However, shouldn't there be a standard way of getting a
formatted date in Lilypond? Or maybe there is, and I just haven't
found it yet.

--
Sven Axelsson



_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: What is the proper way of printing the current date? Also bug report

Han-Wen Nienhuys
Sven Axelsson wrote:

> I have been using
>
> #(use-modules (srfi srfi-19))
> today = #(date->string (current-date) "~B ~d, ~Y")
>
> to get the current date so I can include that in the tagline of my music.
>
> This does cause the message
> WARNING: #f: imported module (srfi srfi-19) overrides core binding
> `current-time'
> in the log, but it didn't seem to cause any problems.
>
> This usually works great, but on one particular tune that uses many
>
> \once \override Beam #'positions = #'(-2.5 . -3.0)
>
> this would cause Lilypond to fail with the message
> ERROR: Wrong type (expecting pair): ()
>
> It was almost driving me crazy, since I thought the error came from the
> overrides themselves, using pairs and all. The really strange thing is
> that using a single beam override caused no error, using a few printed
> the error but still generated correct output, and using even more would
> cause Lilypond to generate no output at all.
>
> Obviously this is caused by some strange Guile interactions that I don't
> understand. However, shouldn't there be a standard way of getting a
> formatted date in Lilypond? Or maybe there is, and I just haven't
> found it yet.

Quaint. Can you send a full bugreport?

>


--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

RE: What is the proper way of printing the current date? Also bug report

Sven Axelsson
> From: Han-Wen Nienhuys [mailto:[hidden email]]
> Sent: den 28 juli 2005 14:39
> To: Sven Axelsson
> Cc: [hidden email]; 'bug-lilypond'
> Subject: Re: What is the proper way of printing the current
> date? Also bug report
>
> Sven Axelsson wrote:
> > I have been using
> >
> > #(use-modules (srfi srfi-19))
> > today = #(date->string (current-date) "~B ~d, ~Y")
> >
> > to get the current date so I can include that in the
> tagline of my music.
> >
> > This does cause the message
> > WARNING: #f: imported module (srfi srfi-19) overrides core binding
> > `current-time'
> > in the log, but it didn't seem to cause any problems.
> >
> > This usually works great, but on one particular tune that uses many
> >
> > \once \override Beam #'positions = #'(-2.5 . -3.0)
> >
> > this would cause Lilypond to fail with the message
> > ERROR: Wrong type (expecting pair): ()
> >
> > It was almost driving me crazy, since I thought the error
> came from the
> > overrides themselves, using pairs and all. The really
> strange thing is
> > that using a single beam override caused no error, using a
> few printed
> > the error but still generated correct output, and using
> even more would
> > cause Lilypond to generate no output at all.
> >
> > Obviously this is caused by some strange Guile interactions
> that I don't
> > understand. However, shouldn't there be a standard way of getting a
> > formatted date in Lilypond? Or maybe there is, and I just haven't
> > found it yet.
>
> Quaint. Can you send a full bugreport?

It is even quainter. Running lilypond from the command prompt does
generate correct output and no Wrong type error. Doubleclicking the
*.ly file generates no output and a clean log, since warnings and
errors are printed on stderr and doesn't end up in that log file.
Using my Python build script that calls os.system() to run lilypond
also fails in the same way and shows the warning and error, since
I am redirecting both stdout and stderr to my log file.

This is with 2.6.1 Windows stand alone.

I don't think I can provide more information than this. Is there
a formal bug report format I should use?

--
Sven Axelsson



_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: What is the proper way of printing the current date? Also bug report

Han-Wen Nienhuys
Sven Axelsson wrote:
> It is even quainter. Running lilypond from the command prompt does
> generate correct output and no Wrong type error. Doubleclicking the
> *.ly file generates no output and a clean log, since warnings and
> errors are printed on stderr and doesn't end up in that log file.
> Using my Python build script that calls os.system() to run lilypond
> also fails in the same way and shows the warning and error, since
> I am redirecting both stdout and stderr to my log file.
>

Damn. That might be another GC bug. Can you send me the offending .ly
file (privately)?

> This is with 2.6.1 Windows stand alone.
>
> I don't think I can provide more information than this. Is there
> a formal bug report format I should use?
>


--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond