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

From: Max Nikulin <[email-masked]>
Date: Wed, 31 Jan 2024 23:30:44 +0700

On 26/01/2024 14:23, Eli Zaretskii wrote:
>> Max Nikulin writes:
> 
>>> 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?

Changing of `mm-display-org-inline' may be postponed. I am curious 
however if there are a lot of users overriding their /etc/mime.types to 
avoid application/vnd.lotus-organizer.

However I am unsure whether `mm-uu-org-src-code-block-extract' is used 
to send messages. If it purpose to decode received messages then the 
change should be safe. I had a hope to receive some comments from 
developers familiar with Emacs mail clients.

I have realized that I missed `mm-automatic-display' there "text/org" 
should be added similar to `mm-inline-media-tests'.