Summary: | Add mime-type for Octave files. | ||
---|---|---|---|
Product: | shared-mime-info | Reporter: | Paolo Maggi <paolo> |
Component: | freedesktop.org.xml | Assignee: | Jonathan Blandford <jrb> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Patch that was commited. |
Description
Paolo Maggi
2005-08-04 03:34:34 UTC
From http://bugzilla.gnome.org/show_bug.cgi?id=170604: "You can get on text/x-octave mime-type specification at http://hauberg.org/octave.xml. I guess this fixes the bug at freedesktop.org, but I don't have the time to loom into it. Perhaps somebody else does :-)" I think matlab files typically start with "function" or "%", but other than that it seems to be nontrivial to detect the difference between Objective-C and matlab files. Paolo pointed out on IRC that Objective-C files typically use the "#import" statement, but considering that especially in OSS environments source files typically start with comments specifying the license etc. I don't think this is strong enough. May be you can match: /* or // or #import or #include or @interface or @implementation for Objective-C I think this should match 99% of cases. See also http://en.wikipedia.org/wiki/Objective-C Created attachment 4229 [details] [review] Patch that was commited. I had to add various match patterns, but now detection seems to be quite reliable for the gnustep source code and some random matlab scripts I downloaded. I've added the "text/x-octave" alias for the matlab MIME type because according to google it is already used (for instance in gedit). Closing. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.