lilypond-user
[Top][All Lists]
Advanced

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

Re: pretty-print and localAlterations


From: Thomas Morley
Subject: Re: pretty-print and localAlterations
Date: Mon, 21 Dec 2015 02:34:57 +0100

2015-12-21 1:16 GMT+01:00 Simon Albrecht <address@hidden>:
> Hello,
>
> if I compile the following code:
>
> %%%%%%%%
> \version "2.19.32"
> #(use-modules (ice-9 pretty-print))
>
> printKeysig =
> \applyContext #(lambda (context)
>                  (format #t "~a" (pretty-print (ly:context-property context
> 'localAlterations))))
> \relative {
>   es'4 \printKeysig e'
> }
> %%%%%%%%
>
> I get a spurious #<unspecified> in the console output, on its own line.
> Of course, it’s not an actual problem, but I’d still be curious where it
> comes from.
>
> Yours, Simon


You used two nested displaying procedures
pretty-print prints formated to the console, but returns unspecified
(format #t ...) prints to console as well.

other examples:

guile> (display (display 1))
-> 1#<unspecified>

in ly-file:
#(format #t "\n\t~a" *unspecified*)
->     #<unspecified>

Don't nest them.

Cheers,
  Harm



reply via email to

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