Am 16.01.2020 um 20:40 schrieb Allin Cottrell:
On Thu, 16 Jan 2020, Sven Schreiber wrote:
> path right here). Then I logged out and in again. Gedit then
offers a
> "gretl" entry among the recognized programming languages, but no syntax
> highlighting is done. Too bad.
I gave that a quick go myself but didn't get as far as you! No
highlighting, and not even any "gretl" entry in the language listing.
This was with gedit 3.34.1. BTW the path is
/usr/share/gtksourceview-3.0/language-specs .
OK, I managed to get it working now. The problems seem to be the
references to the (non-open-source) foreign languages Stata and perhaps
also Ox.
So I commented out everything related to that; in particular the
<context id="foreign-stata"... and <context id="foreign-ox"...
blocks,
along with the associated lines close to the end of the file:
<!-- <context ref="foreign-stata"/> -->
<context ref="foreign-python"/>
<!-- <context ref="foreign-ox"/> -->
This time I copied the file not to the system-wide location but to
~/.local/share/gtksourceview-3.0/language-specs, but that shouldn't
matter of course.
Then restarting Gedit gave me syntax-coloring for gretl .inp files alright!
I think we should send such a variant of gretl.lang upstream to the
Gtksourceview/Gnome people - but perhaps it should be called hansl.lang
instead?
About the file being recognized or not (Allin's problem): Perhaps it
helps if you install some gretl version in the standard way from your
Linux distro's packages. I suspect that that will make the MIME types
properly known somehow. Don't know yet if it continues to work after the
(outdated) official gretl distro package is uninstalled again.
Now I'm going to look for a GTK-based editor for Windows...
cheers
sven