Re: LSR inconsistencies

2022-04-25 Thread Sebastiano Vigna
Il giorno sab 12 ott 2019 alle ore 12:08 Werner LEMBERG  ha
scritto:

> >
> >   https://lsr.di.unimi.it/list.php?type=snippet
> >
> > enter in the Title-box:
> >
> >   Template: integrating \startTextSpan and \stopTextSpan in a customized
> TextSpanner
> >
> > then click "Enable filter".  Nothing returns.
>

The problem lies in the quite quirky escape rules for LIKE:

"MySQL uses C escape syntax in strings (for example, \n to represent the
newline character). If you want a LIKE

string
to contain a literal \, you must double it. (Unless the NO_BACKSLASH_ESCAPES

SQL
mode is enabled, in which case no escape character is used.) For example,
to search for \n, specify it as \\n. To search for \, specify it as ;
this is because the backslashes are stripped once by the parser and again
when the pattern match is made, leaving a single backslash to be matched
against."

My comments claim that I knew them:

 /* Escapes in LIKE arguments are a bit complicated, as the backslash
  escapes BOTH the string literal AND the pattern. Apparently, at least
with
  MySQL, this escaping is still not sufficient, and AddSlashes should
  be preceded by substitution of "\" with "\\". */

However, the quote substitution was not there (for some reason I don't
remember; this code was written 19 years ago).

This has been fixed.


Re: LSR inconsistencies

2019-10-13 Thread Wols Lists
On 11/10/19 10:13, Thomas Morley wrote:
> According to wikipedia "etc", i.e. without full stop, is valid as
> well. Full stop removed.

Valid in common usage, maybe. If you're being a grammar pedant, it is an
abbreviation of "et cetera", so the full stop is required to indicate
the abbreviation (standard rules of grammar - characters that are left
out must be replaced by apostrophes or full stops).

Cheers,
Wol

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-12 Thread Sebastiano Vigna


> On 12 Oct 2019, at 12:08, Werner LEMBERG  wrote:
> 
>>  Template: integrating \startTextSpan and \stopTextSpan in a customized 
>> TextSpanner
>> 
>> then click "Enable filter".  Nothing returns.
> 
> Indeed.  Here, the *second* backslash in the title prevents results in
> the filter.  This looks like a bug in the LSR search engine.
> Sebastiano?

Mmmm... there's some weird escaping sorcery going on. If you look for 
\\startTextSpan it'll work. But yes, it should work with a single slash.

Actually, not. The indexed token is starttextspan. So the engine should 
tokenize '\' 'startTextSpan' and do its job. It's not. I'll have a look into it.

Ciao,

seba


___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-12 Thread Thomas Morley
Am Sa., 12. Okt. 2019 um 12:08 Uhr schrieb Werner LEMBERG :
>
> >> > Though the title contains backslashes, thus it's not searchable
> >> > in LSR.  Not sure what to do!?
> >>
> >> Hmm.  I just entered `\mark' in the LSR search box, and it *does*
> >> return snippets with backslashes in the title.  What exactly is the
> >> problem?
> >
> > From here:
> >
> >   https://lsr.di.unimi.it/list.php?type=snippet
> >
> > enter in the Title-box:
> >
> >   Template: integrating \startTextSpan and \stopTextSpan in a customized 
> > TextSpanner
> >
> > then click "Enable filter".  Nothing returns.
>
> Indeed.  Here, the *second* backslash in the title prevents results in
> the filter.

Not sure it's only the *second* backslash causing the problem.

Searching for
Template: integrating
returns correctly, but searching for
Template: integrating \startTextSpan
already fails.
Maybe the ":" is problematic as well?

Cheers,
  Harm

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-12 Thread Werner LEMBERG
>> > Though the title contains backslashes, thus it's not searchable
>> > in LSR.  Not sure what to do!?
>>
>> Hmm.  I just entered `\mark' in the LSR search box, and it *does*
>> return snippets with backslashes in the title.  What exactly is the
>> problem?
>
> From here:
>
>   https://lsr.di.unimi.it/list.php?type=snippet
>
> enter in the Title-box:
>
>   Template: integrating \startTextSpan and \stopTextSpan in a customized 
> TextSpanner
>
> then click "Enable filter".  Nothing returns.

