From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 IAZkGxZrrmY2KAAA62LTzQ:P1 (envelope-from ) for ; Sat, 03 Aug 2024 17:38:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id IAZkGxZrrmY2KAAA62LTzQ (envelope-from ) for ; Sat, 03 Aug 2024 19:38:30 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ushin.org header.s=key1 header.b=AczMYUOf; 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=1722706710; 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=R+hDvntmUqOw5g0glF2+XamIAYS0oy8KxjWYo0X8isU=; b=FGtKMn69F1CndZ1C10/wXpJ18eAG9m3a6i6bdWSGWSR1U7JhQXG8vt8Jb4PUBMOoHFecOH RTXzRzeDPGLn6YctOKNdrNOkG45DYttyNQP1kHCpAbttkX7pbduO/UacMtaUxn8z5er9cP djKznwgxcdCnCF2KVrK8FDR2IG6FMVoD/Dy9ok7qHAgtH4tLujlcdSBASr5gKHNeCcdQTn gXzBzuyg/a2kkjB3g+2Gyj6PvwBgx/iLmnabyftlBwSCcI5ta1ug01FQNWIXZsUcZorkjT FNXUBYIQD8XkUdpsxKp1FqMXOIRtLSM9J01rTXsDlX9S6uN7g53UL7n2/gQGdA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=ushin.org header.s=key1 header.b=AczMYUOf; 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=1722706710; a=rsa-sha256; cv=none; b=SUHt+R7ODxR9d6AV6BivkjqiDipC0JTfuA81cLkySg6IZXp4vaIJG2gOT9i9BLZ2eygkWA nksoQZv8Oipt9PbVDRH9DGdYcR+/iyw9Z0LPs82ZEVB21s0d0KycwJkuqDD+DkPX+4EoYl Lrv/l0MDegxnonfc6D6z2qGhQTFESI5q2iwtDjC5Qrvvqg6ceCwcUZ4AcE57mX44fVFQaS Tc1+wqDlXuRZdddrUd9jI7lkjE6kiK0tvP8M37kiFYstYbJmM60evtyi1xprhGx2e17t8A +Y+WKZVjfg2lW7VaAbM/XfcPp2z+zpv1hQexmKby3UQ/1du4DRHfLfLEB2HBGg== 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 D42D574571 for ; Sat, 3 Aug 2024 19:38:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saIhC-0007W8-CG; Sat, 03 Aug 2024 13:37:34 -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 1saIh9-0007Vt-07 for emacs-orgmode@gnu.org; Sat, 03 Aug 2024 13:37:31 -0400 Received: from out-188.mta0.migadu.com ([2001:41d0:1004:224b::bc]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1saIh5-0003p5-EL for emacs-orgmode@gnu.org; Sat, 03 Aug 2024 13:37:29 -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=1722706633; 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=R+hDvntmUqOw5g0glF2+XamIAYS0oy8KxjWYo0X8isU=; b=AczMYUOfFx3w0NlXHz7oJvw6L2Tax9P6ChCTGjczNfcVNfdfP9P3MuLDiXbUNwXuy01w9+ jArd5OJrV17h//SpcKbsC+JwaY5FEPWQKB/C6LQSMyZ8kl1G8MupsCIqmRwGelXJ9PrmJd lFzB+vITOCr6pVj+XxBhz9F326elUzghkWHtFpPIXTXkN+2R8hu/shKthRNgKL4C5ZHpkO 280IStpamuTJf+eKKeI8lX83iUxHIifdnb9zQHeCif1oQ5eE71I1kMLsje2Z9SZb3uy7nY gH7p7GNP0wGIaSFJZDgU3d2TUTIQKYPg30YhF0d+kY7ipUTmaopFscV8H/Gr8g== From: Joseph Turner To: emacs-orgmode@gnu.org Cc: manikulin@gmail.com Subject: Re: Adding text/org MIME type to jshttp/mime-db In-Reply-To: <20dcde53-c4aa-4db6-9143-9e6ea6a62215@gmail.com> (Max Nikulin's message of "Sat, 3 Aug 2024 17:25:38 +0700") References: <87wml0f265.fsf@ushin.org> <20dcde53-c4aa-4db6-9143-9e6ea6a62215@gmail.com> Date: Sat, 03 Aug 2024 10:37:09 -0700 Message-ID: <875xsh5wze.fsf@ushin.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:41d0:1004:224b::bc; envelope-from=joseph@ushin.org; helo=out-188.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: -7.64 X-Migadu-Queue-Id: D42D574571 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -7.64 X-TUID: YzQGrJGLG0F3 Max Nikulin writes: > On 02/08/2024 02:55, Joseph Turner wrote: >> Support for "text/org" in would >> let >> the Agregore browser () render Org >> files. >> Then hyperdrive.el users could share Org files to be viewed in >> Agregore. >> John Kitchin opened a PR back in 2017, which was rejected: >> https://github.com/jshttp/mime-db/pull/82 > > I missed it at first, but it was *closed*, but not *rejected*. > > > 2017-07-25T01:12:28Z >> Add text/x-org >> closes #82 Thank you for catching my oversight!! I dug a little deeper and discovered that the popular NPM packages that make use of jshttp/mime-db rank the source of each MIME type and discard duplicates which have lower "preference". For example, the 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. https://github.com/jshttp/mime-types/blob/eca390b71004a70f4551197638c077cdba8cf954/index.js#L155 I think https://github.com/broofa/mime does something similar. The result is that the two popular NPM utilities for getting a MIME type from a file extension (see ) ignore the ".org" -> "text/x-org" mapping in favor of ".org" -> "application/vnd.lotus-organizer". > So you can use text/x-org. > >> After I posted a comment on the thread, the maintainer responded: >> >>> I would suggest opening a new PR. > > 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? > Perhaps a worg page may be created to clarify current state of media > type for org files. The question is what is the appropriate directory. I agree that it would be good to track this information in one place so we don't repeat ourselves ;) Thanks, Joseph