From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: fine grained control of webkit browsing Date: Tue, 19 Jun 2018 20:58:09 +0200 Message-ID: <87in6e4n9a.fsf@chopper> References: <20180619114906.4437a1f6@jabberwock.cb.piermont.com> <87po0mvjes.fsf@elephly.net> <20180619123716.5741c9c0@jabberwock.cb.piermont.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529434846 14712 195.159.176.226 (19 Jun 2018 19:00:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 19 Jun 2018 19:00:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Ricardo Wurmus , emacs-devel@gnu.org To: "Perry E. Metzger" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 19 21:00:42 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fVLru-0003i4-Ci for ged-emacs-devel@m.gmane.org; Tue, 19 Jun 2018 21:00:42 +0200 Original-Received: from localhost ([::1]:44519 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVLtz-0007X2-GI for ged-emacs-devel@m.gmane.org; Tue, 19 Jun 2018 15:02:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVLsu-0007VU-IR for emacs-devel@gnu.org; Tue, 19 Jun 2018 15:01:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVLsr-0002KX-Hv for emacs-devel@gnu.org; Tue, 19 Jun 2018 15:01:44 -0400 Original-Received: from smtp.outgoing.loopia.se ([194.9.95.112]:49374) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fVLsr-0002J7-AV for emacs-devel@gnu.org; Tue, 19 Jun 2018 15:01:41 -0400 Original-Received: from s554.loopia.se (localhost [127.0.0.1]) by s554.loopia.se (Postfix) with ESMTP id 4FF1F1F1774C for ; Tue, 19 Jun 2018 21:01:38 +0200 (CEST) Original-Received: from s499.loopia.se (unknown [172.21.200.97]) by s554.loopia.se (Postfix) with ESMTP id 31F5F795A6B; Tue, 19 Jun 2018 21:01:38 +0200 (CEST) Original-Received: from s549.loopia.se (unknown [172.21.200.105]) by s499.loopia.se (Postfix) with ESMTP id 403FC1358DCB; Tue, 19 Jun 2018 20:58:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se Original-Received: from s645.loopia.se ([172.21.200.105]) by s549.loopia.se (s549.loopia.se [172.21.200.137]) (amavisd-new, port 10024) with LMTP id CbeDIg3nuzC7; Tue, 19 Jun 2018 20:58:09 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: joakim.verona@chimeslab.se X-Loopia-Originating-IP: 81.170.223.63 Original-Received: from localhost.localdomain (h-223-63.A149.priv.bahnhof.se [81.170.223.63]) (Authenticated sender: joakim.verona@chimeslab.se) by s645.loopia.se (Postfix) with ESMTPSA id 4591813C4B64; Tue, 19 Jun 2018 20:58:09 +0200 (CEST) In-Reply-To: <20180619123716.5741c9c0@jabberwock.cb.piermont.com> (Perry E. Metzger's message of "Tue, 19 Jun 2018 12:37:16 -0400") X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 194.9.95.112 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226532 Archived-At: "Perry E. Metzger" writes: > On Tue, 19 Jun 2018 18:19:07 +0200 Ricardo Wurmus > wrote: >> Perry E. Metzger writes: >> >> > 2) Say one wants to do things like viewing something with >> > javascript off and without loading remote elements (say because >> > one wants to safely view some HTML email). What does one need to >> > do to get this to work? >> >> The widget is not fully integrated into Emacs. > > It would be neat if it were. One would like, for example, > to be able to move a cursor around in it with keyboard commands, > copy text, and move back to another buffer and paste it without > touching the mouse. > >> The extent to which one can conveniently communicate with the widget >> is by sending a string containing a JavaScript program to the widget >> and have it return a value. Everything else requires exposing >> Webkit API features to Elisp. > > Ah, so at the moment, this isn't yet at the point where (for example) > one could safely use it to view HTML email. (To do that, among other > things, one needs to shut off JavaScript and to allow programmatic > control over which images are loaded.) > >> Attached is an old patch that I never submitted that allows one to >> set webkit settings via Elisp. Unfortunately, disabling JavaScript >> for the widget also disables JavaScript evaluation of strings that >> are sent from Emacs -- we use JavaScript for telling the widget to >> scroll, for example. (See ___xwidget-webkit-scroll-bottom___ or >> ___xwidget-webkit-show-element___.) > > So it would be necessary to tighten the integration a lot more in > order to make this work as cleanly as one might like? The original idea was to expose the entire webkit api to emacs using gobject introspection. There is an initial attempt to do this in one of the xwidget branches. That work is stalled. I think it would be a nice project for some enterprising person though. > > Perry -- Joakim Verona joakim@verona.se +46705459454