Indeed.  Here, the *second* backslash in the title prevents results in
the filter.  This looks like a bug in the LSR search engine.
Sebastiano?

> Ditto for 
>
>   Aligning objects created with the \mark command

Yep.  Interestingly, it is possible to search for

  \mark

Thanks for adding the HTML tags!  Will check that tomorrow after a new
dump is available.


Werner

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-12 Thread Thomas Morley
Am Sa., 12. Okt. 2019 um 07:22 Uhr schrieb Werner LEMBERG :
>
> > Done.
>
> Thanks!
>
> >>   http://lsr.di.unimi.it/LSR/Item?id=857
> >
> > Done.
> >
> > Though the title contains backslashes, thus it's not searchable in
> > LSR.  Not sure what to do!?
>
> Hmm.  I just entered `\mark' in the LSR search box, and it *does*
> return snippets with backslashes in the title.  What exactly is the
> problem?

From here:
https://lsr.di.unimi.it/list.php?type=snippet
enter in the Title-box:
Template: integrating \startTextSpan and \stopTextSpan in a customized
TextSpanner
then click "Enable filter".
Nothing returns.

Some for #546 below (with and without -tags)

>
> By the way, Sebastiano has now added support for HTML tags in snippet
> titles.  For testing purposes I ask you to change, say in snippet
> #546
>
>   http://lsr.di.unimi.it/LSR/Item?id=546,
>
> the title from
>
>   Aligning objects created with the \mark command
>
> to
>
>   Aligning objects created with the \mark command
>
> so that HTML code is added to the LSR dump.

Done.

Cheers,
  Harm

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-11 Thread Werner LEMBERG
> Done.

Thanks!

>>   http://lsr.di.unimi.it/LSR/Item?id=857
>
> Done.
>
> Though the title contains backslashes, thus it's not searchable in
> LSR.  Not sure what to do!?

Hmm.  I just entered `\mark' in the LSR search box, and it *does*
return snippets with backslashes in the title.  What exactly is the
problem?

By the way, Sebastiano has now added support for HTML tags in snippet
titles.  For testing purposes I ask you to change, say in snippet
#546

  http://lsr.di.unimi.it/LSR/Item?id=546,

the title from

  Aligning objects created with the \mark command

to

  Aligning objects created with the \mark command

so that HTML code is added to the LSR dump.


Werner

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-11 Thread Thomas Morley
Am Mo., 7. Okt. 2019 um 09:16 Uhr schrieb Werner LEMBERG :

> Another minor issue: There are some snippets that have a full stop at
> the end of the title.  IMHO, a title should never have that.
>
>   http://lsr.di.unimi.it/LSR/Item?id=310

Done

>   http://lsr.di.unimi.it/LSR/Item?id=336

Title is "Merging rests automatically..."
The "..." makes no real sense, imho. "..." removed.

Done.

Nowadays merging rests is builtin, this snippet should be removed with
next LSR upgrade.

>   http://lsr.di.unimi.it/LSR/Item?id=737

Done.

>   http://lsr.di.unimi.it/LSR/Item?id=775

Title is "Affecting items only on the left or rigth of a linebreak
(BarLines, KeySignatures, Clefs etc.)"

According to wikipedia "etc", i.e. without full stop, is valid as
well. Full stop removed.

Done.

>   http://lsr.di.unimi.it/LSR/Item?id=857

Done.

Though the title contains backslashes, thus it's not searchable in LSR.
Not sure what to do!?

>   http://lsr.di.unimi.it/LSR/Item?id=1097

Done.

