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: Thu, 25 Jan 2024 15:10:27 -0800 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="40743"; 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 Fri Jan 26 00:11:08 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 1rT8sF-000ARr-Ty for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Jan 2024 00:11:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rT8s5-0000Cv-W6; Thu, 25 Jan 2024 18:10:58 -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 1rT8s4-0000Cg-6X for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 18:10:56 -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 1rT8s3-0005T0-TN for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 18:10:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rT8sA-0004yg-0F for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 18:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jan 2024 23:11: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.170622424319110 (code B ref 68687); Thu, 25 Jan 2024 23:11:01 +0000 Original-Received: (at 68687) by debbugs.gnu.org; 25 Jan 2024 23:10:43 +0000 Original-Received: from localhost ([127.0.0.1]:49572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT8rr-0004y9-04 for submit@debbugs.gnu.org; Thu, 25 Jan 2024 18:10:43 -0500 Original-Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:48531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT8ro-0004xv-Er for 68687@debbugs.gnu.org; Thu, 25 Jan 2024 18:10:41 -0500 Original-Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40eacb4bfa0so54198695e9.1 for <68687@debbugs.gnu.org>; Thu, 25 Jan 2024 15:10:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706224228; x=1706829028; 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=0zUSkeZjd/i19VwiSoMr8yNdE/6heU9C42DngNtMnz8=; b=U+JuWMURYeFleXyWFbSfWwEDUZIl9c1VFak//M5XXFMCtKMYknnYitxTn/jWTew1QH 7AWD8zQaHDxVFw3mjUQlfr5X+Bg2N3e3HoXNPpwuz6ysaSKtVaBREetknrso3eBtfy5C i/IlnQf+8BlpQmAA857BtofjB5JPMYlRYxUzN/NuDXJqE9pIOYMsipIOnWzGMOD4Z/2C R4MWY0slaHbfSIZOAUDjeWAWji/6/N21kCRjA0T9XOMQ3uID3b9/ZDqoyBr9N3DQ51Q3 s+y2+RCa4bcC2r34E7DGyGwDgwjhqbBF94rvxyZfUTlLd7PNWEsmG57Oq/1gmRSQXfqF Cjxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706224228; x=1706829028; 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=0zUSkeZjd/i19VwiSoMr8yNdE/6heU9C42DngNtMnz8=; b=CKwjZAtSmpYi9DXl7epXwt+l9WHay4lubTd+mhy3C7Pzg1EX2bR5RtqF/mDSWMNZ2m 6KzedduLf6qEgQg7bagHupIYyAl9irXGaEN/dv7TClm5RCBY5FD3DcUUVSGE+z2w3QwA hETSzcbBg8+YNbCNQoEsZG0RhORsav6MnacD1+7oyZOEhqLyzUwFVGziPUszlXCIoixh HJsta+0LsAhGkI3LXKEMDBi4l4Dq9fd9/BQIX24KJFvxFaEbIOxNd+M/YXGyt4wCj63D 1lkP6lSJz07qF0qYkN+CEW7GRJn0YW2+5ZZLJ+RTTNIO/1DiHyWDvIKgziMzSxKnl4vN yXdw== X-Gm-Message-State: AOJu0YzygBym+5ecltTl71Za9L3eqRiB9/PdT7Ay/EPwRbbfNNP0NFze EYCM4xDOxb7uALa0pwwRMOF03rkNshYNZ3vpmfExjP+jwGzigUHcHARdFh2cy5SncQl9Qki4Fj1 ZobVwaWvg4qyOGw1hy+PpAb/FMYk= X-Google-Smtp-Source: AGHT+IEwuVLJLkimJwOon7zgOYvOsjffyQII4uBxbIOVgT3fNE8VlAYrSremOEfEWPM32B7JfNc+aIuCYR8D9T5Twjc= X-Received: by 2002:a05:600c:6b01:b0:40e:8cc2:7492 with SMTP id jn1-20020a05600c6b0100b0040e8cc27492mr254886wmb.80.1706224228303; Thu, 25 Jan 2024 15:10:28 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 25 Jan 2024 15:10:27 -0800 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:278876 gmane.emacs.orgmode:159337 Archived-At: Max Nikulin writes: > Hi, > > I suggest to make the media type used for Org mode files consistent with > the one used by XDG https://gitlab.freedesktop.org/xdg/shared-mime-info > Currently Emacs has text/x-org, however "x-" prefix is not recommended > by IANA any more, see https://www.rfc-editor.org/rfc/rfc6648 > "Deprecating the "X-" Prefix and Similar Constructs in Application > Protocols" > > Ideally somebody should file a request to IANA to register the text/org > media type. > https://www.iana.org/assignments/media-types/media-types.xhtml Eli, Ihor, what do you think? > However I have no idea concerning a conflict due to the .org file name > suffix. It was used in the past by early versions of Lotus Organizer. > https://www.iana.org/assignments/media-types/application/vnd.lotus-organizer > > I am unsure if gnus-related code should be committed to some other > repository at first. I am not a gnus user, so I do not mind if an > alternative change will be committed. > > See also > 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 > 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")) > "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