unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Using xwidget to play youtube videos
@ 2016-02-09  5:58 Lars Ingebrigtsen
  2016-02-09  9:38 ` joakim
                   ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-09  5:58 UTC (permalink / raw)
  To: emacs-devel; +Cc: joakim

To start playing around with xwidget in eww, I looked at what xwidget
was doing, and I basically ended up with:

(defun eww-tag-iframe (dom)
  (when (fboundp 'make-xwidget)
    (require 'xwidget)
    (let ((xw (xwidget-insert 1 'webkit-osr  (current-buffer)
                              (string-to-number (dom-attr dom 'width))
                              (string-to-number (dom-attr dom 'height)))))
      (xwidget-webkit-goto-uri xw (dom-attr dom 'src)))))

And it works!  Youtube is playing away.  But I get the follwoing:

Debugger entered--Lisp error: (wrong-type-argument xwidgetp nil)
  xwidget-resize(nil 976 674)
  xwidget-webkit-adjust-size-to-window()
  xwidget-webkit-adjust-size-dispatch()
  xwidget-webkit-callback(#<xwidget > document-load-finished)
  xwidget-event-handler()
  funcall-interactively(xwidget-event-handler)
  call-interactively(xwidget-event-handler nil nil)
  command-execute(xwidget-event-handler)

Since I haven't requested any resizing of my widget, that's a bit
surprising.

(defun xwidget-webkit-adjust-size-to-window ()
  "Adjust webkit to window."
  (interactive)
  (xwidget-resize (xwidget-webkit-current-session) (window-pixel-width)
                  (window-pixel-height)))

So...  (xwidget-webkit-current-session) is nil?  I tried grepping
through the xwidget documentation for "session" but didn't see anything
obvious...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

* Re: Using xwidget to play youtube videos
  2016-02-09  5:58 Using xwidget to play youtube videos Lars Ingebrigtsen
@ 2016-02-09  9:38 ` joakim
  2016-02-09 22:55   ` Lars Ingebrigtsen
  2016-02-09 16:31 ` raman
  2016-02-09 16:51 ` Eli Zaretskii
  2 siblings, 1 reply; 33+ messages in thread
From: joakim @ 2016-02-09  9:38 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

Lars Ingebrigtsen <larsi@gnus.org> writes:

> To start playing around with xwidget in eww, I looked at what xwidget
> was doing, and I basically ended up with:
>
> (defun eww-tag-iframe (dom)
>   (when (fboundp 'make-xwidget)
>     (require 'xwidget)
>     (let ((xw (xwidget-insert 1 'webkit-osr  (current-buffer)
>                               (string-to-number (dom-attr dom 'width))
>                               (string-to-number (dom-attr dom 'height)))))
>       (xwidget-webkit-goto-uri xw (dom-attr dom 'src)))))
>
> And it works!  Youtube is playing away.  But I get the follwoing:
>
> Debugger entered--Lisp error: (wrong-type-argument xwidgetp nil)
>   xwidget-resize(nil 976 674)
>   xwidget-webkit-adjust-size-to-window()
>   xwidget-webkit-adjust-size-dispatch()
>   xwidget-webkit-callback(#<xwidget > document-load-finished)
>   xwidget-event-handler()
>   funcall-interactively(xwidget-event-handler)
>   call-interactively(xwidget-event-handler nil nil)
>   command-execute(xwidget-event-handler)
>
> Since I haven't requested any resizing of my widget, that's a bit
> surprising.
>
> (defun xwidget-webkit-adjust-size-to-window ()
>   "Adjust webkit to window."
>   (interactive)
>   (xwidget-resize (xwidget-webkit-current-session) (window-pixel-width)
>                   (window-pixel-height)))
>
> So...  (xwidget-webkit-current-session) is nil?  I tried grepping
> through the xwidget documentation for "session" but didn't see anything
> obvious...

Can I test this somehow? Do I just defun eww-tag-iframe and view a
youtube video url?

There is some code to resize xwidgets, but it shouldn't trigger in your
case I think.

-- 
Joakim Verona



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

* Re: Using xwidget to play youtube videos
  2016-02-09  5:58 Using xwidget to play youtube videos Lars Ingebrigtsen
  2016-02-09  9:38 ` joakim
@ 2016-02-09 16:31 ` raman
  2016-02-09 22:59   ` Lars Ingebrigtsen
  2016-02-09 16:51 ` Eli Zaretskii
  2 siblings, 1 reply; 33+ messages in thread
From: raman @ 2016-02-09 16:31 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: joakim, emacs-devel

Nice! Once the Youtube video starts playing, are you able to send it kbd
events from Emacs to cause rewind/forward etc to happen?

-- 



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

* Re: Using xwidget to play youtube videos
  2016-02-09  5:58 Using xwidget to play youtube videos Lars Ingebrigtsen
  2016-02-09  9:38 ` joakim
  2016-02-09 16:31 ` raman
@ 2016-02-09 16:51 ` Eli Zaretskii
  2016-02-09 23:00   ` Lars Ingebrigtsen
  2 siblings, 1 reply; 33+ messages in thread
From: Eli Zaretskii @ 2016-02-09 16:51 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: joakim, emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Tue, 09 Feb 2016 16:58:51 +1100
> Cc: joakim@verona.se
> 
> (defun xwidget-webkit-adjust-size-to-window ()
>   "Adjust webkit to window."
>   (interactive)
>   (xwidget-resize (xwidget-webkit-current-session) (window-pixel-width)
>                   (window-pixel-height)))
> 
> So...  (xwidget-webkit-current-session) is nil?  I tried grepping
> through the xwidget documentation for "session" but didn't see anything
> obvious...

When the dust settles on this episode, please consider adding the
missing pieces to the documentation, or at least filing a bug report
that says what's missing from there.  The current documentation was
written by someone (yours truly) who had no idea what the various APIs
do and how they work, nor which ones need to be documented and which
don't.

Thanks.



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

* Re: Using xwidget to play youtube videos
  2016-02-09  9:38 ` joakim
@ 2016-02-09 22:55   ` Lars Ingebrigtsen
  2016-02-10 14:14     ` Richard Stallman
  0 siblings, 1 reply; 33+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-09 22:55 UTC (permalink / raw)
  To: joakim; +Cc: emacs-devel

joakim@verona.se writes:

> Can I test this somehow? Do I just defun eww-tag-iframe and view a
> youtube video url?
>
> There is some code to resize xwidgets, but it shouldn't trigger in your
> case I think.

You need the following patch, and view a page that inlines Youtube
videos.

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index fdac464..aef6fde 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -425,6 +425,7 @@ eww-display-html
               shr-external-rendering-functions
               '((title . eww-tag-title)
                 (form . eww-tag-form)
+                (iframe . eww-tag-iframe)
                 (input . eww-tag-input)
                 (button . eww-form-submit)
                 (textarea . eww-tag-textarea)
@@ -2013,6 +2014,14 @@ eww-isearch-next-buffer
       (eww-previous-url)))
   (current-buffer))
 
