From: Stefan Kangas <stefankangas@gmail.com> To: Max Nikulin <manikulin@gmail.com>, 68687@debbugs.gnu.org Cc: emacs-orgmode@gnu.org Subject: bug#68687: [PATCH] Use text/org media type Date: Wed, 31 Jan 2024 15:00:10 -0500 [thread overview] Message-ID: <CADwFkmnm2_ByuudxEvnApJKdLK-ij_5CsYae1GPz=584BFU-KQ@mail.gmail.com> (raw) In-Reply-To: <49fa47c0-522a-46d7-ba0d-6e688aa26a8e@gmail.com> Max Nikulin <manikulin@gmail.com> writes: > From 8b71393625f11590e99896808bbd04ed83f7917e Mon Sep 17 00:00:00 2001 > From: Max Nikulin <manikulin@gmail.com> > Date: Wed, 24 Jan 2024 21:16:28 +0700 > Subject: [PATCH] Use text/org media type > > Avoid "x-" prefix deprecated by rfc6648 for Org mode media type. > * lisp/net/mailcap.el (mailcap-mime-extensions): > * lisp/gnus/mm-uu.el (mm-uu-org-src-code-block-extract): Replace > text/x-org by text/org. > * lisp/gnus/mm-decode.el (mm-inline-media-tests): Allow text/org in > addition to text/x-org. > > Make media type defined for Org mode consistent with > <https://gitlab.freedesktop.org/xdg/shared-mime-info> > > See emacs-orgmode: Org mode MIME type. Sun, 21 Jan 2024 20:56:15 +0700. > https://list.orgmode.org/6d94fff4-4d30-4121-bfd1-f267cb5b637c@gmail.com > --- > lisp/gnus/mm-decode.el | 1 + > lisp/gnus/mm-uu.el | 2 +- > lisp/net/mailcap.el | 3 ++- > 3 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el > index f91755e967b..cae737e5a3e 100644 > --- a/lisp/gnus/mm-decode.el > +++ b/lisp/gnus/mm-decode.el > @@ -246,6 +246,7 @@ (defcustom mm-inline-media-tests > ("text/x-sh" mm-display-shell-script-inline identity) > ("application/javascript" mm-display-javascript-inline identity) > ("text/dns" mm-display-dns-inline identity) > + ("text/org" mm-display-org-inline identity) > ("text/x-org" mm-display-org-inline identity) > ("text/html" > mm-inline-text-html > 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")) It's been many moons since I last looked at email attachements in any detail, so I have some questions. 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? IOW, I'm asking if it is backwards-compatible to remove "text/org", in either direction. Will .org files be displayed in the same way as before or not on both new and old versions? I've noticed on my machine that .org files have been interpreted as application/vnd.lotus-organizer. Presumably that's due to some local configuration in /etc/mime.types on my distro. Is that correct? Is it documented somewhere how to override that system configuration in Emacs? 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. On the off chance that someone is opening such files from Emacs, they could just revert that locally. WDYT? > "An alist of file extensions and corresponding MIME content-types. > This exists for you to customize the information in Lisp. It is > merged with values from mailcap files by `mailcap-parse-mimetypes'.") > -- > 2.39.2
WARNING: multiple messages have this Message-ID (diff)
From: Stefan Kangas <stefankangas@gmail.com> To: Max Nikulin <manikulin@gmail.com>, 68687@debbugs.gnu.org Cc: emacs-orgmode@gnu.org Subject: Re: bug#68687: [PATCH] Use text/org media type Date: Wed, 31 Jan 2024 15:00:10 -0500 [thread overview] Message-ID: <CADwFkmnm2_ByuudxEvnApJKdLK-ij_5CsYae1GPz=584BFU-KQ@mail.gmail.com> (raw) In-Reply-To: <49fa47c0-522a-46d7-ba0d-6e688aa26a8e@gmail.com> Max Nikulin <manikulin@gmail.com> writes: > From 8b71393625f11590e99896808bbd04ed83f7917e Mon Sep 17 00:00:00 2001 > From: Max Nikulin <manikulin@gmail.com> > Date: Wed, 24 Jan 2024 21:16:28 +0700 > Subject: [PATCH] Use text/org media type > > Avoid "x-" prefix deprecated by rfc6648 for Org mode media type. > * lisp/net/mailcap.el (mailcap-mime-extensions): > * lisp/gnus/mm-uu.el (mm-uu-org-src-code-block-extract): Replace > text/x-org by text/org. > * lisp/gnus/mm-decode.el (mm-inline-media-tests): Allow text/org in > addition to text/x-org. > > Make media type defined for Org mode consistent with > <https://gitlab.freedesktop.org/xdg/shared-mime-info> > > See emacs-orgmode: Org mode MIME type. Sun, 21 Jan 2024 20:56:15 +0700. > https://list.orgmode.org/6d94fff4-4d30-4121-bfd1-f267cb5b637c@gmail.com > --- > lisp/gnus/mm-decode.el | 1 + > lisp/gnus/mm-uu.el | 2 +- > lisp/net/mailcap.el | 3 ++- > 3 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el > index f91755e967b..cae737e5a3e 100644 > --- a/lisp/gnus/mm-decode.el > +++ b/lisp/gnus/mm-decode.el > @@ -246,6 +246,7 @@ (defcustom mm-inline-media-tests > ("text/x-sh" mm-display-shell-script-inline identity) > ("application/javascript" mm-display-javascript-inline identity) > ("text/dns" mm-display-dns-inline identity) > + ("text/org" mm-display-org-inline identity) > ("text/x-org" mm-display-org-inline identity) > ("text/html" > mm-inline-text-html > 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")) It's been many moons since I last looked at email attachements in any detail, so I have some questions. 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? IOW, I'm asking if it is backwards-compatible to remove "text/org", in either direction. Will .org files be displayed in the same way as before or not on both new and old versions? I've noticed on my machine that .org files have been interpreted as application/vnd.lotus-organizer. Presumably that's due to some local configuration in /etc/mime.types on my distro. Is that correct? Is it documented somewhere how to override that system configuration in Emacs? 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. On the off chance that someone is opening such files from Emacs, they could just revert that locally. WDYT? > "An alist of file extensions and corresponding MIME content-types. > This exists for you to customize the information in Lisp. It is > merged with values from mailcap files by `mailcap-parse-mimetypes'.") > -- > 2.39.2
next prev parent reply other threads:[~2024-01-31 20:00 UTC|newest] Thread overview: 59+ 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:10 ` Stefan Kangas 2024-01-25 23:43 ` Ihor Radchenko 2024-01-25 23:43 ` Ihor Radchenko 2024-01-26 7:40 ` Eli Zaretskii 2024-01-26 7:40 ` Eli Zaretskii 2024-01-26 14:00 ` Ihor Radchenko 2024-01-26 14:00 ` Ihor Radchenko 2024-01-26 10:52 ` Max Nikulin 2024-01-30 19:39 ` Stefan Kangas 2024-01-30 19:39 ` Stefan Kangas 2024-01-30 20:34 ` Ihor Radchenko 2024-01-30 20:34 ` Ihor Radchenko 2024-01-26 7:23 ` Eli Zaretskii 2024-01-26 7:23 ` Eli Zaretskii 2024-01-26 10:39 ` Max Nikulin 2024-01-26 12:22 ` Eli Zaretskii 2024-01-31 16:30 ` Max Nikulin 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:35 ` Max Nikulin 2024-01-28 16:47 ` Eli Zaretskii 2024-01-28 16:47 ` Eli Zaretskii 2024-01-30 3:56 ` Richard Stallman 2024-01-30 3:56 ` Richard Stallman 2024-01-30 12:13 ` Ihor Radchenko 2024-01-30 12:13 ` Ihor Radchenko 2024-01-30 17:12 ` bug#68687: Org mode code evaluation (was: bug#68687: [PATCH] Use text/org media type) Mike Kupfer 2024-01-30 17:12 ` Mike Kupfer 2024-01-30 17:51 ` Ihor Radchenko 2024-02-02 3:38 ` bug#68687: " Richard Stallman 2024-02-02 3:38 ` Richard Stallman 2024-02-02 4:58 ` bug#68687: Org mode code evaluation Max Nikulin 2024-02-02 4:58 ` 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-30 17:51 ` Ihor Radchenko 2024-01-31 16:18 ` bug#68687: [PATCH] Use text/org media type Max Nikulin 2024-01-31 16:18 ` Max Nikulin 2024-01-31 16:32 ` Ihor Radchenko 2024-01-31 16:32 ` Ihor Radchenko 2024-02-02 3:40 ` Richard Stallman 2024-02-02 7:15 ` Eli Zaretskii 2024-02-02 7:15 ` Eli Zaretskii 2024-02-02 3:40 ` Richard Stallman 2024-01-30 12:52 ` Eli Zaretskii 2024-01-30 12:52 ` Eli Zaretskii 2024-01-27 3:38 ` Richard Stallman 2024-01-31 20:00 ` Stefan Kangas [this message] 2024-01-31 20:00 ` Stefan Kangas 2024-02-01 10:40 ` Max Nikulin 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 2024-02-02 7:09 ` bug#68687: [PATCH] " Stefan Kangas
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 * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CADwFkmnm2_ByuudxEvnApJKdLK-ij_5CsYae1GPz=584BFU-KQ@mail.gmail.com' \ --to=stefankangas@gmail.com \ --cc=68687@debbugs.gnu.org \ --cc=emacs-orgmode@gnu.org \ --cc=manikulin@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: linkBe 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 external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.