all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#34128] [PATCH] add emacs built with xwidgets-support
@ 2019-01-18 22:29 Arne Babenhauserheide
  2019-01-22 21:48 ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Arne Babenhauserheide @ 2019-01-18 22:29 UTC (permalink / raw)
  To: 34128

[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]

* 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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1076 bytes --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#34128] [PATCH] add emacs built with xwidgets-support
  2019-01-18 22:29 [bug#34128] [PATCH] add emacs built with xwidgets-support Arne Babenhauserheide
@ 2019-01-22 21:48 ` Ludovic Courtès
  2019-01-22 23:10   ` Arne Babenhauserheide
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2019-01-22 21:48 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 34128

Hi Arne,

Arne Babenhauserheide <arne_bab@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’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#34128] [PATCH] add emacs built with xwidgets-support
  2019-01-22 21:48 ` Ludovic Courtès
@ 2019-01-22 23:10   ` Arne Babenhauserheide
  2019-01-23  8:19     ` Ricardo Wurmus
  2019-01-23 22:29     ` bug#34128: " Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Arne Babenhauserheide @ 2019-01-22 23:10 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 34128

[-- Attachment #1: Type: text/plain, Size: 2455 bytes --]

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@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@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1076 bytes --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#34128] [PATCH] add emacs built with xwidgets-support
  2019-01-22 23:10   ` Arne Babenhauserheide
@ 2019-01-23  8:19     ` Ricardo Wurmus
  2019-01-23  9:37       ` Arne Babenhauserheide
  2019-01-23  9:53       ` Ludovic Courtès
  2019-01-23 22:29     ` bug#34128: " Ludovic Courtès
  1 sibling, 2 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2019-01-23  8:19 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 34128


Arne Babenhauserheide <arne_bab@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#34128] [PATCH] add emacs built with xwidgets-support
  2019-01-23  8:19     ` Ricardo Wurmus
@ 2019-01-23  9:37       ` Arne Babenhauserheide
  2019-01-23  9:53       ` Ludovic Courtès
  1 sibling, 0 replies; 9+ messages in thread
From: Arne Babenhauserheide @ 2019-01-23  9:37 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 34128

[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]


Ricardo Wurmus <rekado@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1076 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#34128] [PATCH] add emacs built with xwidgets-support
  2019-01-23  8:19     ` Ricardo Wurmus
  2019-01-23  9:37       ` Arne Babenhauserheide
@ 2019-01-23  9:53       ` Ludovic Courtès
  2019-01-23 11:41         ` Ricardo Wurmus
  1 sibling, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2019-01-23  9:53 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Arne Babenhauserheide, 34128

Heya,

Ricardo Wurmus <rekado@elephly.net> skribis:

> Arne Babenhauserheide <arne_bab@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’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#34128] [PATCH] add emacs built with xwidgets-support
  2019-01-23  9:53       ` Ludovic Courtès
@ 2019-01-23 11:41         ` Ricardo Wurmus
  0 siblings, 0 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2019-01-23 11:41 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Arne Babenhauserheide, 34128


Ludovic Courtès <ludo@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#34128: [PATCH] add emacs built with xwidgets-support
  2019-01-22 23:10   ` Arne Babenhauserheide
  2019-01-23  8:19     ` Ricardo Wurmus
@ 2019-01-23 22:29     ` Ludovic Courtès
  2019-01-24 19:06       ` [bug#34128] " Arne Babenhauserheide
  1 sibling, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2019-01-23 22:29 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 34128-done

Hi Arne,

Arne Babenhauserheide <arne_bab@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@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’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#34128] [PATCH] add emacs built with xwidgets-support
  2019-01-23 22:29     ` bug#34128: " Ludovic Courtès
@ 2019-01-24 19:06       ` Arne Babenhauserheide
  0 siblings, 0 replies; 9+ messages in thread
From: Arne Babenhauserheide @ 2019-01-24 19:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 34128-done

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]


Ludovic Courtès <ludo@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1076 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-01-24 19:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 22:29 [bug#34128] [PATCH] add emacs built with xwidgets-support Arne Babenhauserheide
2019-01-22 21:48 ` Ludovic Courtès
2019-01-22 23:10   ` Arne Babenhauserheide
2019-01-23  8:19     ` Ricardo Wurmus
2019-01-23  9:37       ` Arne Babenhauserheide
2019-01-23  9:53       ` Ludovic Courtès
2019-01-23 11:41         ` Ricardo Wurmus
2019-01-23 22:29     ` bug#34128: " Ludovic Courtès
2019-01-24 19:06       ` [bug#34128] " Arne Babenhauserheide

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.