lilypond-user
[Top][All Lists]
Advanced

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

Re: How to correctly use ly:warning-located?


From: David Kastrup
Subject: Re: How to correctly use ly:warning-located?
Date: Mon, 22 Feb 2016 12:20:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Simon Albrecht <address@hidden> writes:

> On 22.02.2016 02:04, David Kastrup wrote:
>> Simon Albrecht <address@hidden> writes:
>>
>>>> *location* is a procedure (used for accessing the fluid %location local
>>>> to the guile module), not a location.  So call it.
>>> OK, that’s one thing. But with (*location*) I still get the same error
>>> message that it be of the wrong type…
>> Example code?
>
> Same as I previously sent, only with brackets

Parens.

> added around *location*. See attached.
>
> Best, Simon
>
> \version "2.19.36"
>
> m =
> #(define-music-function ()()
>    (ly:warning-located (*location*) "Here, \\m should be replaced with 
> \\melisma.")
>    #{ \melisma #})
>
> <<
>   {
>     c'1\m d\melismaEnd
>   }
>   \addlyrics { test test }
>>>

Looking at the code (and error message), ly:warning-located expects a
string as location info.  That would always have been the case.

You probably want to use ly:input-warning instead of ly:warning-located.
That should take (*location*) just fine.

-- 
David Kastrup



reply via email to

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