From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew De Angelis Newsgroups: gmane.emacs.devel Subject: Re: Volunteering to help on etc/TODO item: Improved xwidgets support Date: Tue, 18 Oct 2022 23:43:02 -0400 Message-ID: References: <87k04wa97f.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000024acb105eb5b0265" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35593"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Qiantan Hong To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 19 12:54:32 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ol6iW-00097c-Fx for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Oct 2022 12:54:32 +0200 Original-Received: from localhost ([::1]:52420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ol6iT-0008Vz-Ri for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Oct 2022 06:54:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okzzE-0001lJ-BF for emacs-devel@gnu.org; Tue, 18 Oct 2022 23:43:20 -0400 Original-Received: from mail-ua1-x92d.google.com ([2607:f8b0:4864:20::92d]:44636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okzz9-0001vH-9t for emacs-devel@gnu.org; Tue, 18 Oct 2022 23:43:18 -0400 Original-Received: by mail-ua1-x92d.google.com with SMTP id a8so6482014uaj.11 for ; Tue, 18 Oct 2022 20:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VvAh8O/+IvZHn4XUfHytrINsXhX0y2mv+UENzaqGU6w=; b=jF0voXCgaEtwRRfU5SAZBy9t0VpAZYB2DkRv+Y0fF6VBNuNItGPX7erk2j2QvF80Oi tek07AWZDdXFHLdr9a2YyAPJ2g3MjyYGkC9Jwrn/COojFWd0+m5qg/JZ9R5ARaI5xo+J Tx9NrBzekYaMj9r+gN0taMySdmA2nB8/6aS3FbsTIPMUzeqiMAoraoisTUkuQDBd+N+l a1iQsfhzqallfgVH1wgCvZpuoSKZfofpp/7InwCt3ERHtCGexZ8dfX4noasiI01s9lAc gmD2wdq3B5Z3+TghjAfTqpOACfCEj4eTaRdV4Hi8dAYaWhm1qvXFGUdZjtHaIIiQx7n9 fBgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VvAh8O/+IvZHn4XUfHytrINsXhX0y2mv+UENzaqGU6w=; b=EpwvTaK5F3DqdZ9NYUFueIwep4Ol0aVdpF3jf+DoLZnaIUB3sl9Ood3EpXoWJ3WaQC wuAAGN5+y7D9iU5b09vrA2/OztVFwSfxS26hy8e878Sq4TMa39aH05za27HwHHK6UVAg 5B2eFw7dLMo2GCQeZ3qxQ/sqrbC7/+D2i++n58pbqfQndqa9lYsyvr4/FWLPLG0GQB1h V7t/9QydKPyJO7agpkFb2ExZHhu2LGcGVxNaQ1EfThe3Y63XawMKn5xDi9ASqiG594w/ FHl+/idU1QQwAYObvdCPJgnind/Bg92RBZdgNAccMmJFMSz2OJ0TZSzfhfSvvGmYwZvl XsFA== X-Gm-Message-State: ACrzQf2/3BSUDokJbTDZffSq/hY6mOwBhURmsDfMYJApIoTANCUzlF6R ZHq+ElmVpibjWs5z7ek3SifOQeQ88R1yhg8bk8M= X-Google-Smtp-Source: AMsMyM4hNhAzeoDX6JLLBqs6VELRLSeDV/l/NL8c8NZRJ15E8xvLWZMYEP1quJZ9mzI7LVL6sn02q7lLZGmNIMgzmPM= X-Received: by 2002:ab0:25d3:0:b0:3ae:6580:2adc with SMTP id y19-20020ab025d3000000b003ae65802adcmr3303555uan.23.1666150994061; Tue, 18 Oct 2022 20:43:14 -0700 (PDT) In-Reply-To: <87k04wa97f.fsf@yahoo.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::92d; envelope-from=bobodeangelis@gmail.com; helo=mail-ua1-x92d.google.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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 19 Oct 2022 06:52:03 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:298110 Archived-At: --00000000000024acb105eb5b0265 Content-Type: text/plain; charset="UTF-8" Great, thanks for the informative reply! It would be good if you coordinated your efforts with Qiantian > Hong (copied), who is also making changes in that area. > Nice to meet you both. @Qiantian Hong let me know about your progress on this, and if there's a specific area I should focus on, so we can combine forces and avoid duplicate work. Thanks. It would be nice if someone resolved the more crucial issues > first, though > I wasn't aware of these, but I will prioritize them. Unless you can complete this work before November Yeah, that's a tight deadline. I am going to try to fix the biggest issues by then, but we'll probably have to wait until the next release to have this included I think the timer stops by itself, the variable is not all that > important. > This is probably another NS-specific issue, but the timer doesn't always stop in my build. The issue starts in `xwidget-webkit-callback'; it looks like the "load-finished" event sometimes (most of the times) doesn't happen or is not received. I will add this to the list of things to fix. One other possible Lisp bug: currently, `xwidget-webkit-current-url' always returns "URL: nil" for me. This shouldn't depend on other xwidget code: the issue is caused by the fact that `kill-new' doesn't return the string it just added to the kill-ring. (If it does work in your builds let me know, as I'd have to investigate what's causing such different behavior.) This is my fix for this: (defun xwidget-webkit-current-url () "Display the current xwidget webkit URL and place it on the `kill-ring'." (interactive nil xwidget-webkit-mode) (let ((url (or (xwidget-webkit-uri (xwidget-webkit-current-session)) ""))) (kill-new url) (message "URL: %s" url))) On Tue, Oct 18, 2022 at 9:33 PM Po Lu wrote: > Andrew De Angelis writes: > > > Hello everyone and thanks for all your work! > > Hello, thanks for working on Emacs. > > > This is regarding TODO item: "Things to be done for specific packages > > or features/NeXTstep port/Missing features/Improved xwidgets support" > > > > I've started working on the NS code for xwidget-webkit, with the aim > > of bringing it up-to-date with the changes to the X11 and GTK code > > (you can check my as-yet-still-very-minor changes at this fork). I'm > > sending the email to: 1) check if someone is already working on this > > 2) make sure I'm going about it the right way 3) inquire about the > > current X11/GTK implementation. > > > > Regarding 1: I haven't found many recent matches for 'xwidget' in the > > mailing list, but if you're aware of someone already working on this > > effort, please let me know > > Sure. It would be good if you coordinated your efforts with Qiantian > Hong (copied), who is also making changes in that area. > > > Regarding 2: As noted in the Contributing node of the manual, I'm > > making you aware of my planned improvements and I'd like to know if > > you have any suggestions/advice. My current plan is to go through the > > xwidget.c code, take note of any functions/subroutines that are > > defined for GTK but not NS, and add an NS implementation in xwidget.m. > > Thanks. It would be nice if someone resolved the more crucial issues > first, though: > > - many procedures in nsxwidget.m crash when encountering killed > xwidgets (see the doc string of `kill-xwidget' for more details.) > - nsxwidget.m has apparently been written with Objective-C Automatic > Reference Counting in mind, and thus leak memory, as Emacs cannot > use ARC. > > > I will do my best to complete this so that the NS code will be fully > > up-to-date. If there are any planned changes to xwidget.c or > > xwidget.el for the upcoming 29.1 release, please let me know. > > I think it will probably be too late for Emacs 29.1, which will start > the pre-release process soon, at which point changes that don't only fix > regressions (and possibly the MS-DOS build) will not be allowed. Unless > you can complete this work before November, that is. > > > Regarding 3: I do not have a Linux machine available at the moment, > > which would be valuable to get a better sense of the current GTK > > implementation (I'm working on finding additional volunteers to help > > on this). Is there a standard-procedure I can follow to ask questions > > here about the GTK implementation? > > Just send an email to this list, with me copied in. BTW, the canonical > implementation is not a "GTK implementation", but rather two > implementations combined in a single file through ifdefs: one for the > regular X11 build, and the other for a GTK build that does not use any X > Windows specific interfaces. > > > Is there a point person I should contact specifically? > > Me. > > > I would like to keep the two different implementations as consistent > > as possible, while also making sure that common bugs are addressed. > > One question I have regarding this is on the > > `xwidget-webkit--loading-p' variable: in my build, I see that this is > > set to true when creating a new session, but it is then never updated > > to nil (even long after the web page has fully loaded). Since this > > variable is not present in the C code, I'm not sure if this is a > > limitation of the Lisp code (and therefore common regardless of the > > underlying framework, GTK or NS), or if it's handled correctly in > > other builds. > > I think the timer stops by itself, the variable is not all that > important. > --00000000000024acb105eb5b0265 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Great, thanks for the informative reply!

It would be good if you coor= dinated your efforts with Qiantian
Hong (copied), who is also making cha= nges in that area.

Nice to meet you bot= h.=C2=A0@Qiantian Hong let me know about your progress on this, and if ther= e's a specific area I should focus on, so we can combine forces and avo= id duplicate work.

Thanks.=C2=A0 It would be nice if someone resolved the more c= rucial issues
first, though

I wasn&#= 39;t aware of these, but I will prioritize them.

Unless you can complete this wo= rk before November=C2=A0

Yeah, that's a= tight deadline. I am going to try to fix the biggest issues by then, but w= e'll probably have to wait until the next release to have this included=

I th= ink the timer stops by itself, the variable is not all that
important.

This is probably another NS-specific iss= ue, but the timer doesn't always stop in my build. The issue starts in = `xwidget-webkit-callback'; it looks like the=C2=A0=C2=A0"load-fini= shed" event sometimes (most of the times) doesn't happen or is not= received. I will add this to the list of things to fix.

One other possible Lisp bug: currently, `xwidget-webkit-current-url&= #39; always returns "URL: nil" for me. This shouldn't depend = on other=C2=A0xwidget code: the issue is caused by the fact that `kill-new&= #39; doesn't return the string it just added to the kill-ring. (If it d= oes work in your builds let me know, as I'd have to investigate what= 9;s causing such different behavior.)
This is my fix for this:

(d= efun xwidget-webkit-current-url ()
=C2=A0 "Display the current xwid= get webkit URL and place it on the `kill-ring'."
=C2=A0 (intera= ctive nil xwidget-webkit-mode)
=C2=A0 (let ((url (or (xwidget-webkit-uri= (xwidget-webkit-current-session)) "")))
=C2=A0 =C2=A0 (kill-n= ew url)
=C2=A0 =C2=A0 (message "URL: %s" url)))

=C2=A0
=C2=A0

On Tue, Oct 18, 2022 at = 9:33 PM Po Lu <luangruo@yahoo.com<= /a>> wrote:
A= ndrew De Angelis <bobodeangelis@gmail.com> writes:

> Hello everyone and thanks for all your work!

Hello, thanks for working on Emacs.

> This is regarding TODO item: "Things to be done for specific pack= ages
> or features/NeXTstep port/Missing features/Improved xwidgets support&q= uot;
>
> I've started working on the NS code for xwidget-webkit, with the a= im
> of bringing it up-to-date with the changes to the X11 and GTK code
> (you can check my as-yet-still-very-minor changes at this fork).=C2=A0= I'm
> sending the email to: 1) check if someone is already working on this > 2) make sure I'm going about it the right way 3) inquire about the=
> current X11/GTK implementation.
>
> Regarding 1: I haven't found many recent matches for 'xwidget&= #39; in the
> mailing list, but if you're aware of someone already working on th= is
> effort, please let me know

Sure.=C2=A0 It would be good if you coordinated your efforts with Qiantian<= br> Hong (copied), who is also making changes in that area.

> Regarding 2: As noted in the Contributing node of the manual, I'm<= br> > making you aware of my planned improvements and I'd like to know i= f
> you have any suggestions/advice. My current plan is to go through the<= br> > xwidget.c code, take note of any functions/subroutines that are
> defined for GTK but not NS, and add an NS implementation in xwidget.m.=

Thanks.=C2=A0 It would be nice if someone resolved the more crucial issues<= br> first, though:

=C2=A0 - many procedures in nsxwidget.m crash when encountering killed
=C2=A0 =C2=A0 xwidgets (see the doc string of `kill-xwidget' for more d= etails.)
=C2=A0 - nsxwidget.m has apparently been written with Objective-C Automatic=
=C2=A0 =C2=A0 Reference Counting in mind, and thus leak memory, as Emacs ca= nnot
=C2=A0 =C2=A0 use ARC.

> I will do my best to complete this so that the NS code will be fully > up-to-date. If there are any planned changes to xwidget.c or
> xwidget.el for the upcoming 29.1 release, please let me know.

I think it will probably be too late for Emacs 29.1, which will start
the pre-release process soon, at which point changes that don't only fi= x
regressions (and possibly the MS-DOS build) will not be allowed.=C2=A0 Unle= ss
you can complete this work before November, that is.

> Regarding 3: I do not have a Linux machine available at the moment, > which would be valuable to get a better sense of the current GTK
> implementation (I'm working on finding additional volunteers to he= lp
> on this).=C2=A0 Is there a standard-procedure I can follow to ask ques= tions
> here about the GTK implementation?

Just send an email to this list, with me copied in.=C2=A0 BTW, the canonica= l
implementation is not a "GTK implementation", but rather two
implementations combined in a single file through ifdefs: one for the
regular X11 build, and the other for a GTK build that does not use any X Windows specific interfaces.

> Is there a point person I should contact specifically?

Me.

> I would like to keep the two different implementations as consistent > as possible, while also making sure that common bugs are addressed. > One question I have regarding this is on the
> `xwidget-webkit--loading-p' variable: in my build, I see that this= is
> set to true when creating a new session, but it is then never updated<= br> > to nil (even long after the web page has fully loaded). Since this
> variable is not present in the C code, I'm not sure if this is a > limitation of the Lisp code (and therefore common regardless of the > underlying framework, GTK or NS), or if it's handled correctly in<= br> > other builds.

I think the timer stops by itself, the variable is not all that
important.
--00000000000024acb105eb5b0265--