Re: lilypond.lang (was Re: Lilypond GtkSourceView language definition)
Jean-Philippe Combe <[email protected]> Sun, 20 Aug 2017 18:32:02 +0000
| Newsgroups | gmane.comp.gnu.lilypond.general,gmane.comp.gnome.devtools |
|---|---|
| Message-ID | <CAGo+q+UQPrNpQijJVJYzyRH7XOcsT5fdRiPMHfjR5w5=NVbAxg@mail.gmail.com> |
--===============7332838599577240429== Content-Type: multipart/alternative; boundary="001a113f467aae84490557339410" --001a113f467aae84490557339410 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Richard, I used to try Denemo in the past but long time ago so my answer may not be that much accurate. From your error message, it seems that you put my lilypond.lang in denemo directory. Language file describing the keyword, comment... have to be in gtksourceview-3.0/language-specs, either in your .local/share or in /usr/share. The directory you put the language file ($(PREFIX)/share/denemo/) is most likely the place for denemo other kind of file but not language-specs file :-) Place the file in $HOME/.local/share/gtksourceview-3.0/language-specs and try if you get lilypond coloring in gedit for example. If it works (which should be the case), try in denemo. If it works in gedit and not in denemo... Then the issue is denemo related. I hope this help. Regards JipE Le dim. 20 ao=C3=BBt 2017 =C3=A0 17:49, Richard Shann <[email protected].= com> a =C3=A9crit : > On Sat, 2017-08-19 at 13:10 +0000, Jean-Philippe Combe wrote: > > All, > > > > > > After searching for a while it seems that there is no GtkSourceView > > definition for Lylipong. > > As a consequence, I start to create a new one by myself. > > > > > > It supports comments, include, strings and keywords (based on the > > latest Lylipond 2.19 command list)... > > > > > > More informations are on my blog post as well as the file. > > https://www.aixin.fr/jipeblog/?p=3D71 > > > Jean-Philippe - > > I was very interested to see that you have created a GtkSourceView > definition for LilyPond as the Denemo front end also uses GtkSourceView > for its LilyPond window. So I tried to load your language definition > from a location in the Denemo package. I got the following type of > error: > > GtkSourceView - WARNING : in file $(PREFIX)/share/denemo/lilypond.lang: > style 'def:comment' not defined > GtkSourceView - WARNING : Failed to load > '$(PREFIX)/share/denemo/lilypond.lang': unable to resolve language 'def' > > I wonder if you might have some idea what the problem might be here? > > Richard > > -- Jean-philippe Combe --001a113f467aae84490557339410 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Richard,<div><br></div><div>I used to try Denemo in the= past but long time ago so my answer may not be that much accurate.</div><d= iv><br></div><div>From your error message, it seems that you put my lilypon= d.lang in denemo directory.=C2=A0</div><div>Language file describing the ke= yword, comment... have to be in gtksourceview-3.0/language-specs, either in= your .local/share or in /usr/share.</div><div>The directory you put the la= nguage file (<span style=3D"color:rgb(33,33,33)">$(PREFIX)/share/denemo/) i= s most likely the place for denemo other kind of file but not language-spec= s file :-)</span></div><div><span style=3D"color:rgb(33,33,33)"><br></span>= </div><div><span style=3D"color:rgb(33,33,33)">Place the file in=C2=A0</spa= n><font color=3D"#212121">$HOME/.local/share/gtksourceview-3.0/language-spe= cs and try if you get lilypond coloring in gedit for example.=C2=A0</font><= /div><div><font color=3D"#212121">If it works (which should be the case), t= ry in denemo.</font></div><div><font color=3D"#212121">If it works in gedit= and not in denemo... Then the issue is denemo related.</font></div><div><f= ont color=3D"#212121"><br></font></div><div><font color=3D"#212121">I hope = this help.</font></div><div><font color=3D"#212121">Regards</font></div><di= v><font color=3D"#212121"><br></font></div><div><font color=3D"#212121">Jip= E</font></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">Le=C2= =A0dim. 20 ao=C3=BBt 2017 =C3=A0=C2=A017:49, Richard Shann <<a href=3D"m= ailto:[email protected]">[email protected]</a>> a =C3=A9crit= =C2=A0:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8= ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, 2017-08-19 at 13:10= +0000, Jean-Philippe Combe wrote:<br> > All,<br> ><br> ><br> > After searching for a while it seems that there is no GtkSourceView<br= > > definition for Lylipong.<br> > As a consequence, I start to create a new one by myself.<br> ><br> ><br> > It supports comments, include, strings and keywords (based on the<br> > latest Lylipond 2.19 command list)...<br> ><br> ><br> > More informations are on my blog post as well as the file.<br> > <a href=3D"https://www.aixin.fr/jipeblog/?p=3D71" rel=3D"noreferrer" t= arget=3D"_blank">https://www.aixin.fr/jipeblog/?p=3D71</a><br> ><br> Jean-Philippe -<br> <br> I was very interested to see that you have created a GtkSourceView<br> definition for LilyPond as the Denemo front end also uses GtkSourceView<br> for its LilyPond window. So I tried to load your language definition<br> from a location in the Denemo package. I got the following type of<br> error:<br> <br> GtkSourceView - WARNING : in file $(PREFIX)/share/denemo/lilypond.lang:<br> style 'def:comment' not defined<br> GtkSourceView - WARNING : Failed to load<br> '$(PREFIX)/share/denemo/lilypond.lang': unable to resolve language = 'def'<br> <br> I wonder if you might have some idea what the problem might be here?<br> <br> Richard<br> <br> </blockquote></div><div dir=3D"ltr">-- <br></div><div class=3D"gmail_signat= ure" data-smartmail=3D"gmail_signature"><p dir=3D"ltr">Jean-philippe Combe<= /p> </div> --001a113f467aae84490557339410-- --===============7332838599577240429== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user --===============7332838599577240429==--