lilypond-user
[Top][All Lists]
Advanced

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

Re: lilypond.lang (was Re: Lilypond GtkSourceView language definition)


From: Richard Shann
Subject: Re: lilypond.lang (was Re: Lilypond GtkSourceView language definition)
Date: Mon, 21 Aug 2017 11:09:24 +0100

On Sun, 2017-08-20 at 18:32 +0000, Jean-Philippe Combe wrote:
> Hi Richard,
> 
> 
> I used to try Denemo in the past but long time ago so my answer may
> not be that much accurate.

Well, despite strong development of Denemo over the last few years your
comments were entirely pertinent!
> 
> 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.

That worked fine, which gave me confidence that the lilypond.lang file
hadn't been corrupted in transmission. The reason I wanted to use a
local-to-denemo lilypond.lang file for Denemo is that I wouldn't want
the Denemo installation to override the user's own file (if such
existed), and I could easily imagine problems getting the syntax
highlighting working on non-gnome systems. 
The GtkSourceView allows you to set a search path for the .lang files
but it turns out that your .lang file relies in turn on some
default .lang file and so I needed to keep the standard search path and
just prepend the path to my copy of lilypond.lang inside Denemo. That
done it is now working nicely. Thank you very much!

Richard

> 
> 
> I hope this help.
> Regards
> 
> 
> JipE
> 
> Le dim. 20 août 2017 à 17:49, Richard Shann <address@hidden>
> a écrit :
> 
>         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=71
>         >
>         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
> 
> 





reply via email to

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