From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iKoMICJFsGa5DQEAqHPOHw:P1 (envelope-from ) for ; Mon, 05 Aug 2024 03:21:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id iKoMICJFsGa5DQEAqHPOHw (envelope-from ) for ; Mon, 05 Aug 2024 05:21:06 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ushin.org header.s=key1 header.b=UnYU+OnS; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=quarantine) header.from=ushin.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1722828066; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=NyprHszwtRlyH2m+3V0PIJjOYmVsNiQs9Nq2kq59B18=; b=QotQTwIud/beyg8x1DCKKEh35/fGvLkmUA4ZyeEdFl5Pzzdl4wNLld5m+RvdjiCwJJj60q QphSoVu0D7mla8h04XWmZaLDQu9m6Fv1qORqkL54p7jb2yWVNU9D6P6VtxCUK0XvMPkkrk GWK6AbZmPDipHkwYg5q6S77+VAsvbQovDR8pTbx9us8A/EuTGctqZIR8nQ6Uk9yaeSDiqJ vAroz3OMGNfQboIKMTC56HWeEjRmJBjoez6DPNCAS2LRZNhB8QjOvQWpHrV3GbKtchrOAk SuMT54BEQPlah7XzNY6J4Z58V3BdCLDgxUdG56l9heAdVZgrr0cM6DQ+glhI7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=ushin.org header.s=key1 header.b=UnYU+OnS; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=quarantine) header.from=ushin.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1722828066; a=rsa-sha256; cv=none; b=lZyvcjuCdFVfX+LkyJlUnCkKnk7Z2Xr2a6+oDCjbKJAjtxI29oDdSkARaT7HfdKSbF29ua NOp3xhC8DtinD+nG9dJEQSbDulOG8akg86mDhrirqHEy46SauwwLmOIawDTc+ZNzevSYg0 +oIqpHXLUWX0HZQeOTLA9qezMoWTbjyTUjJHHhmUOG077Zaplwwo5ph4fRknjBU3QYdpKZ Je4DJMDOFBx/yvnxUktt/QKK/bII6QmzYaMpz1jQDgAJypWBgjN8uAzVpdAirSHxulfbSM loXuFd/E5sTtEw8/EZZddD6C3c9tXSdz1vMpOXmcVRT65jwMRORVQ5flq4VNcA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4F53171DC9 for ; Mon, 5 Aug 2024 05:21:05 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saoGg-0000lg-Qb; Sun, 04 Aug 2024 23:20:18 -0400 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 1saoGe-0000kq-UX for emacs-orgmode@gnu.org; Sun, 04 Aug 2024 23:20:16 -0400 Received: from out-177.mta0.migadu.com ([91.218.175.177]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1saoGZ-0000RR-5j for emacs-orgmode@gnu.org; Sun, 04 Aug 2024 23:20:16 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ushin.org; s=key1; t=1722828003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NyprHszwtRlyH2m+3V0PIJjOYmVsNiQs9Nq2kq59B18=; b=UnYU+OnSjJsGRjJGWbS7aHcnB8xzTtspVVDUo6PXr7crGbwjg/evFV01f1B84ZYthlapPx InYxuy8cHVMdwxePT5wMBGkPKoMnO688KDOx4Q4k1DovrTUEpcaZg/Cy3Fc9aIdDJXLQ/p S5PdZn2cN6pcWaW/ocYhm7vmQempbi5OjJiqS+d066tIKYwv3OaRSpkG0seTD40oTjQOs/ 4DV0AUqpQe++BW3IZ8uRy1X5kVtpz1LS/5D0yNP79Yy+18WZ13cWcDVrV4DcIywCi+fDLj gxQsxt6Yjq/UU3iLnHPDrcerzqtcW/smgVlZlNGB/tO5jrg/kiT3oflE1bF9sA== From: Joseph Turner To: emacs-orgmode@gnu.org Cc: Max Nikulin Subject: Re: Adding text/org MIME type to jshttp/mime-db In-Reply-To: <821aa597-349e-4ded-8c5f-16e80a59965e@gmail.com> (Max Nikulin's message of "Sun, 4 Aug 2024 17:33:29 +0700") References: <87wml0f265.fsf@ushin.org> <20dcde53-c4aa-4db6-9143-9e6ea6a62215@gmail.com> <875xsh5wze.fsf@ushin.org> <821aa597-349e-4ded-8c5f-16e80a59965e@gmail.com> Date: Sun, 04 Aug 2024 20:19:53 -0700 Message-ID: <87ikwfoduu.fsf@ushin.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=91.218.175.177; envelope-from=joseph@ushin.org; helo=out-177.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.81 X-Migadu-Queue-Id: 4F53171DC9 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.81 X-TUID: S/zjhlg+cbsU Max Nikulin writes: > On 04/08/2024 00:37, Joseph Turner wrote: >> jshttp/mime-types utility does this: >> // source preference (least -> most) >> var preference = ['nginx', 'apache', undefined, 'iana'] >> and then discards duplicate mappings which are of lower preference. > > I can not say that I have consistent vision which way media type > database should be designed. It is rather close to off-topic on this > list (though `org-file-types' is a kind of override map, built-in > mailcap.el is far from being perfect, and Emacs ignores > shared-mime-info completely). > > - Both fallback and override entries should be implemented. > - It seems there are differences which way custom entries should be > handled during compiling database and when an application uses third > party mappings. The reason is that version of external database may > be older or newer than version of an application. Some conflicts may > cause fatal error during compiling of database while applications > have to be more intelligent in respect to conflict resolution. > - Priorities of media type to suffix and suffix to media type may be > different. > - My impression is that multiple types may have the same suffix, so > there should be "get all media types for given suffix" method. > - It should be possible to specify priorities within the same source. > > I am a bit surprised that jshttp/mime-types developers use added > entries as fallback, not as overrides for IANA, but it is their design > decision. Since it is a DB, not DB user, they can just drop > conflicting entries. Perhaps they still want to preserve ambiguous > mapping of multiple media types to the same suffix (otherwise > text/x-org should be dropped due to a conflict). Yes, I am also surprised that jshttp/mime-types does not offer a way to customize MIME type source preference. However, on the topic of Org mode support in Agregore, I am not sure that the ability to specify a different preference or even a "get all media types for given suffix" function would help. In this case, we want the browser to treat .org files as text files and attempt to render them. Currently, .org files are treated as non-text files and the browser attempts to download them when the user opens one. This means that our code to render Org files doesn't even get a chance to run. For now, perhaps we can override the MIME type map in the extension: https://github.com/AgregoreWeb/extension-agregore-renderer/issues/8#issuecomment-2267958828 >> Max Nikulin writes: >>> I think, text/org may be added as well (without removing of >>> text/x-org). >> Shall we consider this this after we find a way for these >> low-preference >> mappings to be useful? > > I still believe that the following behavior is preferable > > - applicaion/vnd.lotus-organizer -> .org > - text/x-org -> .org > - text/org -> .org > - .org -> text/org (preferably without relying on x- heuristics) > > Unless a user explicitly configured local mapping .org to > applicaion/vnd.lotus-organizer I agree with your preference! Thanks, Joseph