GNU bug report logs - #34128
[PATCH] add emacs built with xwidgets-support

Previous Next

Package: guix-patches;

Reported by: Arne Babenhauserheide <arne_bab <at> web.de>

Date: Fri, 18 Jan 2019 22:40:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34128 in the body.
You can then email your comments to 34128 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#34128; Package guix-patches. (Fri, 18 Jan 2019 22:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arne Babenhauserheide <arne_bab <at> web.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 18 Jan 2019 22:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arne Babenhauserheide <arne_bab <at> web.de>
To: guix-patches <at> gnu.org
Subject: [PATCH] add emacs built with xwidgets-support
Date: Fri, 18 Jan 2019 23:29:14 +0100
[Message part 1 (text/plain, inline)]
* gnu/packages/emacs.scm (emacs-xwidgets): new variable
---
 gnu/packages/emacs.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a488289f1..8c3ea1728 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -59,6 +59,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages webkit)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix utils)
@@ -210,6 +211,21 @@ languages.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))))
 
+(define-public emacs-xwidgets
+  (package (inherit emacs)
+           (name "emacs-xwidgets")
+           (synopsis "The extensible, customizable, self-documenting text
+editor (with xwidgets support)")
+           (build-system gnu-build-system)
+           (arguments (append
+                       (package-arguments emacs)
+                       `(#:configure-flags
+                         '("--with-xwidgets"))))
+           (inputs (append
+                    (package-inputs emacs)
+                    `(("webkitgtk" ,webkitgtk)
+                      ("libxcomposite" ,libxcomposite))))))
+
 (define-public emacs-no-x
   (package (inherit emacs)
     (name "emacs-no-x")
-- 
2.19.2

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#34128; Package guix-patches. (Tue, 22 Jan 2019 21:49:02 GMT) Full text and rfc822 format available.

Message #8 received at 34128 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Arne Babenhauserheide <arne_bab <at> web.de>
Cc: 34128 <at> debbugs.gnu.org
Subject: Re: [bug#34128] [PATCH] add emacs built with xwidgets-support
Date: Tue, 22 Jan 2019 22:48:26 +0100
Hi Arne,

Arne Babenhauserheide <arne_bab <at> web.de> skribis:

> * gnu/packages/emacs.scm (emacs-xwidgets): new variable

Thanks for the patch!  I wonder why this hadn’t been done before;
Nicolas, Alex, Pierre, thoughts?

The patch LGTM, minor stylistic issues:

> +(define-public emacs-xwidgets
> +  (package (inherit emacs)
> +           (name "emacs-xwidgets")
> +           (synopsis "The extensible, customizable, self-documenting text
> +editor (with xwidgets support)")
> +           (build-system gnu-build-system)
> +           (arguments (append
> +                       (package-arguments emacs)
> +                       `(#:configure-flags
> +                         '("--with-xwidgets"))))
> +           (inputs (append
> +                    (package-inputs emacs)
> +                    `(("webkitgtk" ,webkitgtk)
> +                      ("libxcomposite" ,libxcomposite))))))

Please indent rather along these lines (like in the rest of the file):

  (define-public emacs-xwidgets
    (package
      (inherit emacs)
      (name …) …))

Likewise, for consistency, use unquote-splicing rather than ‘append’:

  (inputs `(("webkitgtk" ,webkitgtk)
            ;; …
            ,@(package-inputs emacs)))

Could you send an updated patch?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#34128; Package guix-patches. (Tue, 22 Jan 2019 23:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 34128 <at> debbugs.gnu.org (full text, mbox):

From: Arne Babenhauserheide <arne_bab <at> web.de>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 34128 <at> debbugs.gnu.org
Subject: Re: [bug#34128] [PATCH] add emacs built with xwidgets-support
Date: Wed, 23 Jan 2019 00:10:41 +0100
[Message part 1 (text/plain, inline)]
Hi Ludovic,

> Thanks for the patch!

Thank you for your review!

> I wonder why this hadn’t been done before;
> Nicolas, Alex, Pierre, thoughts?

There is an older bug with xwidgets support which had problems because
it depended on an old version of webkitgtk (I only found it after I sent
the patch). Maybe that stopped others from submitting.

Ludovic Courtès <ludo <at> gnu.org> writes:
> The patch LGTM, minor stylistic issues:
> …
> Please indent rather along these lines (like in the rest of the file):
>
>   (define-public emacs-xwidgets
>     (package
>       (inherit emacs)
>       (name …) …))
>
> Likewise, for consistency, use unquote-splicing rather than ‘append’:
>
>   (inputs `(("webkitgtk" ,webkitgtk)
>             ;; …
>             ,@(package-inputs emacs)))
>
> Could you send an updated patch?

Is inline here OK? If yes:

From ed2eca1ade73eb6b7c2e8b17541e3e182ade4608 Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab <at> web.de>
Date: Fri, 18 Jan 2019 23:29:14 +0100
Subject: [PATCH] add emacs built with xwidgets-support

* gnu/packages/emacs.scm (emacs-xwidgets): new variable
---
 gnu/packages/emacs.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a488289f1..7e8dcadf9 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -59,6 +59,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages webkit)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix utils)
@@ -210,6 +211,22 @@ languages.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))))
 
