After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 122127 - RFE: Spec file mode
RFE: Spec file mode
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
git master
Other Linux
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 373432 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-09-12 14:44 UTC by Jonathan Blandford
Modified: 2014-02-15 12:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed language definition file (4.86 KB, application/xml)
2006-08-19 19:15 UTC, Konstantin Ryabitsev
Details
Drop Version-Release rule (4.72 KB, application/xml)
2006-08-19 19:30 UTC, Konstantin Ryabitsev
Details

Description Jonathan Blandford 2003-09-12 14:44:45 UTC
[ From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=104316 ]

It would be nice to have a spec file set of highlighting for GtkSourceView.
Comment 1 Konstantin Ryabitsev 2006-08-19 19:15:51 UTC
Created attachment 71209 [details]
Proposed language definition file

This should do quite nicely. Take it from someone who has to build lots and lots of RPMs. :)
Comment 2 Paolo Borelli 2006-08-19 19:21:06 UTC
sweet! Thanks a lot... I should add random comments to blogs more often ;)

we have to wait the next release cycle to add it because it adds translatable strings and gnome is string-frozen for 2.16, but I'm pretty sure you can lobby fedora packagers to include it in the package.
Comment 3 Konstantin Ryabitsev 2006-08-19 19:30:37 UTC
Created attachment 71210 [details]
Drop Version-Release rule

The Version-Release rule was matching too much for little benefit, so I removed it.
Comment 4 Konstantin Ryabitsev 2006-08-19 19:32:09 UTC
Paolo: No problem, I'm glad to be help. :)
Comment 5 Paolo Borelli 2006-11-11 10:19:51 UTC
*** Bug 373432 has been marked as a duplicate of this bug. ***
Comment 6 Paolo Maggi 2006-12-13 13:27:16 UTC
The Konstantin's lang file looks good.
Only a few changes are required:

- re-indenting
- s/Spec Macros/Spec Macro
- s/Flow Conditionals/Flow (or better name, but singular)

The real problem is that is seems SPEC files are not recognized by the MIME system (aka shared-mime-info).

One of the requirements for the inclusion on a .lang file in GtkSourceView is that the mime type is officially part of the freedesktop mime
database.
Please, file a bug in bugs.freedesktop.org to add support for the text/x-rpm-spec mime type.
Comment 7 Julian Sikorski 2006-12-13 19:01:05 UTC
Done:
https://bugs.freedesktop.org/show_bug.cgi?id=9331
Comment 8 Paolo Borelli 2007-01-16 11:33:01 UTC
The mime type was added to shared-mime-info, I updated the lang file with paolo's suggestions and committed, thanks!


Leaving open since this needs to be still ported/commited to the gsv2 branch.
Comment 9 Paolo Borelli 2007-07-06 20:33:07 UTC
Since asking doesn't cost anything, Konstantin: do you by any chance feel like porting this lang file to the new file format?

for that you need gtksourceview-1.90.0 or above and gedit 2.19, they should be in rawhide as far as I know...
Comment 10 Paolo Borelli 2007-07-28 20:37:09 UTC
I bit the bullet and ported the file to the new format myself and while at it I made some improvements (like highlighting changelog entries only in the changelog sections).

If one wanted more advanced stuff could be done since some macros are allowed only in certail sections etc. Patched welcome :)


I tested the new lang with a bunch of fedora spec files and seems ok, but feedback with someone with a clue about RPM packaging is appreciated.