Aha... This is pretty weird, in light of the prescription on the website:
<<
Shared MIME database package
The core database and the update-mime-database program for extending
it are available from the [WWW]software pages.
If you have added types that should go in the common freedesktop.org
base list of types, you should create an enhancement request on
[WWW]the MIME bugtracker with your new XML file.
If the procedure is different, perhaps we should ask them what it is?
I don't think we have a real problem with maintaining a "freedesktop"
subdir somewhere in the sources since it appears to cover quite a wide
range of systems, but we don't seem to know what to do with it.
The procedure appears to be different between Linuxen: On SUSE, I get
viggo:~/>rpm -qf /usr/share/mime/text/x-texinfo.xml
shared-mime-info-0.15.cvs20050321-3
whereas FC4 has
[pd at janus ~]$ rpm -qf /usr/share/mime/text/x-texinfo.xml
file /usr/share/mime/text/x-texinfo.xml is not owned by any package
(and likewise 60-odd other .xml files). So it seems that SUSE collects
all this stuff in a single RPM and FC4 lets it be handled by the
post-install mechanism (on each package or by "exploding"
freedesktop.org.xml ??)
There you can find xml file for R scripts. I've made it from some
example. It is really only a proof of a concept. But it would not be
very difficult to produce xml files for mimetypes of all R related
files. We must only decide which R related files would benefit from
having mimetypes.
My proposal is
1. R source code, R scripts. Files with extensions .R, .r and others
(.q?, .s?, .S?). Mimetypes text/x-R, text/x-Rsrc
My inclination would be to stick with .R, possibly adding .r to guard
against Windows case-folding issues, but .r used to be Ratfor files.
.q/.s/.S are used by some people supporting both R and S-PLUS, but I
don't think they care how such files are displayed by Nautilus and
Konqueror...
2. R documentation files. File extension .Rd. Mimetype text/x-Rd
OK, modulo case-fold
3. RData files. File extension .RData, files which at beginning have
RDX2. Mimetype application/x-RData.
Why the RDX2 bit?? We do have .RDA from windows, too.
5. R transcript files from ESS/Emacs. File extension .Rt. Mimetype
text/x-Rtranscript
.Rout, please. Also .Rout.save and .Rout.fail. (And it's not just
ESS that creates them).
Also
6. Rprofile files .Rprofile or Rprofile.
The relevant xml code could be pushed upstream to end up in
freedesktop.org.xml, or it could be distributed with R linux package,
and installed into relevant subdirectory of /usr/share/mime. With a
bit more work the result could be, that people using for example
Nautilus (graphical Gnome browser) could see R related files displayed
with R logo, and clicking them could result in various appropriate
actions. For example for .RData R process could be iinvoked and
relevant .RData file could be loaded.
Some fun potential with gedit/Kate plugins too (ESS for the 21st
century anyone?)
I could write and test the xml code. But first we have to agree on
which files benefit from having mimetypes and how the mimetypes should
be named. Feel free to suggest.
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907