Bug 3240 - Improvment of Ada mime info needed.
Summary: Improvment of Ada mime info needed.
Status: RESOLVED MOVED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium enhancement
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-08 02:53 UTC by Preben Randhol
Modified: 2018-10-13 10:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Preben Randhol 2005-05-08 02:53:56 UTC
I noticed that the shared-mime-info contained this entry for the Ada95
programming language:

  <mime-type type="text/x-adasrc">
    <comment>Ada source code</comment>
    <comment xml:lang="de">Ada-Quelltext</comment>
    <comment xml:lang="el">&#928;&#951;&#947;&#945;&#943;&#959;&#962; &#954;&#974;&#948;&#953;&#954;&#945;&#962; Ada</comment>
    <comment xml:lang="fi">Ada-lähdekoodi</comment>
    <comment xml:lang="no">Ada-kildekode</comment>
    <glob pattern="*.adb"/>
    <glob pattern="*.ads"/>
  </mime-type>

This is a bit ackward. It would be like saying:

<mime-type type="text/x-csrc">
   <comment>C source code</comment>
   <glob pattern="*.c"/>
   <glob pattern="*.h"/>
</mime-type>

as .ads are the spec files of Ada (to some extent like .h for C).

To summarise the extensions used by GNAT:

   .ads     Spec file (containing the declarations)

   .adb     Body file (containing the code)

   .ali     Ada Library info (which contains additional information used
                              to check that an Ada program is consistent.
                              This is made when you compile a program)

   .adt     Ada Tree         (A tree file stores a snapshot of the
                              compiler internal data structures in the
                              very end of a successful compilation.  It
                              contains all the syntactical and semantic
                              information about the unit being compiled
                              and all the units upon which it depends
                              semantically. Some tools need tree files
                              to obtain this information.)


   .ada     Contains both Spec and Body (used by other compilers too)

So it would be nice if the freedesktop mime file could be updated to the
following for Ada:

  <mime-type type="text/x-adasrc">
    <comment>Ada source code</comment>
    <comment xml:lang="de">Ada-Quelltext</comment>
    <comment xml:lang="el">&#928;&#951;&#947;&#945;&#943;&#959;&#962; &#954;&#974;&#948;&#953;&#954;&#945;&#962; Ada</comment>
    <comment xml:lang="fi">Ada-lähdekoodi</comment>
    <comment xml:lang="no">Ada-kildekode</comment>
    <glob pattern="*.adb"/>
    <glob pattern="*.ada"/>
  </mime-type>

  <mime-type type="text/x-adaspec">
    <comment>Ada source code spec</comment>
    <comment xml:lang="no">Ada-kildekodespesifikasjon</comment>
    <glob pattern="*.ads"/>
  </mime-type>

  <mime-type type="text/x-adalibinfo">
    <comment>Ada library information</comment>
    <comment xml:lang="no">Ada-bibliotektinformasjon</comment>
    <glob pattern="*.ali"/>
  </mime-type>

  <mime-type type="text/x-adatree">
    <comment>Ada tree</comment>
    <comment xml:lang="no">Ada-tre</comment>
    <glob pattern="*.adt"/>
  </mime-type>

Regards,

Preben Randhol


Reference:

<URL:
http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gnat_ugn_unw/File-Naming-Rules.html#File-Naming-
Rules>

<URL:
http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gnat_ugn_unw/The-Ada-Library-Information-Files.h
tml#The-Ada-Library-Information-Files>

<URL: http://lgl.epfl.ch/teaching/programming01_02/doc/gnat_ug.html#SEC142>
Comment 1 Daniel Leidert 2008-02-05 15:45:18 UTC
There is a small problem. I cannot find any references for your proposal to use text/x-adaspec and similar MIME names. Only text/x-adasrc is referenced. Is there some agreement to use these names? Has it been discussed somewhere?

Independent from this. Accordingly to the C/C++ MIME types, I guess:

text/x-adaspec would be a sub-class of text/x-adasrc


IMHO shared-mime-info shouldn't introduce new MIME types, except there is some kind of consensus with a broader community. However, this is just my personal opinion.
Comment 2 Bastien Nocera 2011-05-25 05:44:41 UTC
Please follow the instructions at:
http://cgit.freedesktop.org/xdg/shared-mime-info/tree/HACKING#n31
for mime-type additions.
Comment 3 GitLab Migration User 2018-10-13 10:37:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/shared-mime-info/issues/24.


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.