2015-08-23 7:23 GMT+02:00 David Kastrup <d...@gnu.org>:
>>> 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

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to