bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68687: [PATCH] Use text/org media type


From: Eli Zaretskii
Subject: bug#68687: [PATCH] Use text/org media type
Date: Fri, 26 Jan 2024 09:23:44 +0200

> Cc: emacs-orgmode@gnu.org
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Thu, 25 Jan 2024 15:10:27 -0800
> 
> Max Nikulin <manikulin@gmail.com> writes:
> 
> > Hi,
> >
> > I suggest to make the media type used for Org mode files consistent with
> > the one used by XDG https://gitlab.freedesktop.org/xdg/shared-mime-info
> > Currently Emacs has text/x-org, however "x-" prefix is not recommended
> > by IANA any more, see https://www.rfc-editor.org/rfc/rfc6648
> > "Deprecating the "X-" Prefix and Similar Constructs in Application
> > Protocols"
> >
> > Ideally somebody should file a request to IANA to register the text/org
> > media type.
> > https://www.iana.org/assignments/media-types/media-types.xhtml
> 
> Eli, Ihor, what do you think?

I agree, but since Ihor indicates that is impossible for now, we will
have to live with the current situation for at least the near future.

So I think we should install these changes, but please audit them
carefully to make sure we don't create any backward-compatibility
problems unnecessarily.  For example:

> > diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
> > index 3c7e3cbdf1a..b10da0c143a 100644
> > --- a/lisp/gnus/mm-uu.el
> > +++ b/lisp/gnus/mm-uu.el
> > @@ -394,7 +394,7 @@ (defun mm-uu-emacs-sources-extract ()
> >
> >  (defun mm-uu-org-src-code-block-extract ()
> >    (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
> > -             '("text/x-org" (charset . gnus-decoded))))
> > +             '("text/org" (charset . gnus-decoded))))
> >
> >  (defvar gnus-newsgroup-name)
> >
> > diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
> > index 5ff75deb4e6..900099433c4 100644
> > --- a/lisp/net/mailcap.el
> > +++ b/lisp/net/mailcap.el
> > @@ -989,7 +989,8 @@ (defvar mailcap-mime-extensions
> >      (".jpe"   . "image/jpeg")
> >      (".jpeg"  . "image/jpeg")
> >      (".webp"  . "image/webp")
> > -    (".org"   . "text/x-org"))
> > +    ;; May be overridden by application/vnd.lotus-organizer in 
> > /etc/mime.types.
> > +    (".org"   . "text/org"))

I'm not sure the removal of text/x-org in these two hunks is a good
idea: could it perhaps cause trouble to someone, e.g. if an email
message is sent from Emacs with this change and read by Emacs without
it?  (I don't use these packages, so I wouldn't know the answer.)  In
general, I'd prefer changes that add text/org without removing support
for text/x-org.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]