emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>, 68687@debbugs.gnu.org
Cc: emacs-orgmode@gnu.org
Subject: Re: bug#68687: [PATCH] Use text/org media type
Date: Thu, 1 Feb 2024 17:40:21 +0700	[thread overview]
Message-ID: <4fbab9e6-a538-4fed-8148-ec3bb35a9107@gmail.com> (raw)
In-Reply-To: <CADwFkmnm2_ByuudxEvnApJKdLK-ij_5CsYae1GPz=584BFU-KQ@mail.gmail.com>

On 01/02/2024 03:00, Stefan Kangas wrote:
> Max Nikulin writes:
>> +++ 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"))
> 
> With this patch, what happens if someone is emailing using an old
> version of Emacs?  Does that matter, or is this stuff based only on the
> file ending?

Org files are plain text files and have no specific signature that would 
allow tools like libmagic to unambiguously distinguish them from other 
text files. Rare files have explicit "# -*- mode: org-mode -*-" header. 
So there is no other way besides file name extensions when a message is 
composed or a file is served by a HTTP server. Clients should rely on 
the Content-Type header.

Old mailers will continue sending messages with 
application/vnd.lotus-organizer, text/x-org, or text/org media type.

> IOW, I'm asking if it is backwards-compatible to remove
> "text/org", in either direction.

I suggest to use text/org instead of text/x-org.

> Will .org files be displayed in the
> same way as before or not on both new and old versions?

I do not see a better way toward consistency in respect to the media type.

> I've noticed on my machine that .org files have been interpreted as
> application/vnd.lotus-organizer.

 From my point of view, it is a reason to not bother concerning removing 
of "text/x-org" from `mailcap-mime-extensions'

> Presumably that's due to some local
> configuration in /etc/mime.types on my distro.  Is that correct?

There are 2 projects maintaining /etc/mime.types, they follows IANA 
registry, so have application/vnd.lotus-organizer. XDG shared-mime-info 
project (another media types DB, not /etc/mime.types) has text/org.

> Is it
> documented somewhere how to override that system configuration in Emacs?

Create ~/.mime.types. Debian's variant suggests it in the 
/etc/mime.types header.

> But thinking about this more, why not do that unconditionally for users?
> Lotus Organizer is dead, long gone, and not really relevant to anyone,
> certainly not to the overwhelming majority of Emacs users.

Ideally text/org should be registered in IANA, so all applications could 
use consistent mapping. Prerequisites have been discussed already.


  reply	other threads:[~2024-02-01 10:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21 13:56 Org mode MIME type Max Nikulin
2024-01-21 15:11 ` Timothy
2024-01-22 16:21   ` Max Nikulin
2024-01-24 14:43   ` bug#68687: [PATCH] Use text/org media type Max Nikulin
2024-01-25 23:10     ` Stefan Kangas
2024-01-25 23:43       ` Ihor Radchenko
2024-01-26  7:40         ` Eli Zaretskii
2024-01-26 14:00           ` Ihor Radchenko
2024-01-30 19:39         ` Stefan Kangas
2024-01-30 20:34           ` Ihor Radchenko
2024-01-26  7:23       ` Eli Zaretskii
2024-01-31 16:30         ` Max Nikulin
2024-01-27  3:38       ` Richard Stallman
2024-01-28 16:35         ` Max Nikulin
2024-01-28 16:47           ` Eli Zaretskii
2024-01-30  3:56             ` Richard Stallman
2024-01-30 12:13               ` Ihor Radchenko
2024-01-30 17:12                 ` Org mode code evaluation (was: bug#68687: [PATCH] Use text/org media type) Mike Kupfer
2024-01-30 17:51                   ` Ihor Radchenko
2024-02-02  3:38                     ` bug#68687: " Richard Stallman
2024-02-02  4:58                       ` bug#68687: Org mode code evaluation Max Nikulin
2024-02-02 16:10                       ` bug#68687: Org mode code evaluation (was: bug#68687: [PATCH] Use text/org media type) Ihor Radchenko
2024-01-31 16:18                 ` bug#68687: [PATCH] Use text/org media type Max Nikulin
2024-01-31 16:32                   ` Ihor Radchenko
2024-02-02  3:40                 ` Richard Stallman
2024-02-02  7:15                   ` Eli Zaretskii
2024-01-30 12:52               ` Eli Zaretskii
2024-01-31 20:00     ` Stefan Kangas
2024-02-01 10:40       ` Max Nikulin [this message]
2024-02-02  7:09         ` Stefan Kangas
2024-02-02 16:28           ` bug#68687: [PATCH v2] " Max Nikulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4fbab9e6-a538-4fed-8148-ec3bb35a9107@gmail.com \
    --to=manikulin@gmail.com \
    --cc=68687@debbugs.gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).