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 510032 - The code comment plugin does't work with Fortran 95
The code comment plugin does't work with Fortran 95
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
2.1.x
Other All
: Normal minor
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-16 23:32 UTC by rsachetto
Modified: 2008-01-17 17:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Apply this patch to allow code comment plugin work with Fortran 95 files (904 bytes, patch)
2008-01-17 14:23 UTC, rsachetto
rejected Details | Review
This is the patch to fix the problem properly. (427 bytes, patch)
2008-01-17 15:22 UTC, rsachetto
none Details | Review

Description rsachetto 2008-01-16 23:32:31 UTC
Please describe the problem:
The code comment plugin does't work with Fortran 95.
The problem is in the method get_metadata('line-comment-start') from gtksourceview2.Language.
This method returns None when the language is Fortran 95 and I think it should return ! (fortran line comment)

Steps to reproduce:
1. Select lines of a Fortran 95 source file
2. Try to comment (Ctrl+M)
3. 


Actual results:
Nothing happens

Expected results:
Comment the selected lines

Does this happen every time?
yes

Other information:
Comment 1 rsachetto 2008-01-17 14:23:53 UTC
Created attachment 103059 [details] [review]
Apply this patch to allow code comment plugin work with Fortran 95 files

This is a very ugly patch that provides a simple workaround to solve this problem.
Comment 2 Steve Frécinaux 2008-01-17 14:35:07 UTC
Hello,

If the bug is in a missing property in the gtksourceview lang file, you should definately fix the lang file, and not add a workaround for that in the plugin.

What you have to do is to add a line-comment-start property to fortran.lang. Take a look in c.lang or python.lang (for instance) to have an example.

The lang file is from gtksourceview and is in /usr/share/gtksourceview-2.0/language-specs. If you could provide a patch against the svn version of gsv we'd be glad to apply it straight away.
Comment 3 rsachetto 2008-01-17 15:22:42 UTC
Created attachment 103064 [details] [review]
This is the patch to fix the problem properly.

This is the patch to fix the problem properly adding the line <property name="line-comment-start">!</property> in /usr/share/gtksourceview-2.0/language-specs/fortran.lang
Comment 4 Yevgen Muntyan 2008-01-17 17:30:56 UTC
2008-01-17  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtksourceview/language-specs/fortran.lang: added comment
	property, patch by rsachetto@gmail.com (#510032).
	* gtksourceview/language-specs/docbook.lang: removed obsolete
	dtd line.