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 Subject: bug#68687: [PATCH] Use text/org media type Date: Thu, 1 Feb 2024 23:09:42 -0800 Message-ID: References: <6d94fff4-4d30-4121-bfd1-f267cb5b637c@gmail.com> <8734uqpvgn.fsf@tec.tecosaur.net> <49fa47c0-522a-46d7-ba0d-6e688aa26a8e@gmail.com> <4fbab9e6-a538-4fed-8148-ec3bb35a9107@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="3748"; 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 Feb 02 08:11:02 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 1rVnhW-0000se-8E for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Feb 2024 08:11:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVnhN-0003ma-C0; Fri, 02 Feb 2024 02:10:53 -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 1rVnhL-0003m7-CU for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 02:10:51 -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 1rVnhL-0003yP-3f for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 02:10:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rVnhV-0001A5-KF for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 02:11: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: Fri, 02 Feb 2024 07: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.17068578034337 (code B ref 68687); Fri, 02 Feb 2024 07:11:01 +0000 Original-Received: (at 68687) by debbugs.gnu.org; 2 Feb 2024 07:10:03 +0000 Original-Received: from localhost ([127.0.0.1]:43498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVngY-00017t-F8 for submit@debbugs.gnu.org; Fri, 02 Feb 2024 02:10:02 -0500 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:56823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVngW-00017C-CK for 68687@debbugs.gnu.org; Fri, 02 Feb 2024 02:10:01 -0500 Original-Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2cf4fafa386so22953451fa.1 for <68687@debbugs.gnu.org>; Thu, 01 Feb 2024 23:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706857784; x=1707462584; 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=YYzK/Og6nfmS7wfu4b3xg3yKAmy5TFKlrosR/FULk5w=; b=URDuo5Wj6+lDQkBr3yqSro9h1OsLXr1jLq7egnN3lYhsRykOAQn0ra78qAwLY+kLHC lVgcej0yop6ViEZLpukMfbv939F6DyT2X//kI9dehBJzDqKV4Ngm+mEI1tJMYlpz/f5v XSVZPtbC8TT5rXGGIvLO1/fVSTmAdZuh/e6zA+thOYtPWFmLm2XYN6XgBR8+Vj1zwnUl QtuiQ/vjkQ/Lz7PNcix7gu2aADHrSE5Yp6STlBDzrziWtbJ/vN0LvN45fLbd1n+5ooow Xp6u2x0mqXKhTvPFqcIfh2CuAXtKyaqKwFmjLGbmxY7CVo1TTnPPK0x+4L3Oc8oIMbVY F5VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706857784; x=1707462584; 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=YYzK/Og6nfmS7wfu4b3xg3yKAmy5TFKlrosR/FULk5w=; b=vK/MwQ+g9vuHjQDrRSRdHRxotqS5x+WhNwPQQLEdbILn7F41EbQAScLvj7LCJUK+ze G6DHXFJJnI91dcyLliSK4rr+69NNmSPaGsxwbKTlfNTMU3QVL5coJslY1JYaXC8Sl0fw c0hq0AhunCL9/FEjJPq6ZU+Z90+QlymZJVPW7GydUg7uQRjn4282CtatKrvJvcruR8nT q6z0XYeyr6Vr4zpPNbSi4zqdQg0TQibfJ2NfrbYm7Rj17NrZY6msTogBUwyxzenyzJfd evfa6GaLtA8mQXfXat5UIFRtrQJSOvgAelge2M07wA2gvuVUw6SxivRYZt0eXiMR7IyW tgvA== X-Gm-Message-State: AOJu0YySkTsq0ApdtfIoE5xKqgqZvbGVpx4jtMvSanmtUMJ2BPiMxW2J Tl+/Q/bWcYqx+DD1hEGrv6IelSxieox8fshkkNRXGs0We2o8mhd1ZMe/m7lOAWpnIBz+6bjeKwz xc3hujhoxBG6agf59w1SViK4pjjI= X-Google-Smtp-Source: AGHT+IHgRvgGgWfn48a6tqek7GgEHT0QJB4rZfjmRNFjzgKioVZzidCchalRPQPb9GGoYDnPxz/4deyalc0IxzKBDsY= X-Received: by 2002:a2e:2a03:0:b0:2d0:8982:e1bc with SMTP id q3-20020a2e2a03000000b002d08982e1bcmr276226ljq.28.1706857783399; Thu, 01 Feb 2024 23:09:43 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 1 Feb 2024 23:09:42 -0800 In-Reply-To: <4fbab9e6-a538-4fed-8148-ec3bb35a9107@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:279320 Archived-At: Max Nikulin writes: > 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")) > > 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. So old mailers will still use "Content-Type: text/x-org", and it is therefore premature to remove that entry. I'm not sure about the urgency in starting to send out "text/org" at this stage. It will just lead to old versions of Emacs displaying org attachments incorrectly in more cases, I think? So why not: 1. Add support for _receiving_ "text/org" in Emacs 30 2. Wait with _sending_ "text/org" until it is formally accepted by IANA ? In Emacs <29, perhaps Org mode could update the relevant variables to include "text/org", too? >> 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. Is that documented somewhere in our documentation? >> 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. Yes, that would be best. While waiting for that to happen, why not do what I proposed (override it unconditionally in Emacs)? It should be more useful for Emacs users, if nothing else. Taking a step back, how sure are we that IANA will accept this? Do they typically accept taking over a previous designation?