+(define-public emacs-xwidgets
+  (package
+    (inherit emacs)
+    (name "emacs-xwidgets")
+    (synopsis "The extensible, customizable, self-documenting text
+editor (with xwidgets support)")
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       '("--with-xwidgets")
+       ,@(package-arguments emacs)))
+    (inputs
+     `(("webkitgtk" ,webkitgtk)
+       ("libxcomposite" ,libxcomposite)
+       ,@(package-inputs emacs)))))
+
 (define-public emacs-no-x
   (package (inherit emacs)
     (name "emacs-no-x")
-- 
2.19.2

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#34128; Package guix-patches. (Wed, 23 Jan 2019 08:21:01 GMT) Full text and rfc822 format available.

Message #14 received at 34128 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Arne Babenhauserheide <arne_bab <at> web.de>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 34128 <at> debbugs.gnu.org
Subject: Re: [bug#34128] [PATCH] add emacs built with xwidgets-support
Date: Wed, 23 Jan 2019 09:19:49 +0100
Arne Babenhauserheide <arne_bab <at> web.de> writes:

> Hi Ludovic,
>
>> Thanks for the patch!
>
> Thank you for your review!
>
>> I wonder why this hadn’t been done before;
>> Nicolas, Alex, Pierre, thoughts?
>
> There is an older bug with xwidgets support which had problems because
> it depended on an old version of webkitgtk (I only found it after I sent
> the patch). Maybe that stopped others from submitting.

I performed the migration of the Emacs xwidgets feature from the old to
the newer webkitgtk API, but that’s when I noticed that xwidgets are
hardly usable in its current state.  I certainly wouldn’t use it as a
browser, for example, because there is virtually no integration with the
rest of Emacs.

It works fine for sending JavaScript snippets to the widgets and have it
respond, but it’s not very well integrated into Emacs.  Disabling
JavaScript has the effect of disabling *all* JavaScript, which makes
scrolling impossible (as it is implemented by sending JavaScript to the
widget).

Turning it into a usable browser would require more fundamental changes,
and that’s when I stopped working on patches.

--
Ricardo





Information forwarded to guix-patches <at> gnu.org:
bug#34128; Package guix-patches. (Wed, 23 Jan 2019 09:38:02 GMT) Full text and rfc822 format available.

Message #17 received at 34128 <at> debbugs.gnu.org (full text, mbox):

From: Arne Babenhauserheide <arne_bab <at> web.de>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 34128 <at> debbugs.gnu.org
Subject: Re: [bug#34128] [PATCH] add emacs built with xwidgets-support
Date: Wed, 23 Jan 2019 10:37:39 +0100
[Message part 1 (text/plain, inline)]
Ricardo Wurmus <rekado <at> elephly.net> writes:

> I performed the migration of the Emacs xwidgets feature from the old to
> the newer webkitgtk API, but that’s when I noticed that xwidgets are
> hardly usable in its current state.  I certainly wouldn’t use it as a
> browser, for example, because there is virtually no integration with the
> rest of Emacs.

I see it as pretty good for many usecases already. I often just want to
look up something in a browser without switching away from Emacs, and
many websites nowadays don’t work with text browsers anymore.

The main thing that’s missing right now is a way to highlight all links
and select the one to follow — similar to next (or one of the other
projects listed on https://qutebrowser.org/ ).

Do you know why it flickers?

> It works fine for sending JavaScript snippets to the widgets and have it
> respond, but it’s not very well integrated into Emacs.  Disabling
> JavaScript has the effect of disabling *all* JavaScript, which makes
> scrolling impossible (as it is implemented by sending JavaScript to the
> widget).

That doesn’t really hurt me: For sites without javascript, eww mostly
works fine. So when running a webkit, I typically need javascript
anyway.

Also xwidgets as a feature enables much more than just a browser.

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#34128; Package guix-patches. (Wed, 23 Jan 2019 09:54:02 GMT) Full text and rfc822 format available.

Message #20 received at 34128 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Arne Babenhauserheide <arne_bab <at> web.de>, 34128 <at> debbugs.gnu.org
Subject: Re: [bug#34128] [PATCH] add emacs built with xwidgets-support
Date: Wed, 23 Jan 2019 10:53:49 +0100
Heya,

Ricardo Wurmus <rekado <at> elephly.net> skribis:

> Arne Babenhauserheide <arne_bab <at> web.de> writes:
>
>> Hi Ludovic,
>>
>>> Thanks for the patch!
>>
>> Thank you for your review!
>>
>>> I wonder why this hadn’t been done before;
>>> Nicolas, Alex, Pierre, thoughts?
>>
>> There is an older bug with xwidgets support which had problems because
>> it depended on an old version of webkitgtk (I only found it after I sent
>> the patch). Maybe that stopped others from submitting.
>
> I performed the migration of the Emacs xwidgets feature from the old to
> the newer webkitgtk API, but that’s when I noticed that xwidgets are
> hardly usable in its current state.  I certainly wouldn’t use it as a
> browser, for example, because there is virtually no integration with the
> rest of Emacs.
>
> It works fine for sending JavaScript snippets to the widgets and have it
> respond, but it’s not very well integrated into Emacs.  Disabling
> JavaScript has the effect of disabling *all* JavaScript, which makes
> scrolling impossible (as it is implemented by sending JavaScript to the
> widget).
>
> Turning it into a usable browser would require more fundamental changes,
> and that’s when I stopped working on patches.

Oh, I was more optimistic; thanks for explaining.

Knowing this, what do you think of adding it as a package?  We also have
‘guile-emacs’ anyway…

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#34128; Package guix-patches. (Wed, 23 Jan 2019 11:43:01 GMT) Full text and rfc822 format available.

Message #23 received at 34128 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Arne Babenhauserheide <arne_bab <at> web.de>, 34128 <at> debbugs.gnu.org
Subject: Re: [bug#34128] [PATCH] add emacs built with xwidgets-support
Date: Wed, 23 Jan 2019 12:41:54 +0100
Ludovic Courtès <ludo <at> gnu.org> writes:

>> I performed the migration of the Emacs xwidgets feature from the old to
>> the newer webkitgtk API, but that’s when I noticed that xwidgets are
>> hardly usable in its current state.  I certainly wouldn’t use it as a
>> browser, for example, because there is virtually no integration with the
>> rest of Emacs.
>>
>> It works fine for sending JavaScript snippets to the widgets and have it
>> respond, but it’s not very well integrated into Emacs.  Disabling
>> JavaScript has the effect of disabling *all* JavaScript, which makes
>> scrolling impossible (as it is implemented by sending JavaScript to the
>> widget).
>>
>> Turning it into a usable browser would require more fundamental changes,
>> and that’s when I stopped working on patches.
>
> Oh, I was more optimistic; thanks for explaining.
>
> Knowing this, what do you think of adding it as a package?  We also have
> ‘guile-emacs’ anyway…

I’m not at all opposed to adding it as a package.  After all, it is a
potentially useful feature and providing a package makes it more likely
that people get to play with it and maybe extend the features by
contributing elisp and JavaScript.

--
Ricardo





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 23 Jan 2019 22:30:02 GMT) Full text and rfc822 format available.

Notification sent to Arne Babenhauserheide <arne_bab <at> web.de>:
bug acknowledged by developer. (Wed, 23 Jan 2019 22:30:03 GMT) Full text and rfc822 format available.

Message #28 received at 34128-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Arne Babenhauserheide <arne_bab <at> web.de>
Cc: 34128-done <at> debbugs.gnu.org
Subject: Re: [bug#34128] [PATCH] add emacs built with xwidgets-support
Date: Wed, 23 Jan 2019 23:29:43 +0100
Hi Arne,

Arne Babenhauserheide <arne_bab <at> web.de> skribis:

> Is inline here OK? If yes:

It is.

> From ed2eca1ade73eb6b7c2e8b17541e3e182ade4608 Mon Sep 17 00:00:00 2001
> From: Arne Babenhauserheide <arne_bab <at> web.de>
> Date: Fri, 18 Jan 2019 23:29:14 +0100
> Subject: [PATCH] add emacs built with xwidgets-support
>
> * gnu/packages/emacs.scm (emacs-xwidgets): new variable

Applied, thank you!

I’ve tried it and I confirm that it flickers and that scrolling doesn’t
quite work as nicely as it could.  ;-)

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#34128; Package guix-patches. (Thu, 24 Jan 2019 19:07:02 GMT) Full text and rfc822 format available.

Message #31 received at 34128-done <at> debbugs.gnu.org (full text, mbox):

From: Arne Babenhauserheide <arne_bab <at> web.de>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 34128-done <at> debbugs.gnu.org
Subject: Re: [bug#34128] [PATCH] add emacs built with xwidgets-support
Date: Thu, 24 Jan 2019 20:06:39 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
>> Subject: [PATCH] add emacs built with xwidgets-support
>>
>> * gnu/packages/emacs.scm (emacs-xwidgets): new variable
>
> Applied, thank you!

Thank you!

> I’ve tried it and I confirm that it flickers and that scrolling doesn’t
> quite work as nicely as it could.  ;-)

Yes — and that it is now as easy as running

    guix package -i emacs-xwidgets && emacs
    M-x xwidget-webkit-browse-url

to test this is cool!

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Feb 2019 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.