[Rd] shared-mime-info (PR#8278)

Paul Roebuck roebuck at mdanderson.org
Mon Nov 21 18:34:12 CET 2005


On Fri, 4 Nov 2005, Peter Dalgaard wrote:

> Vaidotas Zemlys writes:
>
> > On 04 Nov 2005 13:51:56 +0100, Peter Dalgaard wrote:
> >
> > > [SNIP RPM discussion]
>
> > 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.
>
>
> > 4. Rhistory files. File extension .Rhistory. Mimetype text/x-Rhistory
>
> OK.
>
> > 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.
>
> > 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.
>

What is the status of this problem report? Was a standard
set of MIME types ever established for the various R file
types? If so, where can I find them? The following seem
reasonable comparing against various sources, blended
with the above.


File types			MIME types
------------------------------	------------------------
.R				text/x-r,
                                text/x-r-source,
                                text/plain

.Rd				text/x-r-doc,
                                text/plain

.RData				application/x-r-data

.Rhistory			text/x-r-history,
                                text/plain

.Rout, .Rout.save, .Rout.fail	text/x-r-transcript,
                                text/plain

.Rprofile, Rprofile.site	text/x-r-profile,
				text/plain

.Renviron, Renviron		text/x-r-environ,
                                text/plain

I read long ago about suggestion for using dot-q for S
source but don't recall ever having seen it in the wild.
Peter mentioned dot-r as having been previously used for
Ratfor. It was also used by Rez on Mac OS. Also note that
dot-s is for assembly source.

Not sure if all of these even deserve MIME types. The first
three seem useful though the latter four could be dropped.

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)



More information about the R-devel mailing list