emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: Joseph Turner <joseph@ushin.org>, emacs-orgmode@gnu.org
Subject: Re: Adding text/org MIME type to jshttp/mime-db
Date: Sun, 4 Aug 2024 17:33:29 +0700	[thread overview]
Message-ID: <821aa597-349e-4ded-8c5f-16e80a59965e@gmail.com> (raw)
In-Reply-To: <875xsh5wze.fsf@ushin.org>

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


  parent reply	other threads:[~2024-08-04 10:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 19:55 Adding text/org MIME type to jshttp/mime-db Joseph Turner
2024-08-02 10:46 ` Max Nikulin
2024-08-03 10:25 ` Max Nikulin
2024-08-03 17:37   ` Joseph Turner
2024-08-03 18:05     ` Joseph Turner
2024-08-04 10:33     ` Max Nikulin [this message]
2024-08-05  3:19       ` Joseph Turner
2024-08-05 10:35         ` Max Nikulin
2024-08-05 19:29           ` Joseph Turner
2024-08-05 18:35     ` Ihor Radchenko
2024-08-09 12:57       ` Joseph Turner
2024-08-10 13:15         ` Ihor Radchenko
2024-08-10 18:46           ` Joseph Turner
2024-08-11 15:05             ` Ihor Radchenko
2024-08-13 19:02               ` Joseph Turner
2024-08-13 19:11                 ` Ihor Radchenko
2024-08-14 15:36                   ` Ihor Radchenko
2024-08-17  1:19                     ` Joseph Turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=821aa597-349e-4ded-8c5f-16e80a59965e@gmail.com \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=joseph@ushin.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).