Cheers,
  HArm

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-09 Thread Werner LEMBERG
>> I don't see a corrected title in today's sqldump file.  [And in the
>> text body the word is written incorrectly, too.]
> 
> Maybe I forgot to actually _store_ it :(( Hopefully it'll works now.

It does, thanks!

>> Another minor issue: There are some snippets that have a full stop
>> at the end of the title.  IMHO, a title should never have that.
>> [...]
> 
> I'll have a look soon.

Thanks, too.


Werner

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-08 Thread Thomas Morley
Am Mo., 7. Okt. 2019 um 09:16 Uhr schrieb Werner LEMBERG :
>
>
> > #1033 can be found in the 2.19.83-snippets, but not in master. No
> >   clue.
> > #1069 was approved Thursday or Friday, can't be in the source until
> >   someone does a lsr-import
> > #1071 same as for #1069
>
> OK.  Thanks for checking.
>
> > #1083 title corrected, no clue why it's missing in master
>
> I don't see a corrected title in today's sqldump file.  [And in the
> text body the word is written incorrectly, too.]

Maybe I forgot to actually _store_ it :((
Hopefully it'll works now.

>
> Another minor issue: There are some snippets that have a full stop at
> the end of the title.  IMHO, a title should never have that.
>
>   http://lsr.di.unimi.it/LSR/Item?id=310
>   http://lsr.di.unimi.it/LSR/Item?id=336
>   http://lsr.di.unimi.it/LSR/Item?id=737
>   http://lsr.di.unimi.it/LSR/Item?id=775
>   http://lsr.di.unimi.it/LSR/Item?id=857
>   http://lsr.di.unimi.it/LSR/Item?id=1097

I'll have a look soon.

Cheers,
  Harm

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-07 Thread Werner LEMBERG

> #1033 can be found in the 2.19.83-snippets, but not in master. No
>   clue.
> #1069 was approved Thursday or Friday, can't be in the source until
>   someone does a lsr-import
> #1071 same as for #1069

OK.  Thanks for checking.

> #1083 title corrected, no clue why it's missing in master

I don't see a corrected title in today's sqldump file.  [And in the
text body the word is written incorrectly, too.]

Another minor issue: There are some snippets that have a full stop at
the end of the title.  IMHO, a title should never have that.

  http://lsr.di.unimi.it/LSR/Item?id=310
  http://lsr.di.unimi.it/LSR/Item?id=336
  http://lsr.di.unimi.it/LSR/Item?id=737
  http://lsr.di.unimi.it/LSR/Item?id=775
  http://lsr.di.unimi.it/LSR/Item?id=857
  http://lsr.di.unimi.it/LSR/Item?id=1097


Werner

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LSR inconsistencies

2019-10-05 Thread Thomas Morley
Am Sa., 5. Okt. 2019 um 10:11 Uhr schrieb Werner LEMBERG :
>
>
> I've found some LSR inconsistencies.  All of the following snippets
> are tagged as `docs' and approved but missing in the lilypond git
> repository (while present in the LSR bundle).
>
>   #1033 
> (customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly)
>   #1069 (tam-tam-example.ly)
>   #1071 (percussion-example.ly)
>   #1083 (appogiatura-or-grace-note-before-a-bar-line.ly)
>
> Wrong word in title, BTW: appogiatura → appoggiatura
>
>   #1084 (of-the-ubiquity-of-markup-objects.ly)
>   #1087 (adding-or-modifying-script-articulations.ly):
>
> It contains the line
>
>   %% Apparently this requires 2.19 or higher.
>
>
>Werner

Hi Werner,

#1033 can be found in the 2.19.83-snippets, but not in master. No clue.
#1069 was approved Thursday or Friday, can't be in the source until
someone does a lsr-import
#1071 same as for #1069
#1083 title corrected, no clue why it's missing in master
#1084 no clue why it's missing in master
#1087 does not work with 2.18.2, should have never been approved.
Unapproved now.

Cheers,
  Harm

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel