From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0LS1H505WWOfVwEAbAwnHQ (envelope-from ) for ; Wed, 26 Oct 2022 15:43:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6PvtHp05WWPtggEAG6o9tA (envelope-from ) for ; Wed, 26 Oct 2022 15:43:57 +0200 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 0B5B0EAD2 for ; Wed, 26 Oct 2022 15:43:57 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ongga-0000yI-4j; Wed, 26 Oct 2022 09:43:13 -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 1onggU-0008SW-N1 for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 09:43:06 -0400 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 1onggS-0001Hy-FI for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 09:43:06 -0400 Received: from localhost ([::ffff:197.239.4.142]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000081D92.0000000063593947.00007E23; Wed, 26 Oct 2022 06:42:30 -0700 Date: Wed, 26 Oct 2022 16:42:06 +0300 From: Jean Louis To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Cc: Ag Ibragimov , 58774@debbugs.gnu.org, emacs-orgmode@gnu.org Subject: Re: bug#58774: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly Message-ID: Mail-Followup-To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= , Ag Ibragimov , 58774@debbugs.gnu.org, emacs-orgmode@gnu.org References: <86bkq0qf8p.fsf@protected.rcdrun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.7+37 (a90f69b) (2022-09-02) Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL=0.141, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666791837; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9fj+lYn7l9bKWLDnBYyFMhpgz4hH7QSBUrsoHYDiL8U=; b=tXtgqJRkdr/WznvmoNJw1QMnD4h+eiGrmYYcEptrB+5FsIGfqoT/mIg/7+qs5DzvhuRnWX UxHkgNAYV9NMEiO9eJEqMOPQk7R0qjJYtw85WjGvqy1M/GL6lwPAqfgK3RMo5UqPd5/1g1 qUmtFpfVkjudexR1jEdvW9AQ5kbKyk4IuwvAEjE1p+bV1BpUTlb4G2XqWPHAomquKGLa3i dd/nA+amTgDlIPFmHAtKQDS0pz9+8IHaISMw7bdBdnXTpcureWYKEBoeqy/OoWkf0rNR2u aQlDkmLrpfjDPb7AQjEIikFbgwqloGIlo27S11/P7jPWs2O45rTJwdn7Ndsoaw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666791837; a=rsa-sha256; cv=none; b=kipDIpCaweP+17Bb64Cv0+48yzoREFGjs2usDLRtCx+IHucy38nXxiYzSvaGJYcqiQKu0/ vewoIX/WUQqgCedPazUrIwHVHXTSClM8exFB7mo3fWyV0BE3FaT47P1YiZFl8alSczsP37 yLcX2j3Cewjbcit68+US6j8J7bx+0Px3LASDZL0UPEZXGtUQHgfnhmztFfVFfduyd7R5ps BvMw/p26/6f+mfP9VsWbdc6zvGul+Bng4deET4xDfPZqTNbTRkJsk3qwViau5D2jiXG6Fk hyc3j4s7TSq9s8mqclajf/DG+xv69hMoFvrm+HPfNx/lvRR/lLpMujy49p02cw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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" X-Migadu-Spam-Score: -0.72 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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" X-Migadu-Queue-Id: 0B5B0EAD2 X-Spam-Score: -0.72 X-Migadu-Scanner: scn0.migadu.com X-TUID: 04paFqIafo5E * Rudolf Adamkovič via "Bug reports for GNU Emacs, the Swiss army knife of text editors [2022-10-26 16:10]: > So, I evaluated > > (add-to-list 'mailcap-mime-data > (list "org" > (cons 'viewer 'org-mode) > (cons 'type "text/x-org"))) > > but it did not work. What the hack! > > To satisfy my curiosity, I decided to look at the source code. Thank you for understanding! > TL;DR EWW hard-codes a couple of MIME types. > > You could improve the situation in various ways. > > For example, you could > > (1) patch EWW to expose the eww-content-type for the user to use, or > (2) patch EWW to look up MIME for not just the PDF. Thank you for understanding. You have given me pointers what to do, my personal case is closed, though I am not the one who knows how to properly patch it, and I do not see yet that there is consensus, as few people did not understand about user preferences and rather speak how EWW should even take care of security issues for user instead of giving user freedom. I have done following to make it work personally: (defvar eww-content-type nil) (put 'eww-content-type 'permanent-local t) ;;; in eww-render I put: ;;; (setq eww-content-type content-type) (defun rcd-eww-content-type () (cond ((string-match-p "text/x-org" (car eww-content-type)) (org-mode)) (t (eww-mode)))) It is not working best, help me if you know how. I wish normal eww-mode when it is not org-mode. (add-hook 'eww-after-render-hook 'rcd-eww-content-type) And now I can browse Org files from within Emacs. Video is here: https://gnu.support/images/gnu-emacs/2022/10/2022-10-26/2022-10-26-16:35:20.ogv -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/