From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WFM2LVZar2ayIgEAqHPOHw:P1 (envelope-from ) for ; Sun, 04 Aug 2024 10:39:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id WFM2LVZar2ayIgEAqHPOHw (envelope-from ) for ; Sun, 04 Aug 2024 12:39:18 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; none 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 A7E18A3C3 for ; Sun, 04 Aug 2024 12:39:18 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saYYU-0003Jv-7F; Sun, 04 Aug 2024 06:33:38 -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 1saYYR-0003Jh-SQ for emacs-orgmode@gnu.org; Sun, 04 Aug 2024 06:33:35 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1saYYP-0004ik-Q1 for emacs-orgmode@gnu.org; Sun, 04 Aug 2024 06:33:35 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ef27bfd15bso120251611fa.2 for ; Sun, 04 Aug 2024 03:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722767611; x=1723372411; darn=gnu.org; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=4VobZ3bpGhZx9CxvC1IDFIRef2LIGNw6MjKPpqoZViw=; b=JLb/GncNVdcPDRVdNNtnrwLyuP/Ds96QZG6LBem5YLakEO+xGReV1SQ+0WN2TKrUuQ T352lUzGBP5T476ohr4ZBg3YdxY/6AAn0Jz2Yl0MEnCBM1ZEunB5SmYG1anHj/+SJ48a 2rvUu06eTliU0wxGounzY7wLkB/yIULk/ZIQf+pLWOSf5cMOBoKXygZ+pEsABj3/ZTZQ mvsFgOXWg+2RJm7d5g/lRyK36dxe/sYmhIf9nhzaPkgtrtZj+Hk5QeIELC3gzzpzaB6Z B9/4MRwXhSaA5Bhn6hth6wdhmASWX8SMe2YNyQ+y+BgUDP5fNRYc8Sd4kTzcPOB8mmU9 lkVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722767611; x=1723372411; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4VobZ3bpGhZx9CxvC1IDFIRef2LIGNw6MjKPpqoZViw=; b=s2eGBTUMNqWx5rz8VjKFzZHrJMPY0PEoZyJN5BNvfKqNju615VIn9Yxyi/X4D3HI6P ChhfCYdiJ9R5zcuktMs1gMjP/MDbjQbIrHi6UqcDifqWNNXKNzfIi4oFPcvA2M0WucXN Bad1+njcP0OzUAVn69C/h57TwAiuVhINnFDG1pYGHZY2tHgOdJantVjvl+8/hkUbfGh+ WHBKW8BwDH0bdIoAacN0EIkYFTJVa2+ZgYrB0ITZ71pL+uD7X14YqD4ArFXfPnA55Qy+ GqMNliHNrF8YKTeWu2BRD9MO00BjjJuovfJFZTSLrCrh90tX11+Mj98TLxiG9JmKWLHz TJ8A== X-Forwarded-Encrypted: i=1; AJvYcCVv2jn4HpGtV0b/Z/GZZMMNL6OZ/ni1eAq2uliIR4ZDgcRx/awzlbS+gFR7rbpPsj0/KryZdlRfVkfKaIwQe6WEmCuYf5U= X-Gm-Message-State: AOJu0YzDzQNwxIGguDX82LotxO2as4OMiFxaEYCG7sQiY+P+du8Y3wMR I73b7+qqDOwMApit3+EMWPl51937JTv7USukgGByyA4hZbduOGVLQ8FUug== X-Google-Smtp-Source: AGHT+IFmvgjhrP58FbeXerzav82ckygJtsSalbJLacvmrpWMSB04d1RORJea55WMNP03Sm6JJof+bQ== X-Received: by 2002:a2e:8046:0:b0:2ee:7c12:7b36 with SMTP id 38308e7fff4ca-2f15aaacc1dmr59824281fa.19.1722767611011; Sun, 04 Aug 2024 03:33:31 -0700 (PDT) Received: from [192.168.0.102] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id 38308e7fff4ca-2f15e1c2e29sm6980471fa.61.2024.08.04.03.33.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 04 Aug 2024 03:33:30 -0700 (PDT) Message-ID: <821aa597-349e-4ded-8c5f-16e80a59965e@gmail.com> Date: Sun, 4 Aug 2024 17:33:29 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Adding text/org MIME type to jshttp/mime-db To: Joseph Turner , emacs-orgmode@gnu.org References: <87wml0f265.fsf@ushin.org> <20dcde53-c4aa-4db6-9143-9e6ea6a62215@gmail.com> <875xsh5wze.fsf@ushin.org> Content-Language: en-US, ru-RU From: Max Nikulin Mail-Followup-To: Joseph Turner , emacs-orgmode@gnu.org In-Reply-To: <875xsh5wze.fsf@ushin.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=manikulin@gmail.com; helo=mail-lj1-x235.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.00 X-Spam-Score: -4.00 X-Migadu-Queue-Id: A7E18A3C3 X-Migadu-Scanner: mx11.migadu.com X-TUID: KiWp1t2BOLIf 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). > 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