Subject: Re: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly

From: Jean Louis <[email-masked]>
Date: Thu, 27 Oct 2022 07:55:18 +0300

* Jean Louis <[email-masked]> [2022-10-25 15:14]:
> 
> This wish request is related to Emacs EWW and Org mode.
> 
> Please make EWW recognize Org file when served by WWW server. Currently
> it does not recognize the MIME type text/x-org and opens the file as
> text, it does not invoke the org mode. In my opinion, it should.

Now is clear that main problem here is that Org advertises somewhere
to be "text" in MIME context, while it is not, it is by default
"application" and thus unsafe, see:

Application Media Types
https://datatracker.ietf.org/doc/html/rfc6838#section-4.2.5

and understand difference to:

Text Media Types
https://datatracker.ietf.org/doc/html/rfc6838#section-4.2.1

Thus I suggest that Org changes its MIME type and stop falsely
claiming to be "text" in MIME context, but that content type:
"application/x-org" become adopted, as that way it will become clear
that it is unsafe opening Org as falsely claimed "plain" text.

Main reason to change MIME for Org files is that Org is opened mainly
by Emacs -- and Emacs itself has programming language built-in. It is
equivalent to opening Perl file example.pl with "perl" command.

Quote from RFC6838:
-------------------

For example, a meeting scheduler might define a standard
representation for information about proposed meeting dates.  An
intelligent user agent would use this information to conduct a dialog
with the user, and might then send additional material based on that
dialog.  More generally, there have been several "active" languages
developed in which programs in a suitably specialized language are
transported to a remote location and automatically run in the
recipient's environment.  Such applications may be defined as subtypes
of the "application" top-level type.

Other comments: one can see from above that MIME types are useful to
execute remote programs, and there is nothing fundamentally wrong with
it. We can't just speak of safety alone when we are in general
computing environment, we must also speak of usefulness.

My initial request was not to execute Babel code in Org files or any
other code in Org files, but the basic viewing, browsing and linking
capacity of Org files, similarly to HTML. 

My notes are on meta level, they export to Org for presentation
purposes. Not really for execution purposes. Though it is also useful.

All I want is to access my personal read-only Org files by using WWW
and browse from one to the other by using links. 

While one may achieve similar hyperlinking features with HTML export,
exporting to HTML and making sure of details is very bloated activity
that also requires much supervision of the presentation.  It generates
work and takes time. It also requires browsers, separate software to
handle Org objects innate to Emacs. Why?

Generating Org files with all relational referencing and making them
accessible from WWW straight to Emacs makes life simpler.

It implies teaching Emacs EWW how to open various content types. 

--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/