From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Org mode MIME type
Date: Sun, 21 Jan 2024 20:56:15 +0700 [thread overview]
Message-ID: <6d94fff4-4d30-4121-bfd1-f267cb5b637c@gmail.com> (raw)
Hi,
I have been surprised when I got
xdg-mime query filetype /tmp/test.org
text/org
for a following file
cat /tmp/test.org
* A section
An example of Org mode file
It is pleasant, however shouldn't it be "text/x-org", not just
"text/org"? (I am against "application/*" variants since it is a text
based format).
1. The MIME type has not registered in IANA, so the "x-" prefix should
be preferable
<https://www.iana.org/assignments/media-types/media-types.xhtml>
2. It would be in line with
emacs -Q -l mailcap --batch \
--eval '(prin1 (assoc ".org" mailcap-mime-extensions))' \
--eval '(terpri)'
(".org" . "text/x-org")
I have not found any discussion of the following commit that is a part
of shared-mime-info 2.2 release:
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/4dd4fd5cb54d03cb73102c6f1f674675b5186e47
2021-05-27T20:27:31Z David Faure adding org-mode
> <mime-type type="text/org">
> <comment>Org-mode file</comment>
> <sub-class-of type="text/plain"/>
> <glob pattern="*.org"/>
> </mime-type>
I think, "type" should be "text/x-org" here, perhaps "text/org" alias
may be added to this entry to not break workflow of those who already
have text/org e.g. in mail messages.
By the way, shouldn't description be "Org mode file" without a dash? See
org-mode/doc/Documentation_Standards.org
> - Prefer "Org mode" to "Org-mode" or "org-mode". This is simply
> because it reflects an existing convention in [[info:emacs:Top][The Emacs Manual]] which
> consistently documents mode names in this form - "Text mode",
> "Outline mode", "Mail mode", etc.
Actually it is more complicated:
file --mime /tmp/test.org
/tmp/test.org: text/plain; charset=us-ascii
It is expected, since "file" relies solely on file signatures (magic
bytes) and text files have no specific ones. A more perplexing result is
emacs -Q -l mailcap --batch \
--eval '(prin1 (mailcap-file-name-to-mime-type "/tmp/test.org"))' \
--eval '(terpri)'
"application/vnd.lotus-organizer"
in agreement with run-mailcap that reads /etc/mime.types
see --norun /tmp/test.org
Error: no "view" mailcap rules found for type
"application/vnd.lotus-organizer"
I am unsure if it is possible to convince maintainers of
https://salsa.debian.org/debian/media-types
and
https://pagure.io/mailcap
to change mapping of .org originating from IANA, but certainly it would
be easier for text/x-org than for text/org. IBM seized support of Lotus
Organizer many years ago and only early versions around 1992 used .org
suffix, later ones used or2...or6 extensions.
In the case of Emacs text/org was replaced by text/x-org:
https://list.orgmode.org/87aaiufaoj.fsf@gmail.com/T/#u
Subject: Re: Adding a new text/org mime type
Date: Fri, 21 Jan 2011 18:06:52 +0100
From: "Štěpán Němec"
Should we ask maintainers of shared-mime-info to update the Org mode entry?
next reply other threads:[~2024-01-21 13:57 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-21 13:56 Max Nikulin [this message]
2024-01-21 15:11 ` Org mode MIME type 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
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=6d94fff4-4d30-4121-bfd1-f267cb5b637c@gmail.com \
--to=manikulin@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).