Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 155350 - x11-libs/gtksourceview syntax highlight for ebuilds and other gentoo files
Summary: x11-libs/gtksourceview syntax highlight for ebuilds and other gentoo files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-16 04:49 UTC by Leonardo Ferreira Fontenelle
Modified: 2007-10-01 23:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gentoo.lang (gentoo.lang,2.53 KB, application/xml)
2006-11-30 10:05 UTC, Leonardo Ferreira Fontenelle
Details
gentoo.lang for gtksourceview-2 (gentoo.lang,3.89 KB, application/xml)
2007-10-01 22:52 UTC, René 'Necoro' Neumann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Ferreira Fontenelle 2006-11-16 04:49:51 UTC
GtkSourceView is used by GTK+ applications for syntax highlight. It would be great to have "language-spec" (syntax highlight) for gentoo-related files, just as in nano, vim etc.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-11-17 14:06:22 UTC
Feel free to submit patches for individual ebuilds; nothing we could fix here. Thanks.
Comment 2 Leonardo Ferreira Fontenelle 2006-11-30 10:05:35 UTC
Created attachment 103051 [details]
gentoo.lang

This is a first try in a gentoo-specific .lang file.

Issues:
- It's usefullness should be mitigated because AFAIK there is no "ebuild" MIME type, so the user will have to choose manually the highlight mode;
- Somehow some styles don't get any color by default;
- No syntax highlight for /etc/portage/packages.* files.
Comment 3 Leonardo Ferreira Fontenelle 2006-11-30 10:07:04 UTC
Maybe this is enough?

The file should be installed in /usr/share/gtksourceview-1.0/language-specs/
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-11-30 16:19:50 UTC
(In reply to comment #3)
> Maybe this is enough?
> 
> The file should be installed in /usr/share/gtksourceview-1.0/language-specs/

By which ebuild?

Comment 5 Leonardo Ferreira Fontenelle 2006-12-01 00:06:33 UTC
I thougth on gtksourceview. gentoo-syntax is vim-specific, and gentoo.nanorc comes with nano itself.
Comment 6 René 'Necoro' Neumann 2007-02-12 17:53:08 UTC
Would be nice if this could be done :) I need the language-file - and having an own overlay-ebuild is not the best solution ;)
Comment 7 Leonardo Ferreira Fontenelle 2007-02-13 00:58:53 UTC
(In reply to comment #6)
> Would be nice if this could be done :)
I have one but it doesn't work 100%. E-mail me if you want it.
Comment 8 René 'Necoro' Neumann 2007-02-13 09:41:12 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Would be nice if this could be done :)
> I have one but it doesn't work 100%. E-mail me if you want it.

What do you mean? - An ebuild? - I already have a working one. Or a language file different from the one above?
Comment 9 Leonardo Ferreira Fontenelle 2007-02-13 13:56:06 UTC
(In reply to comment #8)
I have another .lang file, not much better than that. I have to get in touch with gtksourceview people to get this working.
Comment 10 René 'Necoro' Neumann 2007-02-13 15:52:21 UTC
(In reply to comment #9)
> I have another .lang file, not much better than that. I have to get in touch
> with gtksourceview people to get this working.

Hm .. the above one is working mostly as it should ;) - with "could be done" I meant: the language file should make its way into portage ;)
Comment 11 Rémi Cardona (RETIRED) gentoo-dev 2007-06-14 21:35:00 UTC
Has anyone contacted upstream about this? Thanks
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2007-09-02 17:55:46 UTC
Come on people :) This is a nice piece of work, don't let it bit rot here. Someone please find it a home in gedit's tarballs where it belongs.

Thanks
Comment 13 René 'Necoro' Neumann 2007-09-03 02:27:13 UTC
gedit is most probably the wrong place for it ... it should be in the gtksourceview ebuild ...
Comment 14 Rémi Cardona (RETIRED) gentoo-dev 2007-09-03 05:54:38 UTC
Indeed, my bad. Either way, it shouldn't be in our ebuilds, it should be in upstream. This is where it makes most sense.
Comment 15 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-09-19 19:02:09 UTC
Okay, I've added this to gtksourceview-1.8.5-r1.  Sorry for the delay...

Note that this .lang file won't work with gtksourceview-2.0, so this is limited to gnome 2.18 and below, until someone updates it to 2.0.
Comment 16 René 'Necoro' Neumann 2007-09-19 21:00:19 UTC
<dev-util/portatosourceview-2.16.1-r1 also contains the lang-file. Thus these versions should be blocked in the new ebuild.

(sorry for the inconvenience - forgot to mention it in here =|)
Comment 17 Mart Raudsepp gentoo-dev 2007-09-20 03:29:26 UTC
(In reply to comment #16)
> <dev-util/portatosourceview-2.16.1-r1 also contains the lang-file. Thus these
> versions should be blocked in the new ebuild.

It isn't portatosourceview's business to install things into /usr/share/gtksourceview-1.0 (which is gtksourceview's share file namespace), really. I wouldn't like to see any kind of blocks on some third party library in a GNOME library which is really their problem, not ours. Couldn't it have installed it in /usr/share/portatosourceview and load the syntax files from its own namespace in addition to gtksourceviews? If that's not possible, then maybe this lang file installing was justified, I give you that :)
Comment 18 René 'Necoro' Neumann 2007-09-20 04:27:58 UTC
(In reply to comment #17)
> Couldn't it have
> installed it in /usr/share/portatosourceview and load the syntax files from its
> own namespace in addition to gtksourceviews? If that's not possible, then maybe
> this lang file installing was justified, I give you that :)
To be honest: I don't know, whether this would be possible - I haven't thought about it. But you are right, it wasn't good practice ...  

Comment 19 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-09-21 16:57:47 UTC
It's alright, I blocked.  Serves them right, being blocked, for violating our namespace. :)
Comment 20 René 'Necoro' Neumann 2007-10-01 22:52:48 UTC
Created attachment 132345 [details]
gentoo.lang for gtksourceview-2

I've rewritten the gentoo.lang file for gtksourceview-2 as they have established a new language file format.

It now uses the predefined sh.lang instead of defining all shell things by itself. Unfortunatly the sh.lang is not the best one (for example ${VAR/foo/bar} is not highlighted correctly etc), but I hope that it will get enhanced by the gtksourceview guys =).

(Perhaps one can reopen the bug ;))
Comment 21 Mart Raudsepp gentoo-dev 2007-10-01 22:58:48 UTC
I think it makes sense to just create a new bug for gtksourceview2's case.
Comment 22 René 'Necoro' Neumann 2007-10-01 23:17:24 UTC
(In reply to comment #21)
> I think it makes sense to just create a new bug for gtksourceview2's case.
> 

Ok - done -> bug #194462
Note that I renamed the lang file to "ebuild.lang" in the other bug. :)