From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs,gmane.emacs.orgmode Subject: bug#68687: [PATCH] Use text/org media type Date: Wed, 31 Jan 2024 15:00:10 -0500 Message-ID: References: <6d94fff4-4d30-4121-bfd1-f267cb5b637c@gmail.com> <8734uqpvgn.fsf@tec.tecosaur.net> <49fa47c0-522a-46d7-ba0d-6e688aa26a8e@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26982"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-orgmode@gnu.org To: Max Nikulin , 68687@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 31 21:01:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rVGlt-0006r7-Pi for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Jan 2024 21:01:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVGlg-0006Nv-FR; Wed, 31 Jan 2024 15:01:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVGlQ-0006JZ-Ia for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2024 15:00:53 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVGlQ-000385-8D for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2024 15:00:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rVGlZ-00022Z-Sw for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2024 15:01:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Jan 2024 20:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68687-submit@debbugs.gnu.org id=B68687.17067312347792 (code B ref 68687); Wed, 31 Jan 2024 20:01:01 +0000 Original-Received: (at 68687) by debbugs.gnu.org; 31 Jan 2024 20:00:34 +0000 Original-Received: from localhost ([127.0.0.1]:39100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVGl7-00021b-I2 for submit@debbugs.gnu.org; Wed, 31 Jan 2024 15:00:34 -0500 Original-Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:52380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVGl0-00021I-Tk for 68687@debbugs.gnu.org; Wed, 31 Jan 2024 15:00:32 -0500 Original-Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-55eee4a042eso163703a12.0 for <68687@debbugs.gnu.org>; Wed, 31 Jan 2024 12:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706731211; x=1707336011; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=gPdgDNszz0wdPXBY3ancwp/GQH4rqb+XjPJ219bmrRE=; b=lMwG/RMkGXYsY4hOJazTxRMgYk/N+Aj+y4TNmcP91UlEVN/Hx2mgUyt+bR2rt9rYE3 0S8E3Y6NR4LyIZWyzzTUXpL4LMjmiClZI7MxsMO2/uFJkt8go5GBmwrewTWW/BekKa+n WRThVZbv1zA5uYg0anMjp3pR45ynz8LbYXoUbIVnM27lqVw8DzuhLmJ9SHgTuUIDAiKP BeaotJ/nv05XLGNbATiUSEvrQspeZPTiIXi8PnE6j8WqIJn+F20mg5YWut1r4nKwOpSS Uzr0pQCB6LeCE/J49Za+NZM0afeBv7/PsltAwJu4tpQ5V0rgwdbouZGRw3QmWZ4ssvrb yhIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706731211; x=1707336011; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gPdgDNszz0wdPXBY3ancwp/GQH4rqb+XjPJ219bmrRE=; b=wwEV5WGGh4KuDYciM4iAhIBQkQkj4iYIOQn9VRHBQp7H0IWV6DTVA90PF/K0qMNtB8 twY/sJQd7hzAi32eCjUQfUhARb498xLjZM33az/+zm5kYpKUsggD9Dp8+4TQBjosuf/I MSPVazmKw69uAtIP8+nVvKdZga0Lvz/AcK45hI91XXjKqZONE0mxigOuD7dgClAZijMn zv3CXCQqpe69JJQD6rkT/grdfYfjC1YuITMRhYEghsgo1zC1kz4CzpbSRHgTrVxKX8Jv Akb5peGydUeAWaoh7TAAbcOjeKcmyHietq4hIkeYAq97SN2Ru0poSoykpyKjjCgxkQ8o Coxg== X-Gm-Message-State: AOJu0YzflLc4utQ+15ty5OytvvqOpAVSyM24JKxKFzM9INCkwqCveVZT PHzsMMLjjnmBWEACa8avCHtK/r6Qwrdudqv7vFFgTKH/gtvgU1KPXgRshEGyoluh4g5UZ3FPr6+ AY5rFiegjDVxsJ+5fW3yrWFUiqe4= X-Google-Smtp-Source: AGHT+IHKvt3bVCPLyZjwSOt301VcdFk9Ns6CctXdf3banRfXP6M+k8dm/ToKHLtqZUFCc8a2QQYuP1xGm78uP4OqSJE= X-Received: by 2002:aa7:d858:0:b0:55f:832f:97da with SMTP id f24-20020aa7d858000000b0055f832f97damr1917774eds.23.1706731211100; Wed, 31 Jan 2024 12:00:11 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 31 Jan 2024 15:00:10 -0500 In-Reply-To: <49fa47c0-522a-46d7-ba0d-6e688aa26a8e@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279244 gmane.emacs.orgmode:159491 Archived-At: Max Nikulin writes: > From 8b71393625f11590e99896808bbd04ed83f7917e Mon Sep 17 00:00:00 2001 > From: Max Nikulin > 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 > > > 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