From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.bugs,gmane.emacs.orgmode Subject: bug#58774: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly Date: Thu, 27 Oct 2022 07:55:18 +0300 Message-ID: References: <86bkq0qf8p.fsf@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24799"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.7+37 (a90f69b) (2022-09-02) Cc: emacs-orgmode@gnu.org To: 58774@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 27 06:58:41 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onuyW-0006F4-02 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Oct 2022 06:58:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onuy1-0008EK-49; Thu, 27 Oct 2022 00:58:09 -0400 Original-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 1onuxv-0008D8-9c for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 00:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onuxv-00045B-2T for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 00:58:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onuxt-0003sA-O8 for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 00:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jean Louis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2022 04:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166684668014878 (code B ref -1); Thu, 27 Oct 2022 04:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Oct 2022 04:58:00 +0000 Original-Received: from localhost ([127.0.0.1]:55867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onuxr-0003ru-D3 for submit@debbugs.gnu.org; Thu, 27 Oct 2022 00:57:59 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onuxp-0003rm-89 for submit@debbugs.gnu.org; Thu, 27 Oct 2022 00:57:57 -0400 Original-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 1onuxo-0007sd-K9; Thu, 27 Oct 2022 00:57:56 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onuxj-00043L-Ow; Thu, 27 Oct 2022 00:57:54 -0400 Original-Received: from localhost ([::ffff:102.82.225.124]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000081FA6.00000000635A0FCC.00006FF6; Wed, 26 Oct 2022 21:57:48 -0700 Mail-Followup-To: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Content-Disposition: inline In-Reply-To: <86bkq0qf8p.fsf@protected.rcdrun.com> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246268 gmane.emacs.orgmode:149971 Archived-At: * Jean Louis [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/