+(defun eww-tag-iframe (dom)
+  (when (fboundp 'make-xwidget)
+    (require 'xwidget)
+    (let ((xw (xwidget-insert 1 'webkit-osr  (current-buffer)
+                              (string-to-number (dom-attr dom 'width))
+                              (string-to-number (dom-attr dom 'height)))))
+      (xwidget-webkit-goto-uri xw (dom-attr dom 'src)))))
+
 (provide 'eww)
 
 ;;; eww.el ends here


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: Using xwidget to play youtube videos
  2016-02-09 16:31 ` raman
@ 2016-02-09 22:59   ` Lars Ingebrigtsen
  2016-02-10  8:03     ` joakim
  0 siblings, 1 reply; 33+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-09 22:59 UTC (permalink / raw)
  To: raman; +Cc: joakim, emacs-devel

raman <raman@google.com> writes:

> Nice! Once the Youtube video starts playing, are you able to send it kbd
> events from Emacs to cause rewind/forward etc to happen?

I'm not sure.  Joakim?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: Using xwidget to play youtube videos
  2016-02-09 16:51 ` Eli Zaretskii
@ 2016-02-09 23:00   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 33+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-09 23:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: joakim, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> When the dust settles on this episode, please consider adding the
> missing pieces to the documentation, or at least filing a bug report
> that says what's missing from there. 

Will do.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: Using xwidget to play youtube videos
  2016-02-09 22:59   ` Lars Ingebrigtsen
@ 2016-02-10  8:03     ` joakim
  0 siblings, 0 replies; 33+ messages in thread
From: joakim @ 2016-02-10  8:03 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel, raman

Lars Ingebrigtsen <larsi@gnus.org> writes:

> raman <raman@google.com> writes:
>
>> Nice! Once the Youtube video starts playing, are you able to send it kbd
>> events from Emacs to cause rewind/forward etc to happen?
>
> I'm not sure.  Joakim?

It's not currently possible to send keyboard events as such at the gtk
level. Although that seemed easy enough to implement, I couldn't make it work
at the time. 

It is posible, though, to use javascript snippets to control the
widget. This is the method that is used to fill textarea components in
the webkit widget with text from Emacs.

This method might also be used to simulate keyboard events in the
widget, here is a link I found:

http://stackoverflow.com/questions/596481/simulate-javascript-key-events



-- 
Joakim Verona



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

* Re: Using xwidget to play youtube videos
  2016-02-09 22:55   ` Lars Ingebrigtsen
@ 2016-02-10 14:14     ` Richard Stallman
  2016-02-10 14:41       ` Andreas Schwab
  2016-02-11  3:48       ` Lars Ingebrigtsen
  0 siblings, 2 replies; 33+ messages in thread
From: Richard Stallman @ 2016-02-10 14:14 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: joakim, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > You need the following patch, and view a page that inlines Youtube
  > videos.

Youtube normally sends nonfree javascript code to the browser,
and without running that, the video does not appear.  What program
are you using to view the videos?

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: Using xwidget to play youtube videos
  2016-02-10 14:14     ` Richard Stallman
@ 2016-02-10 14:41       ` Andreas Schwab
  2016-02-11  5:18         ` Marcin Borkowski
  2016-02-11  3:48       ` Lars Ingebrigtsen
  1 sibling, 1 reply; 33+ messages in thread
From: Andreas Schwab @ 2016-02-10 14:41 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Lars Ingebrigtsen, joakim, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Youtube normally sends nonfree javascript code to the browser,
> and without running that, the video does not appear.  What program
> are you using to view the videos?

youtube-dl can download them, or show the ultimative video URL.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



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

* Re: Using xwidget to play youtube videos
  2016-02-10 14:14     ` Richard Stallman
  2016-02-10 14:41       ` Andreas Schwab
@ 2016-02-11  3:48       ` Lars Ingebrigtsen
  2016-02-11 18:21         ` Richard Stallman
  1 sibling, 1 reply; 33+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-11  3:48 UTC (permalink / raw)
  To: Richard Stallman; +Cc: joakim, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Youtube normally sends nonfree javascript code to the browser,
> and without running that, the video does not appear.  What program
> are you using to view the videos?

It's using an xwidget, which is basically a wrapper over a Webkit
window, which will, indeed, run any Javascript that's present in the URL
presented to it.

But I'm not suggesting that eww should support stuff like that in
general.  It's just a test case to see how xwidget works (or not).  I
think the only support for videos in eww will be for the HTML5 <video>
element (via xwidget), which isn't very Javascripty, if I understand
things correctly.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: Using xwidget to play youtube videos
  2016-02-10 14:41       ` Andreas Schwab
@ 2016-02-11  5:18         ` Marcin Borkowski
  2016-02-11  9:51           ` Andreas Schwab
                             ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Marcin Borkowski @ 2016-02-11  5:18 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Lars Ingebrigtsen, Richard Stallman, joakim, emacs-devel


On 2016-02-10, at 15:41, Andreas Schwab <schwab@suse.de> wrote:

> youtube-dl can download them,

(which is technically illegal, AFAIK)

> or show the ultimative video URL.

What do you mean by that?  YT can show the URL, too, by using the
"share" option, doesn't it?

> Andreas.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: Using xwidget to play youtube videos
  2016-02-11  5:18         ` Marcin Borkowski
@ 2016-02-11  9:51           ` Andreas Schwab
  2016-02-11 18:21           ` Richard Stallman
  2016-02-12  3:43           ` Matthew Carter
  2 siblings, 0 replies; 33+ messages in thread
From: Andreas Schwab @ 2016-02-11  9:51 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Lars Ingebrigtsen, Richard Stallman, joakim, emacs-devel

Marcin Borkowski <mbork@mbork.pl> writes:

> What do you mean by that?

youtube-dl -g

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



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

* Re: Using xwidget to play youtube videos
  2016-02-11  5:18         ` Marcin Borkowski
  2016-02-11  9:51           ` Andreas Schwab
@ 2016-02-11 18:21           ` Richard Stallman
  2016-02-21 17:17             ` Nix
  2016-02-12  3:43           ` Matthew Carter
  2 siblings, 1 reply; 33+ messages in thread
From: Richard Stallman @ 2016-02-11 18:21 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: schwab, larsi, joakim, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

youtube-dl is the only way to access Youtube that doesn't mistreat the
user with nonfree software.  Since normal access to Youtube requires
running nonfree software, we should always recommend youtube-dl
any time we mention use of youtube.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: Using xwidget to play youtube videos
  2016-02-11  3:48       ` Lars Ingebrigtsen
@ 2016-02-11 18:21         ` Richard Stallman
  2016-02-11 18:46           ` joakim
  0 siblings, 1 reply; 33+ messages in thread
From: Richard Stallman @ 2016-02-11 18:21 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: joakim, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > It's using an xwidget, which is basically a wrapper over a Webkit
  > window, which will, indeed, run any Javascript that's present in the URL
  > presented to it.

Can users use any widget type they like, or is Emacs limited
to running this specific widget which uses Webkit?

I think I heard Webkit is free software, but it the browser we want to
recommend is IceCat.  Is there a widget version of IceCat, that Emacs
could use?

  >   I
  > think the only support for videos in eww will be for the HTML5 <video>
  > element (via xwidget), which isn't very Javascripty, if I understand
  > things correctly.

EWW is totally different from the xwidget feature, right?  If so,
EWW and xwidget are unrelated issues.

The HTML <video> construct works without Javascript; but Youtube and
some other sites use it together with nonfree JS code, in such a way
that it won't work unless the browser runs the JS code.




-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: Using xwidget to play youtube videos
  2016-02-11 18:21         ` Richard Stallman
@ 2016-02-11 18:46           ` joakim
  2016-02-12 12:34             ` Richard Stallman
  0 siblings, 1 reply; 33+ messages in thread
From: joakim @ 2016-02-11 18:46 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Lars Ingebrigtsen, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > It's using an xwidget, which is basically a wrapper over a Webkit
>   > window, which will, indeed, run any Javascript that's present in the URL
>   > presented to it.
>
> Can users use any widget type they like, or is Emacs limited
> to running this specific widget which uses Webkit?



> I think I heard Webkit is free software, but it the browser we want to
> recommend is IceCat.  Is there a widget version of IceCat, that Emacs
> could use?

Webkit is free software.

In the version of the xwidget branch that was merged to emacs-25, there
is only webkit support. Eventually more widget types will be suported,
and are already supported in the main feature branch.

As far as I understand, IceCat is a Firefox derivative. At the outset I
wanted to support Firefox in the xwidget project. This turned out to be
not possible at the time because there were no functional GTK
bindings. This might have changed in the interim.

Also, perhaps GNU LibreJS could be adapted to webkit. 

>
>   >   I
>   > think the only support for videos in eww will be for the HTML5 <video>
>   > element (via xwidget), which isn't very Javascripty, if I understand
>   > things correctly.
>
> EWW is totally different from the xwidget feature, right?  If so,
> EWW and xwidget are unrelated issues.
>
> The HTML <video> construct works without Javascript; but Youtube and
> some other sites use it together with nonfree JS code, in such a way
> that it won't work unless the browser runs the JS code.

-- 
Joakim Verona



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

* Re: Using xwidget to play youtube videos
  2016-02-11  5:18         ` Marcin Borkowski
  2016-02-11  9:51           ` Andreas Schwab
  2016-02-11 18:21           ` Richard Stallman
@ 2016-02-12  3:43           ` Matthew Carter
  2016-02-12 13:05             ` Marcin Borkowski
  2 siblings, 1 reply; 33+ messages in thread
From: Matthew Carter @ 2016-02-12  3:43 UTC (permalink / raw)
  To: Marcin Borkowski
  Cc: Andreas Schwab, Lars Ingebrigtsen, Richard Stallman, joakim,
	emacs-devel

Marcin Borkowski <mbork@mbork.pl> writes:

> On 2016-02-10, at 15:41, Andreas Schwab <schwab@suse.de> wrote:
>
>> youtube-dl can download them,
>
> (which is technically illegal, AFAIK)
>
>> or show the ultimative video URL.
>
> What do you mean by that?  YT can show the URL, too, by using the
> "share" option, doesn't it?
>
>> Andreas.
>
> Best,

In what regions is it illegal?  What law specifically is it breaking?

I don't see how youtube-dl parsing the HTML YouTube sends, and following
a video link in the HTML, then downloading just the video is any
different than a browser doing the same thing (other than the browser
will normally delete the video from it's hidden download directory when
done with the page).

Or do you mean it is against the YouTube TOS?

The share option is a link to a YouTube HTML page with the video in a
container, the "ultimate video URL" is the actual (often obfuscated by
YouTube) link to the direct Shockwave Flash or HTML5 video (ending in
.swf etc. - the streamed video file itself).

-- 
Matthew Carter (m@ahungry.com)
http://ahungry.com



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

* Re: Using xwidget to play youtube videos
  2016-02-11 18:46           ` joakim
@ 2016-02-12 12:34             ` Richard Stallman
  0 siblings, 0 replies; 33+ messages in thread
From: Richard Stallman @ 2016-02-12 12:34 UTC (permalink / raw)
  To: joakim; +Cc: larsi, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > As far as I understand, IceCat is a Firefox derivative. At the outset I
  > wanted to support Firefox in the xwidget project. This turned out to be
  > not possible at the time because there were no functional GTK
  > bindings. This might have changed in the interim.

Can you please check?  IceCat has many changes to protect users'
privacy, so it is important to recommend that browser.

  > Also, perhaps GNU LibreJS could be adapted to webkit. 

It is a Firefox extension.  I don't know how hard it is to make
them work in Webkit, and I don't know who to ask.


-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: Using xwidget to play youtube videos
  2016-02-12  3:43           ` Matthew Carter
@ 2016-02-12 13:05             ` Marcin Borkowski
  2016-02-13 15:33               ` Richard Stallman
  0 siblings, 1 reply; 33+ messages in thread
From: Marcin Borkowski @ 2016-02-12 13:05 UTC (permalink / raw)
  To: Matthew Carter
  Cc: Andreas Schwab, Lars Ingebrigtsen, Richard Stallman, joakim,
	emacs-devel


On 2016-02-12, at 04:43, Matthew Carter <m@ahungry.com> wrote:

> Marcin Borkowski <mbork@mbork.pl> writes:
>
>> On 2016-02-10, at 15:41, Andreas Schwab <schwab@suse.de> wrote:
>>
>>> youtube-dl can download them,
>>
>> (which is technically illegal, AFAIK)
>>
>>> or show the ultimative video URL.
>>
>> What do you mean by that?  YT can show the URL, too, by using the
>> "share" option, doesn't it?
>>
>>> Andreas.
>>
>> Best,
>
> In what regions is it illegal?  What law specifically is it breaking?
>
> I don't see how youtube-dl parsing the HTML YouTube sends, and following
> a video link in the HTML, then downloading just the video is any
> different than a browser doing the same thing (other than the browser
> will normally delete the video from it's hidden download directory when
> done with the page).
>
> Or do you mean it is against the YouTube TOS?

Yes, I meant that.  I guess breaking the contract you entered is illegal
in most jurisdictions.  (BTW, those ToS are absurd, IMVHO.  But this is
another story.)

> The share option is a link to a YouTube HTML page with the video in a
> container, the "ultimate video URL" is the actual (often obfuscated by
> YouTube) link to the direct Shockwave Flash or HTML5 video (ending in
> .swf etc. - the streamed video file itself).

Ah, I see.  Interesting.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: Using xwidget to play youtube videos
  2016-02-12 13:05             ` Marcin Borkowski
@ 2016-02-13 15:33               ` Richard Stallman
  2016-02-14 12:21                 ` Elias Mårtenson
  0 siblings, 1 reply; 33+ messages in thread
From: Richard Stallman @ 2016-02-13 15:33 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: schwab, larsi, m, joakim, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Yes, I meant that.  I guess breaking the contract you entered is illegal
  > in most jurisdictions.

In general, breaking a contract is not illegal.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: Using xwidget to play youtube videos
  2016-02-13 15:33               ` Richard Stallman
@ 2016-02-14 12:21                 ` Elias Mårtenson
  2016-02-14 12:33                   ` Dmitry Gutov
  2016-02-15 10:26                   ` Richard Stallman
  0 siblings, 2 replies; 33+ messages in thread
From: Elias Mårtenson @ 2016-02-14 12:21 UTC (permalink / raw)
  To: rms; +Cc: schwab, Joakim Verona, emacs-devel, Lars Magne Ingebrigtsen, m

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

On 13 Feb 2016 23:34, "Richard Stallman" <rms@gnu.org> wrote:

> In general, breaking a contract is not illegal.

I don't know if there are any lawyers on this list, but reading this thread
raised some questions for me.

In this case (user using youtube-dl to get the underlying link) is there
even a contract to break? The user certainly never saw a contract.

Try as I may, the best I can come up with is Google having a case against
the maker of youtube-dl for creating a tool to facilitate copyright
infringement. But then again, the copyrights are owned by the content
creators, not Google.

Am I correct in this?

[-- Attachment #2: Type: text/html, Size: 781 bytes --]

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

* Re: Using xwidget to play youtube videos
  2016-02-14 12:21                 ` Elias Mårtenson
@ 2016-02-14 12:33                   ` Dmitry Gutov
  2016-02-14 15:32                     ` Elias Mårtenson
  2016-02-15 10:26                   ` Richard Stallman
  1 sibling, 1 reply; 33+ messages in thread
From: Dmitry Gutov @ 2016-02-14 12:33 UTC (permalink / raw)
  To: Elias Mårtenson, rms
  Cc: schwab, Lars Magne Ingebrigtsen, m, Joakim Verona, emacs-devel

On 02/14/2016 02:21 PM, Elias Mårtenson wrote:

> Try as I may, the best I can come up with is Google having a case
> against the maker of youtube-dl for creating a tool to facilitate
> copyright infringement. But then again, the copyrights are owned by the
> content creators, not Google.

And how is it even a copyright infringement, if the user is just 
downloading the content that's already been made available to them?



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

* Re: Using xwidget to play youtube videos
  2016-02-14 12:33                   ` Dmitry Gutov
@ 2016-02-14 15:32                     ` Elias Mårtenson
  0 siblings, 0 replies; 33+ messages in thread
From: Elias Mårtenson @ 2016-02-14 15:32 UTC (permalink / raw)
  To: Dmitry Gutov
  Cc: rms, schwab, Joakim Verona, emacs-devel, Lars Magne Ingebrigtsen,
	m

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

On 14 February 2016 at 20:33, Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 02/14/2016 02:21 PM, Elias Mårtenson wrote:
>
> Try as I may, the best I can come up with is Google having a case
>> against the maker of youtube-dl for creating a tool to facilitate
>> copyright infringement. But then again, the copyrights are owned by the
>> content creators, not Google.
>>
>
> And how is it even a copyright infringement, if the user is just
> downloading the content that's already been made available to them?
>

Made available, without the user having to click through a EULA, no less.

[-- Attachment #2: Type: text/html, Size: 1065 bytes --]

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

* Re: Using xwidget to play youtube videos
  2016-02-14 12:21                 ` Elias Mårtenson
  2016-02-14 12:33                   ` Dmitry Gutov
@ 2016-02-15 10:26                   ` Richard Stallman
  2016-02-15 10:42                     ` Marcin Borkowski
  1 sibling, 1 reply; 33+ messages in thread
From: Richard Stallman @ 2016-02-15 10:26 UTC (permalink / raw)
  To: Elias Mårtenson; +Cc: schwab, joakim, emacs-devel, larsi, m

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > In this case (user using youtube-dl to get the underlying link) is there
  > even a contract to break? The user certainly never saw a contract.

I once asked a lawyer about that.  The answer seems not to be clear.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: Using xwidget to play youtube videos
  2016-02-15 10:26                   ` Richard Stallman
@ 2016-02-15 10:42                     ` Marcin Borkowski
  0 siblings, 0 replies; 33+ messages in thread
From: Marcin Borkowski @ 2016-02-15 10:42 UTC (permalink / raw)
  To: rms; +Cc: schwab, Elias Mårtenson, joakim, emacs-devel, larsi, m


On 2016-02-15, at 11:26, Richard Stallman <rms@gnu.org> wrote:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > In this case (user using youtube-dl to get the underlying link) is there
>   > even a contract to break? The user certainly never saw a contract.
>
> I once asked a lawyer about that.  The answer seems not to be clear.

Why am I not surprised...?

Once I mentioned some issue connected with the so-called "IP law" to
a colleague of mine (who holds some important position in the
academia).  He expressed his opinion about the need of shooting dead all
the lawyers.  While I'd prefer a less drastic approach (a pillory, for
instance, or plain old prison), I can see some reason behind it...

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: Using xwidget to play youtube videos
  2016-02-11 18:21           ` Richard Stallman
@ 2016-02-21 17:17             ` Nix
  2016-02-22  3:56               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 33+ messages in thread
From: Nix @ 2016-02-21 17:17 UTC (permalink / raw)
  To: Richard Stallman; +Cc: schwab, larsi, joakim, emacs-devel

On 11 Feb 2016, Richard Stallman outgrape:

> youtube-dl is the only way to access Youtube that doesn't mistreat the
> user with nonfree software.

Actually there are others -- cclive / libquvi, for instance, or the Kodi
YouTube addon. (But your point stands. These other programs all work
more or less the same way youtube-dl does, in any case.)

-- 
NULL && (void)



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

* Re: Using xwidget to play youtube videos
  2016-02-21 17:17             ` Nix
@ 2016-02-22  3:56               ` Lars Ingebrigtsen
  2016-02-22  9:27                 ` joakim
  2016-02-22 16:09                 ` Eli Zaretskii
  0 siblings, 2 replies; 33+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-22  3:56 UTC (permalink / raw)
  To: emacs-devel

I've taken another short stab at playing with xwidget, and I can't
really make heads or tails of it, I'm afraid.  Patch to eww below.

First of all, it seems like all the xwidget functions are geared towards
only being displayed in an xwidget buffer.  The xwidget functions rename
buffers willy-nilly when just inserting an xwidget into a buffer, and
that should not happen.  There are also hard-coded callbacks in the
xwidgets for adjusting the size and ... stuff ... that don't make any
sense in anything but xwidget buffers, either.

The xwidget core code has to be separated out from the xwidget mode
code, and the latter should set the callbacks it wants to use.

I think that's probably easily doable, but it would be nice if someone
who knew the code and what it was trying to do did that.  :-)

Second of all, it's quite glitchy.  Even if you manage to somehow insert
an xwidget into your buffer, scrolling around in the buffer sometimes
makes the xwidget show up twice, or no times, or leaves half the widget
displayed and half not.

So, er...  this stuff doesn't really seem finished.  :-)  I think it's
exciting, but it needs work.  Should this be in emacs-25?

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 7f9f4fa..3d94508 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -426,6 +426,7 @@ eww-display-html
               '((title . eww-tag-title)
                 (form . eww-tag-form)
                 (input . eww-tag-input)
+                (iframe . eww-tag-iframe)
                 (button . eww-form-submit)
                 (textarea . eww-tag-textarea)
                 (select . eww-tag-select)
@@ -2000,6 +2001,16 @@ eww-restore-desktop
 (add-to-list 'desktop-buffer-mode-handlers
              '(eww-mode . eww-restore-desktop))
 
+(defun eww-tag-iframe (dom)
+  (when (fboundp 'make-xwidget)
+    (require 'xwidget)
+    (insert "-")
+    (let ((xw (xwidget-insert (1- (point)) 'webkit-osr  (current-buffer)
+                              (string-to-number (dom-attr dom 'width))
+                              (string-to-number (dom-attr dom 'height)))))
+      (xwidget-webkit-goto-uri xw (dom-attr dom 'src))
+      (insert "---"))))
+
 ;;; Isearch support
 
 (defun eww-isearch-next-buffer (&optional _buffer wrap)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* Re: Using xwidget to play youtube videos
  2016-02-22  3:56               ` Lars Ingebrigtsen
@ 2016-02-22  9:27                 ` joakim
  2016-02-22 16:26                   ` Eli Zaretskii
  2016-02-23  1:24                   ` Lars Ingebrigtsen
  2016-02-22 16:09                 ` Eli Zaretskii
  1 sibling, 2 replies; 33+ messages in thread
From: joakim @ 2016-02-22  9:27 UTC (permalink / raw)
  To: emacs-devel

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I've taken another short stab at playing with xwidget, and I can't
> really make heads or tails of it, I'm afraid.  Patch to eww below.
>
> First of all, it seems like all the xwidget functions are geared towards
> only being displayed in an xwidget buffer.  The xwidget functions rename
> buffers willy-nilly when just inserting an xwidget into a buffer, and
> that should not happen.  There are also hard-coded callbacks in the
> xwidgets for adjusting the size and ... stuff ... that don't make any
> sense in anything but xwidget buffers, either.

There are a lot of functions that are gearead toward managing a xwidget
instance in a buffer which behaves like image mode. They only work in
that particular use case. Those functions could have their own prefix I
suppose. Also I was probably sloppy in some cases and wrote functions
that assumed a webkit browser buffer rather than taking a xwidget
instance as an argument.

Anyway, I would like to improve the api so it works better in this
use-case, and I think that mostly involves, doing what you say below.

>
> The xwidget core code has to be separated out from the xwidget mode
> code, and the latter should set the callbacks it wants to use.
>
> I think that's probably easily doable, but it would be nice if someone
> who knew the code and what it was trying to do did that.  :-)
>
> Second of all, it's quite glitchy.  Even if you manage to somehow insert
> an xwidget into your buffer, scrolling around in the buffer sometimes
> makes the xwidget show up twice, or no times, or leaves half the widget
> displayed and half not.


Needless to say I don't experience the glitchiness you seem to
experience, on my Fedora 23 install(And previouse fedora releases). It
would be useful to know which library versions you have, and if they are
older than the one Fedora ships, we could hinder compilation with those
library versions.

I can also have missed some cases of clipping, which might show up in
your setup but not in mine. The widget showing up twice might be due to
a clipping problem. "half, or no times" do you mean that the entire
xwidget is on screen, but doesnt show properly?

>
> So, er...  this stuff doesn't really seem finished.  :-)  I think it's
> exciting, but it needs work.  Should this be in emacs-25?
>
> diff --git a/lisp/net/eww.el b/lisp/net/eww.el
> index 7f9f4fa..3d94508 100644
> --- a/lisp/net/eww.el
> +++ b/lisp/net/eww.el
> @@ -426,6 +426,7 @@ eww-display-html
>                '((title . eww-tag-title)
>                  (form . eww-tag-form)
>                  (input . eww-tag-input)
> +                (iframe . eww-tag-iframe)
>                  (button . eww-form-submit)
>                  (textarea . eww-tag-textarea)
>                  (select . eww-tag-select)
> @@ -2000,6 +2001,16 @@ eww-restore-desktop
>  (add-to-list 'desktop-buffer-mode-handlers
>               '(eww-mode . eww-restore-desktop))
>  
> +(defun eww-tag-iframe (dom)
> +  (when (fboundp 'make-xwidget)
> +    (require 'xwidget)
> +    (insert "-")
> +    (let ((xw (xwidget-insert (1- (point)) 'webkit-osr  (current-buffer)
> +                              (string-to-number (dom-attr dom 'width))
> +                              (string-to-number (dom-attr dom 'height)))))
> +      (xwidget-webkit-goto-uri xw (dom-attr dom 'src))
> +      (insert "---"))))
> +
>  ;;; Isearch support
>  
>  (defun eww-isearch-next-buffer (&optional _buffer wrap)

-- 
Joakim Verona



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

* Re: Using xwidget to play youtube videos
  2016-02-22  3:56               ` Lars Ingebrigtsen
  2016-02-22  9:27                 ` joakim
@ 2016-02-22 16:09                 ` Eli Zaretskii
  2016-02-22 18:59                   ` joakim
  2016-02-22 18:59                   ` John Wiegley
  1 sibling, 2 replies; 33+ messages in thread
From: Eli Zaretskii @ 2016-02-22 16:09 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 22 Feb 2016 14:56:10 +1100
> 
> Should [xwidget] be in emacs-25?

That ship has sailed: xwidget is already in emacs-25.  If it has
serious problems, we need to fix them before the release.  Please
submit detailed bug reports about each problem; I'm sure Joakim will
look into each such bug report.

Thanks.



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

* Re: Using xwidget to play youtube videos
  2016-02-22  9:27                 ` joakim
@ 2016-02-22 16:26                   ` Eli Zaretskii
  2016-02-23  1:24                   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 33+ messages in thread
From: Eli Zaretskii @ 2016-02-22 16:26 UTC (permalink / raw)
  To: joakim; +Cc: emacs-devel

> From: joakim@verona.se
> Date: Mon, 22 Feb 2016 10:27:48 +0100
> 
> > First of all, it seems like all the xwidget functions are geared towards
> > only being displayed in an xwidget buffer.  The xwidget functions rename
> > buffers willy-nilly when just inserting an xwidget into a buffer, and
> > that should not happen.  There are also hard-coded callbacks in the
> > xwidgets for adjusting the size and ... stuff ... that don't make any
> > sense in anything but xwidget buffers, either.
> 
> There are a lot of functions that are gearead toward managing a xwidget
> instance in a buffer which behaves like image mode. They only work in
> that particular use case. Those functions could have their own prefix I
> suppose.

Could you please mention this fact in the doc strings of functions
that are supposed to be used on that case only?

> Also I was probably sloppy in some cases and wrote functions that
> assumed a webkit browser buffer rather than taking a xwidget
> instance as an argument.

It would be good to see if these can be fixed.

Thanks.



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

* Re: Using xwidget to play youtube videos
  2016-02-22 16:09                 ` Eli Zaretskii
@ 2016-02-22 18:59                   ` joakim
  2016-02-22 18:59                   ` John Wiegley
  1 sibling, 0 replies; 33+ messages in thread
From: joakim @ 2016-02-22 18:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Date: Mon, 22 Feb 2016 14:56:10 +1100
>> 
>> Should [xwidget] be in emacs-25?
>
> That ship has sailed: xwidget is already in emacs-25.  If it has
> serious problems, we need to fix them before the release.  Please
> submit detailed bug reports about each problem; I'm sure Joakim will
> look into each such bug report.

I am. I'm just slow.

>
> Thanks.
>

-- 
Joakim Verona



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

* Re: Using xwidget to play youtube videos
  2016-02-22 16:09                 ` Eli Zaretskii
  2016-02-22 18:59                   ` joakim
@ 2016-02-22 18:59                   ` John Wiegley
  1 sibling, 0 replies; 33+ messages in thread
From: John Wiegley @ 2016-02-22 18:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, emacs-devel

>>>>> Eli Zaretskii <eliz@gnu.org> writes:

> That ship has sailed: xwidget is already in emacs-25. If it has serious
> problems, we need to fix them before the release. Please submit detailed bug
> reports about each problem; I'm sure Joakim will look into each such bug
> report.

Yes, please do, I would like this feature to be solid before it is shipped.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



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

* Re: Using xwidget to play youtube videos
  2016-02-22  9:27                 ` joakim
  2016-02-22 16:26                   ` Eli Zaretskii
@ 2016-02-23  1:24                   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 33+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-23  1:24 UTC (permalink / raw)
  To: joakim; +Cc: emacs-devel

joakim@verona.se writes:

> Needless to say I don't experience the glitchiness you seem to
> experience, on my Fedora 23 install(And previouse fedora releases). It
> would be useful to know which library versions you have, and if they are
> older than the one Fedora ships, we could hinder compilation with those
> library versions.

This is what report-emacs-bug says about gtk:

In GNU Emacs 25.1.50.122 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7)
 of 2016-02-22 built on mouse
Repository revision: 87e9e1b61cd4c0356e7f357f5cee6c226dc6fd35
Windowing system distributor 'The X.Org Foundation', version 11.0.11702000
System Description:	Ubuntu 15.10

Are there other libraries involved?

> I can also have missed some cases of clipping, which might show up in
> your setup but not in mine. The widget showing up twice might be due to
> a clipping problem. "half, or no times" do you mean that the entire
> xwidget is on screen, but doesnt show properly?

Yes, I had a situation yesterday where the left half just showed the
window background, while the right half showed youtube...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

end of thread, other threads:[~2016-02-23  1:24 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-09  5:58 Using xwidget to play youtube videos Lars Ingebrigtsen
2016-02-09  9:38 ` joakim
2016-02-09 22:55   ` Lars Ingebrigtsen
2016-02-10 14:14     ` Richard Stallman
2016-02-10 14:41       ` Andreas Schwab
2016-02-11  5:18         ` Marcin Borkowski
2016-02-11  9:51           ` Andreas Schwab
2016-02-11 18:21           ` Richard Stallman
2016-02-21 17:17             ` Nix
2016-02-22  3:56               ` Lars Ingebrigtsen
2016-02-22  9:27                 ` joakim
2016-02-22 16:26                   ` Eli Zaretskii
2016-02-23  1:24                   ` Lars Ingebrigtsen
2016-02-22 16:09                 ` Eli Zaretskii
2016-02-22 18:59                   ` joakim
2016-02-22 18:59                   ` John Wiegley
2016-02-12  3:43           ` Matthew Carter
2016-02-12 13:05             ` Marcin Borkowski
2016-02-13 15:33               ` Richard Stallman
2016-02-14 12:21                 ` Elias Mårtenson
2016-02-14 12:33                   ` Dmitry Gutov
2016-02-14 15:32                     ` Elias Mårtenson
2016-02-15 10:26                   ` Richard Stallman
2016-02-15 10:42                     ` Marcin Borkowski
2016-02-11  3:48       ` Lars Ingebrigtsen
2016-02-11 18:21         ` Richard Stallman
2016-02-11 18:46           ` joakim
2016-02-12 12:34             ` Richard Stallman
2016-02-09 16:31 ` raman
2016-02-09 22:59   ` Lars Ingebrigtsen
2016-02-10  8:03     ` joakim
2016-02-09 16:51 ` Eli Zaretskii
2016-02-09 23:00   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).