[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pygment regex question
From: |
David Kastrup |
Subject: |
Re: pygment regex question |
Date: |
Sat, 26 Nov 2022 16:38:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Jean Abou Samra <jean@abou-samra.fr> writes:
>> \version "2.23.10"
>>
>> \removeWithTag dyn \new Staff = upper {
>> \tag dyn <>\mf
>> \ottava -1
>> a4_boringly
>> }
>>
>> But of course there's always the danger of beginners tripping up on
>> this because they do not recognise the situations where #/'/"" are
>> still needed.
>
>
>
> FWIW, the last one
>
> a4_boringly
>
> is something I wouldn't do, since
>
> a_boringly
>
> does not work ("a_boringly" is interpreted as a pitch name).
Not really.
But I'd not use _boringly anyway since it seems counterintuitive that
_cis would not work.
> Personally, I tend to leave out # when possible for numbers,
> and also leave out #' for symbols when possible because it
> is not only shorter, but allows the syntax highlighting program
> to highlight them specially if they're built-ins, be it
> in Frescobaldi or in the documentation via Pygments.
> On the other hand, I usually use " marks (but not # when
> not required) around strings, because I might want to add
> spaces in them, and once again because it makes the syntax
> highlighting more useful.
Scheme has symbols and strings, and how to map LilyPond to either is
sometimes a tricky decision. In contrast, Lua has only interned
strings, so the mapping becomes a no-brainer. Sometimes not having a
choice can be helpful.
> For \new Staff = <this>, I never settled my mind :-) It
> expects a string, but then one could argue that accepting
> a symbol here would more sense.
<this> could be "cisis" while Staff couldn't.
--
David Kastrup
- Re: pygment regex question, (continued)
- Re: pygment regex question, Jean Abou Samra, 2022/11/25
- Re: pygment regex question, Werner LEMBERG, 2022/11/25
- Re: pygment regex question, Werner LEMBERG, 2022/11/26
- Re: pygment regex question, Lukas-Fabian Moser, 2022/11/26
- Re: pygment regex question, Jean Abou Samra, 2022/11/26
- Re: pygment regex question,Re: pygment regex question, Werner LEMBERG, 2022/11/26
- Re: pygment regex question,Re: pygment regex question, Jean Abou Samra, 2022/11/26
- Re: pygment regex question,
David Kastrup <=
- Re: pygment regex question, Lukas-Fabian Moser, 2022/11/26
- Re: pygment regex question, David Kastrup, 2022/11/26
- Color variables/symbols (was: pygment regex question), Lukas-Fabian Moser, 2022/11/26
- Re: Color variables/symbols, Werner LEMBERG, 2022/11/26
- Re: Color variables/symbols, Lukas-Fabian Moser, 2022/11/26
- Re: Color variables/symbols, Werner LEMBERG, 2022/11/26
- Re: Color variables/symbols, Luca Fascione, 2022/11/26
- Re: Color variables/symbols, Werner LEMBERG, 2022/11/26
- Re: Color variables/symbols, Luca Fascione, 2022/11/26
- Re: Color variables/symbols (was: pygment regex question), Lukas-Fabian Moser, 2022/11/26