Re: Dot-separated list as music function argument

2014-07-10 Thread Jan-Peter Voigt
Am 09.07.14 15:15, schrieb David Kastrup: No. If we have some Word in the place of a function argument, LilyPond tries interpreting it as a string first. If the predicate refuses to accept that, the next try is as a one-element symbol list. If that gets accepted, the parser checks whether

Re: Dot-separated list as music function argument

2014-07-09 Thread Jan-Peter Voigt
Hi Simon, I also stumbled sometimes ove this behaviour, but I think it is not a real bug. If the parser has a list? predicate, it looks for dot-notation. But if it gets a custom predicate, it will not do so. Am I right, David? IIUC some predefined predicates (list?, string?, ly:duration?,

Re: Dot-separated list as music function argument

2014-07-09 Thread Jan-Peter Voigt
... o dear ... my mail was delayed one day. But thats not too bad, as the other answers are much more helpful. Still, wrapped predicates do not get any special handling by th parser. Cheers, Jan-Peter On 08.07.2014 13:58, Jan-Peter Voigt wrote: I also stumbled sometimes ove this behaviour, but

Re: Dot-separated list as music function argument

2014-07-09 Thread David Kastrup
Jan-Peter Voigt jp.vo...@gmx.de writes: On 08.07.2014 13:58, Jan-Peter Voigt wrote: I also stumbled sometimes ove this behaviour, but I think it is not a real bug. If the parser has a list? predicate, it looks for dot-notation. But if it gets a custom predicate, it will not do so. Am I

Dot-separated list as music function argument

2014-07-08 Thread Simon Albrecht
Hello everybody, I just wrote a music function to mark grobs as editorial addition by colouring them grey. See the code and an example: \version 2.19.8 ed = #(let ((string-or-list? (lambda (grob) (or (string? grob) (list? grob) (define-music-function (parser location grob mus)

Re: Dot-separated list as music function argument

2014-07-08 Thread Abraham Lee
On Tue, Jul 8, 2014 at 5:39 AM, Simon Albrecht simon.albre...@mail.de wrote: Hello everybody, I just wrote a music function to mark grobs as editorial addition by colouring them grey. See the code and an example: \version 2.19.8 ed = #(let ((string-or-list? (lambda (grob) (or (string? grob)

Re: Dot-separated list as music function argument

2014-07-08 Thread Janek Warchoł
2014-07-08 13:39 GMT+02:00 Simon Albrecht simon.albre...@mail.de: The 2.18 changes document says that #'(Staff Accidental) and Staff.Accidental were now interchangeable, however if I replace it in the second function call, I get errors (unexpected . etc.). Is there a way to avoid this in the

Re: Dot-separated list as music function argument

2014-07-08 Thread Thomas Morley
2014-07-08 13:39 GMT+02:00 Simon Albrecht simon.albre...@mail.de: Hello everybody, I just wrote a music function to mark grobs as editorial addition by colouring them grey. See the code and an example: \version 2.19.8 ed = #(let ((string-or-list? (lambda (grob) (or (string? grob)

Re: Dot-separated list as music function argument

2014-07-08 Thread David Kastrup
Simon Albrecht simon.albre...@mail.de writes: Hello everybody, I just wrote a music function to mark grobs as editorial addition by colouring them grey. See the code and an example: \version 2.19.8 ed = #(let ((string-or-list? (lambda (grob) (or (string? grob) (list? grob)

Re: Dot-separated list as music function argument

2014-07-08 Thread David Kastrup
Janek Warchoł janek.lilyp...@gmail.com writes: 2014-07-08 13:39 GMT+02:00 Simon Albrecht simon.albre...@mail.de: The 2.18 changes document says that #'(Staff Accidental) and Staff.Accidental were now interchangeable, however if I replace it in the second function call, I get errors

Re: Dot-separated list as music function argument

2014-07-08 Thread Abraham Lee
On Tue, Jul 8, 2014 at 9:48 AM, David Kastrup d...@gnu.org wrote: Simon Albrecht simon.albre...@mail.de writes: Hello everybody, I just wrote a music function to mark grobs as editorial addition by colouring them grey. See the code and an example: \version 2.19.8 ed = #(let

Re: Dot-separated list as music function argument

2014-07-08 Thread David Kastrup
Thomas Morley thomasmorle...@gmail.com writes: use the predicate symbol-list-or-symbol? Below a working version, displaying some info as well: \version 2.19.8 ed = #(define-music-function (parser location grob mus) (symbol-list-or-symbol? ly:music?) ;; displaying some info:

Re: Dot-separated list as music function argument

2014-07-08 Thread Simon Albrecht
Many thanks for the responses, Thomas and David. And sorry for the messy code layout… I’ll see if I can change that. Yours, Simon Am 08.07.2014 15:50, schrieb Thomas Morley: 2014-07-08 13:39 GMT+02:00 Simon Albrecht simon.albre...@mail.de: Hello everybody, I just wrote a music function to