lilypond-user
[Top][All Lists]
Advanced

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

Re: fret-diagrams.scm:657:42: Wrong type: #f


From: Thomas Morley
Subject: Re: fret-diagrams.scm:657:42: Wrong type: #f
Date: Sun, 23 Aug 2015 12:25:49 +0200

2015-08-23 7:23 GMT+02:00 David Kastrup <address@hidden>:
>>> That begs the question on whether \fret-diagram should be ignoring
>>> embedded whitespace in order to allow for more readable formatting of
>>> the command string.
>> How about a check like:
>>
>>   (string-filter
>>     "s:2;h:5;
>>      6-x;
>>      5-x;
>>      4-4;
>>      3-2;
>>      2-3;
>>      1-x;"
>>     (char-set-union
>>       char-set:letter+digit
>>       char-set:punctuation))
>>
>> If no better suggestion, I'll put up a patch
>
> I'd really just filter on whitespace.  If people rely on arbitrary
> characters getting filtered out, we are not free to extend the syntax at
> some later point of time with more characters.

That was exactly my own concern.

I wasn't aware that char-set:whitespace contains more than #\space
(display char-set:whitespace)
-> #<charset {#\ht #\newline #\vt #\np #\cr #\space}>
I should have checked that before.

Then I'll go for
  (string-delete
    "whatever-string"
    char-set:whitespace)
upload the patch to Rietveld and post the link to the buglist.

Iiuc, that's the way to go for now.


Cheers,
  Harm



reply via email to

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