From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Nikulin Newsgroups: gmane.emacs.bugs,gmane.emacs.orgmode Subject: bug#68687: [PATCH] Use text/org media type Date: Thu, 1 Feb 2024 17:40:21 +0700 Message-ID: <4fbab9e6-a538-4fed-8148-ec3bb35a9107@gmail.com> 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; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27715"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-orgmode@gnu.org To: Stefan Kangas , 68687@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 01 11:41:15 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 1rVUVN-00070B-TS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Feb 2024 11:41:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVUV6-0000bg-NT; Thu, 01 Feb 2024 05:40:56 -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 1rVUV3-0000bD-1F for bug-gnu-emacs@gnu.org; Thu, 01 Feb 2024 05:40: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 1rVUV2-0006AL-PT for bug-gnu-emacs@gnu.org; Thu, 01 Feb 2024 05:40:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rVUVC-0000bk-PQ for bug-gnu-emacs@gnu.org; Thu, 01 Feb 2024 05:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Max Nikulin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Feb 2024 10:41:02 +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.17067840412292 (code B ref 68687); Thu, 01 Feb 2024 10:41:02 +0000 Original-Received: (at 68687) by debbugs.gnu.org; 1 Feb 2024 10:40:41 +0000 Original-Received: from localhost ([127.0.0.1]:40334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVUUq-0000at-Rv for submit@debbugs.gnu.org; Thu, 01 Feb 2024 05:40:41 -0500 Original-Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:61626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVUUp-0000aa-95 for 68687@debbugs.gnu.org; Thu, 01 Feb 2024 05:40:39 -0500 Original-Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-51109060d6aso1053315e87.2 for <68687@debbugs.gnu.org>; Thu, 01 Feb 2024 02:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706784023; x=1707388823; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=KaknQWzm/mKh4Halj8pifv1pvXi4xE2y4mEjzawAKCU=; b=YjrDMYXE6pLLl7pm83MgaH7Vj7cWVEpzedlwXNEvJLhcLrXtvs3Mx62pyjap3AChep F0VJsYdp3s03zoTmgkZFKBhb4xTDxicD6M+/JANFsbBAdiD6Qb8jUe28KdyZzHuMhe1n Py5s5KxzKHngl2ket4GvWUSMv9orte2q9v/BeQxGuVFgS/08IxqnTyZ9R/4hlDogrDM9 x+/qWQ9/SWyMO0th1ucxB5LlZ4jpCzHgolGdf2o7QpRfVPQewC2avdZ/k6sN1N1jfoMC Pm4YNvrAccbGkFQZLSGl0djZ1ADzUS+NM4ds/LMRafslzrBEFrlDLLOdrVCqqabqfDTh 9Umg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706784023; x=1707388823; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KaknQWzm/mKh4Halj8pifv1pvXi4xE2y4mEjzawAKCU=; b=VvYI1xps98Z7FIf7/O1oDPcY9T3PYuP4sELHtRllGyAC3OS5pCYh45d61Y3akXKgYS uqAAx2AQuKDzvwxNqjDFJCtysOTYSQkWOIXHLhgyY3LM/PjqgMNOG5/r/nmyXTJ1nE3H 7CRxGcG2ujVQchqpgCzJJPpmfj7pKBlqWsOpu2HA/e8NINKtkAOzEIdmqnJpJK/sfyYi 1HDVNnhzzjCeZrCgFGJWGZiv+I+D1QBui6LaHWw8ekQTpvfbBjioYzjYzQrqDOT1hzbT 3zzbLF8pVM9vZqcC0XZ5eRlMAiVwR+JS9k6RE5YwY+FckwXfPy4lNkwUZngnUpLmzavc pjNg== X-Gm-Message-State: AOJu0YxO4ADcU2wM3vnLJkacffpQfKNp9P/g4Pm7CIpItuqQMWyBBPup ods6WWlzw+abYgofXZRIOQH0q8UmXC3mdWYbIfmanEIFbbsJ424g X-Google-Smtp-Source: AGHT+IHYPpgNuD3oYlJ9tPePyS9Wvh7gsNdvtCATMnvUXxmldf/w+iruczWpd7dUNeIBUMRfXNgA2A== X-Received: by 2002:a05:6512:4847:b0:510:25be:d7ae with SMTP id ep7-20020a056512484700b0051025bed7aemr1497396lfb.55.1706784022882; Thu, 01 Feb 2024 02:40:22 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUi6vKOdzADSBs4ow4E5zqqDNGQzxls0BRz/IGd8czrX++ljuus58VYz1UFnrc30kYtid4j/UV5a8hzHPt006nGIq0lFoU= Original-Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id v13-20020a056512348d00b0051006cbce52sm2148856lfr.43.2024.02.01.02.40.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Feb 2024 02:40:22 -0800 (PST) Content-Language: en-US, ru-RU Mail-Followup-To: Stefan Kangas , 68687@debbugs.gnu.org, emacs-orgmode@gnu.org In-Reply-To: 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:279283 gmane.emacs.orgmode:159497 Archived-At: 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")) > > 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? 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. Old mailers will continue sending messages with application/vnd.lotus-organizer, text/x-org, or text/org media type. > IOW, I'm asking if it is backwards-compatible to remove > "text/org", in either direction. I suggest to use text/org instead of text/x-org. > Will .org files be displayed in the > same way as before or not on both new and old versions? I do not see a better way toward consistency in respect to the media type. > I've noticed on my machine that .org files have been interpreted as > application/vnd.lotus-organizer. From my point of view, it is a reason to not bother concerning removing of "text/x-org" from `mailcap-mime-extensions' > Presumably that's due to some local > configuration in /etc/mime.types on my distro. Is that correct? There are 2 projects maintaining /etc/mime.types, they follows IANA registry, so have application/vnd.lotus-organizer. XDG shared-mime-info project (another media types DB, not /etc/mime.types) has text/org. > 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. > 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.