Gnus development mailing list
 help / color / mirror / Atom feed
* eww
@ 2013-06-16 14:53 Lars Magne Ingebrigtsen
  2013-06-16 15:21 ` eww Adam Sjøgren
                   ` (5 more replies)
  0 siblings, 6 replies; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-16 14:53 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

eww probably has a lot of stuff that could still be fixed up, but the
basics are working now.  That is, you can search for stuff on Google and
visit Wikipedia.  :-)

I wrote it up a bit here:

http://lars.ingebrigtsen.no/2013/06/eww.html

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



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

* Re: eww
  2013-06-16 14:53 eww Lars Magne Ingebrigtsen
@ 2013-06-16 15:21 ` Adam Sjøgren
  2013-06-16 15:29   ` eww Lars Magne Ingebrigtsen
  2013-06-16 23:42 ` eww lee
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 59+ messages in thread
From: Adam Sjøgren @ 2013-06-16 15:21 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> eww probably has a lot of stuff that could still be fixed up, but the
> basics are working now.  That is, you can search for stuff on Google and
> visit Wikipedia.  :-)

Cool!

It looks like input elements are supported, but textarea less so?

 * http://koldfront.dk/misc/browsers/textarea.html


  Best regards,

    Adam

-- 
 "Tell them to give it to Donovan."                           Adam Sjøgren
                                                         asjo@koldfront.dk




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

* Re: eww
  2013-06-16 15:21 ` eww Adam Sjøgren
@ 2013-06-16 15:29   ` Lars Magne Ingebrigtsen
  2013-06-16 15:46     ` eww Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-16 15:29 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: emacs-devel, ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> It looks like input elements are supported, but textarea less so?
>
>  * http://koldfront.dk/misc/browsers/textarea.html

Ah, yeah.  I forgot about textarea.  I'll add that.

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



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

* Re: eww
  2013-06-16 15:29   ` eww Lars Magne Ingebrigtsen
@ 2013-06-16 15:46     ` Lars Magne Ingebrigtsen
  2013-06-16 17:01       ` eww Dmitry Gutov
  0 siblings, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-16 15:46 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding, emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

>>  * http://koldfront.dk/misc/browsers/textarea.html
>
> Ah, yeah.  I forgot about textarea.  I'll add that.

I'm using widget.el to do the inputs, and the `text' type seems to be
appropriate:

---
This is just like `editable-field', but intended for multiline text
fields.  The default `:keymap' is `widget-text-keymap', which does not
rebind the <RET> key.
---

But how does one specify the height of the text field?  There's the
:size parameter, bit that's only the width, apparently...

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



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

* Re: eww
  2013-06-16 15:46     ` eww Lars Magne Ingebrigtsen
@ 2013-06-16 17:01       ` Dmitry Gutov
  2013-06-16 17:06         ` eww Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 59+ messages in thread
From: Dmitry Gutov @ 2013-06-16 17:01 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: Adam Sjøgren, ding, emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> But how does one specify the height of the text field?  There's the
> :size parameter, bit that's only the width, apparently...

<textarea> has `rows':
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

But the height can be also specified via CSS.



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

* Re: eww
  2013-06-16 17:01       ` eww Dmitry Gutov
@ 2013-06-16 17:06         ` Lars Magne Ingebrigtsen
  2013-06-17 21:00           ` eww Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-16 17:06 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Adam Sjøgren, ding, emacs-devel

Dmitry Gutov <dgutov@yandex.ru> writes:

>> But how does one specify the height of the text field?  There's the
>> :size parameter, bit that's only the width, apparently...
>
> <textarea> has `rows':
> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

I meant in the widget.el specification.

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



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

* Re: eww
  2013-06-16 14:53 eww Lars Magne Ingebrigtsen
  2013-06-16 15:21 ` eww Adam Sjøgren
@ 2013-06-16 23:42 ` lee
  2013-06-17  5:57   ` eww Lars Magne Ingebrigtsen
  2013-06-18  2:19 ` eww Tom Tromey
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 59+ messages in thread
From: lee @ 2013-06-16 23:42 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> eww probably has a lot of stuff that could still be fixed up, but the
> basics are working now.  That is, you can search for stuff on Google and
> visit Wikipedia.  :-)
>
> I wrote it up a bit here:
>
> http://lars.ingebrigtsen.no/2013/06/eww.html

Awesome!  It doesn't really work, though:


+ M-x eww
+ URL: google.de


Try to search something or press enter on a "button" and I get errors
like the following.  (Sorry for the length of it; should that better be
reported as an emacs bug?)


Debugger entered: ((("gbv" . "1") ("source" . "hp") ("hl" . "de") ("ie" . "ISO-8859-1") ("source" . "hp") ("hl" . "de") ("ie" . "ISO-8859-1") ("source" . "hp") ("hl" . "de") ("ie" . "ISO-8859-1") ("btnG" . "Google-Suche") ("q" . "")))
  eww-submit((push-button :args nil :value "Google-Suche" :notify eww-submit :name "btnG" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay from 339 to 353 in *eww*> :from #<marker (moves after insertion) at 339 in *eww*> :to #<marker at 353 in *eww*>) (push-button :args nil :value "Google-Suche" :notify eww-submit :name "btnG" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay from 339 to 353 in *eww*> :from #<marker (moves after insertion) at 339 in *eww*> :to #<marker at 353 in *eww*>) nil)
  widget-apply((push-button :args nil :value "Google-Suche" :notify eww-submit :name "btnG" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay from 339 to 353 in *eww*> :from #<marker (moves after insertion) at 339 in *eww*> :to #<marker at 353 in *eww*>) :notify (push-button :args nil :value "Google-Suche" :notify eww-submit :name "btnG" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay from 339 to 353 in *eww*> :from #<marker (moves after insertion) at 339 in *eww*> :to #<marker at 353 in *eww*>) nil)
  widget-item-action((push-button :args nil :value "Google-Suche" :notify eww-submit :name "btnG" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay from 339 to 353 in *eww*> :from #<marker (moves after insertion) at 339 in *eww*> :to #<marker at 353 in *eww*>) nil)
  widget-apply((push-button :args nil :value "Google-Suche" :notify eww-submit :name "btnG" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay from 339 to 353 in *eww*> :from #<marker (moves after insertion) at 339 in *eww*> :to #<marker at 353 in *eww*>) :action nil)
  widget-apply-action((push-button :args nil :value "Google-Suche" :notify eww-submit :name "btnG" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay from 339 to 353 in *eww*> :from #<marker (moves after insertion) at 339 in *eww*> :to #<marker at 353 in *eww*>) nil)
  widget-button-press(339)
  call-interactively(widget-button-press nil nil)
  command-execute(widget-button-press)
  recursive-edit()
  debug((("gbv" . "1") ("source" . "hp") ("hl" . "de") ("ie" . "ISO-8859-1") ("source" . "hp") ("hl" . "de") ("ie" . "ISO-8859-1") ("source" . "hp") ("hl" . "de") ("ie" . "ISO-8859-1") ("btnI" . "Auf gut Glück!") ("q" . "")))
  eww-submit((push-button :args nil :value "Auf gut Glück!" :notify eww-submit :name "btnI" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay in no buffer> :from #<marker (moves after insertion) in no buffer> :to #<marker in no buffer>) (push-button :args nil :value "Auf gut Glück!" :notify eww-submit :name "btnI" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay in no buffer> :from #<marker (moves after insertion) in no buffer> :to #<marker in no buffer>) nil)
  widget-apply((push-button :args nil :value "Auf gut Glück!" :notify eww-submit :name "btnI" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay in no buffer> :from #<marker (moves after insertion) in no buffer> :to #<marker in no buffer>) :notify (push-button :args nil :value "Auf gut Glück!" :notify eww-submit :name "btnI" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay in no buffer> :from #<marker (moves after insertion) in no buffer> :to #<marker in no buffer>) nil)
  widget-item-action((push-button :args nil :value "Auf gut Glück!" :notify eww-submit :name "btnI" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay in no buffer> :from #<marker (moves after insertion) in no buffer> :to #<marker in no buffer>) nil)
  widget-apply((push-button :args nil :value "Auf gut Glück!" :notify eww-submit :name "btnI" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay in no buffer> :from #<marker (moves after insertion) in no buffer> :to #<marker in no buffer>) :action nil)
  widget-apply-action((push-button :args nil :value "Auf gut Glück!" :notify eww-submit :name "btnI" :eww-form (nil (:action . "/search") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "ie" :value "ISO-8859-1") (hidden :name "hl" :value "de") (hidden :name "source" :value "hp") (editable-field :size 57 :value "" :secret nil :action eww-submit :name "q" :eww-form #1) (push-button :notify eww-submit :name "btnG" :value "Google-Suche" :eww-form #1 "Google-Suche") (push-button :notify eww-submit :name "btnI" :value "Auf gut Glück!" :eww-form #1 "Auf gut Glück!") (hidden :name "gbv" :value "1")) :button-overlay #<overlay in no buffer> :from #<marker (moves after insertion) in no buffer> :to #<marker in no buffer>) nil)
  widget-button-press(355)
  call-interactively(widget-button-press nil nil)
  command-execute(widget-button-press)


-- 
"Object-oriented programming languages aren't completely convinced that
you should be allowed to do anything with functions."
http://www.joelonsoftware.com/items/2006/08/01.html



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

* Re: eww
  2013-06-16 23:42 ` eww lee
@ 2013-06-17  5:57   ` Lars Magne Ingebrigtsen
  2013-06-17 18:46     ` eww lee
  0 siblings, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-17  5:57 UTC (permalink / raw)
  To: ding

lee <lee@yun.yagibdah.de> writes:

> Awesome!  It doesn't really work, though:
>
> + M-x eww
> + URL: google.de

[...]

> Debugger entered: ((("gbv" . "1") ("source" . "hp") ("hl" . "de")
> ("ie" . "ISO-8859-1") ("source" . "hp") ("hl" . "de") ("ie"
> . "ISO-8859-1") ("source" . "hp") ("hl" . "de") ("ie" . "ISO-8859-1")
> ("btnG" . "Google-Suche") ("q" . "")))
>   eww-submit((push-button :args nil :value "Google-Suche" :notify

I had committed code with a `debug' call in there, but it should be
fixed now.

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



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

* Re: eww
  2013-06-17  5:57   ` eww Lars Magne Ingebrigtsen
@ 2013-06-17 18:46     ` lee
  0 siblings, 0 replies; 59+ messages in thread
From: lee @ 2013-06-17 18:46 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> lee <lee@yun.yagibdah.de> writes:
>
>> Awesome!  It doesn't really work, though:
>>
>> + M-x eww
>> + URL: google.de
>
> [...]
>
>> Debugger entered: ((("gbv" . "1") ("source" . "hp") ("hl" . "de")
>> ("ie" . "ISO-8859-1") ("source" . "hp") ("hl" . "de") ("ie"
>> . "ISO-8859-1") ("source" . "hp") ("hl" . "de") ("ie" . "ISO-8859-1")
>> ("btnG" . "Google-Suche") ("q" . "")))
>>   eww-submit((push-button :args nil :value "Google-Suche" :notify
>
> I had committed code with a `debug' call in there, but it should be
> fixed now.

It is :)  This is really sweet!  Using a web browser like seamonkey
creates a lot of CPU load and eww looks like a great alternative, even
with the benefit of being able to browse within emacs :)  This is
something I've been looking for.


-- 
"Object-oriented programming languages aren't completely convinced that
you should be allowed to do anything with functions."
http://www.joelonsoftware.com/items/2006/08/01.html



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

* Re: eww
  2013-06-16 17:06         ` eww Lars Magne Ingebrigtsen
@ 2013-06-17 21:00           ` Lars Magne Ingebrigtsen
  2013-06-17 23:35             ` eww Ted Zlatanov
  0 siblings, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-17 21:00 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

I spent some time doing rendering optimisations in shr today, including
the `add-face-text-properties' C-level functionality.  That, combined
with various caching strategies and trying to avoid doing unnecessary
work when computing how tables should be rendered has made viewing a
typical Wikipedia page 4x faster or something.

So it's still slow, but it's getting more useful.  There's still
probably bugs in there, though.  Give it a whirl:

M-x eww RET google.com

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




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

* Re: eww
  2013-06-17 21:00           ` eww Lars Magne Ingebrigtsen
@ 2013-06-17 23:35             ` Ted Zlatanov
  2013-06-18  0:01               ` eww Lars Magne Ingebrigtsen
  2013-07-09 10:23               ` eww Julien Cubizolles
  0 siblings, 2 replies; 59+ messages in thread
From: Ted Zlatanov @ 2013-06-17 23:35 UTC (permalink / raw)
  To: ding; +Cc: emacs-devel

On Mon, 17 Jun 2013 23:00:17 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> I spent some time doing rendering optimisations in shr today, including
LMI> the `add-face-text-properties' C-level functionality.  That, combined
LMI> with various caching strategies and trying to avoid doing unnecessary
LMI> work when computing how tables should be rendered has made viewing a
LMI> typical Wikipedia page 4x faster or something.

LMI> So it's still slow, but it's getting more useful.  There's still
LMI> probably bugs in there, though.  Give it a whirl:

LMI> M-x eww RET google.com

You should add commentary with short instructions on making it the
default URL browse action in Gnus.

It's pretty awesome otherwise.

Ted




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

* Re: eww
  2013-06-17 23:35             ` eww Ted Zlatanov
@ 2013-06-18  0:01               ` Lars Magne Ingebrigtsen
  2013-07-09 13:20                 ` eww Ted Zlatanov
  2013-07-09 10:23               ` eww Julien Cubizolles
  1 sibling, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-18  0:01 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> You should add commentary with short instructions on making it the
> default URL browse action in Gnus.

I've now added it as a possibly choice to `browse-url-browser-function',
which is what Gnus uses.

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



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

* Re: eww
  2013-06-16 14:53 eww Lars Magne Ingebrigtsen
  2013-06-16 15:21 ` eww Adam Sjøgren
  2013-06-16 23:42 ` eww lee
@ 2013-06-18  2:19 ` Tom Tromey
  2013-06-18 11:23   ` eww Lars Magne Ingebrigtsen
  2013-06-18 11:31   ` eww Lars Magne Ingebrigtsen
  2013-06-18 11:32 ` eww joakim
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 59+ messages in thread
From: Tom Tromey @ 2013-06-18  2:19 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

Lars> eww probably has a lot of stuff that could still be fixed up, but
Lars> the basics are working now.  That is, you can search for stuff on
Lars> Google and visit Wikipedia.  :-)

Very nice.

I played with it a bit.

It doesn't render parts of the gdb manual very nicely.
For example in the reverse execution node, the info looks like:

================================================================
   If you are debugging in a target environment that supports reverse
execution, GDB provides the following commands.

`reverse-continue [IGNORE-COUNT]'
`rc [IGNORE-COUNT]'
     Beginning at the point where your program last stopped, start
     executing in reverse.  Reverse execution will stop for breakpoints
     and synchronous exceptions (signals), just like normal execution.
     Behavior of asynchronous signals depends on the target environment.
================================================================

but eww renders it as

================================================================
If you are debugging in a target environment that supports reverse execution,
gdb provides the following commands.

reverse-continue [ignore-count]rc [ignore-count]Beginning at the point where
your program last stopped, start executing in reverse. Reverse execution will
stop for breakpoints and synchronous exceptions (signals), just like normal
execution. Behavior of asynchronous signals depends on the target environment.
================================================================


Also, please consider the appended patch.  It makes eww pick up on
<link> and <a rel=...> to give it a more info-ish flavor.  I'm
interested in the possibility of replacing info with html+eww.

The patch isn't perfect but I thought I'd see what you think before
going any further.

Tom

=== modified file 'lisp/gnus/eww.el'
--- lisp/gnus/eww.el	2013-06-17 23:11:40 +0000
+++ lisp/gnus/eww.el	2013-06-18 02:06:16 +0000
@@ -56,6 +56,15 @@
   "Title of current page.")
 (defvar eww-history nil)
 
+(defvar eww-next-url nil)
+(make-variable-buffer-local 'eww-next-url)
+(defvar eww-previous-url nil)
+(make-variable-buffer-local 'eww-previous-url)
+(defvar eww-up-url nil)
+(make-variable-buffer-local 'eww-up-url)
+(defvar eww-top-url nil)
+(make-variable-buffer-local 'eww-top-url)
+
 ;;;###autoload
 (defun eww (url)
   "Fetch URL and render the page."
@@ -64,6 +73,12 @@
     (setq url (concat "http://" url)))
   (url-retrieve url 'eww-render (list url)))
 
+;;;###autoload
+(defun eww-open-file (file)
+  (interactive "fFile: ")
+  (let ((browse-url-browser-function #'eww-browse-url))
+    (browse-url-of-file (expand-file-name file))))
+
 (defun eww-detect-charset (html-p)
   (let ((case-fold-search t)
 	(pt (point)))
@@ -80,6 +95,10 @@
   (let ((redirect (plist-get status :redirect)))
     (when redirect
       (setq url redirect)))
+  (setq eww-next-url nil)
+  (setq eww-previous-url nil)
+  (setq eww-up-url nil)
+  (setq eww-top-url nil)
   (let* ((headers (eww-parse-headers))
 	 (shr-target-id
 	  (and (string-match "#\\(.*\\)" url)
@@ -146,10 +165,32 @@
 	     (input . eww-tag-input)
 	     (textarea . eww-tag-textarea)
 	     (body . eww-tag-body)
-	     (select . eww-tag-select))))
+	     (select . eww-tag-select)
+	     (link . eww-tag-link)
+	     (a . eww-tag-a))))
       (shr-insert-document document)
       (eww-convert-widgets))
-    (goto-char (point-min))))
+      (goto-char (point-min))))
+
+(defun eww-handle-link (cont)
+  (let* ((rel (assq :rel cont))
+  	(href (assq :href cont))
+	(where (assoc (cdr rel)
+		      '(("next" . eww-next-url)
+			("previous" . eww-previous-url)
+			("start" . eww-top-url)
+			("up" . eww-up-url)))))
+    (and href
+	 where
+	 (set (cdr where) (cdr href)))))
+
+(defun eww-tag-link (cont)
+  (eww-handle-link cont)
+  (shr-generic cont))
+
+(defun eww-tag-a (cont)
+  (eww-handle-link cont)
+  (shr-tag-a cont))
 
 (defun eww-update-header-line-format ()
   (if eww-header-line-format
@@ -218,8 +259,11 @@
     (define-key map [delete] 'scroll-down-command)
     (define-key map "\177" 'scroll-down-command)
     (define-key map " " 'scroll-up-command)
+    (define-key map "l" 'eww-back-url)
+    (define-key map "n" 'eww-next-url)
     (define-key map "p" 'eww-previous-url)
-    ;;(define-key map "n" 'eww-next-url)
+    (define-key map "u" 'eww-up-url)
+    (define-key map "t" 'eww-top-url)
     map))
 
 (define-derived-mode eww-mode nil "eww"
@@ -240,7 +284,7 @@
   (setq eww-history nil)
   (kill-buffer (current-buffer)))
 
-(defun eww-previous-url ()
+(defun eww-back-url ()
   "Go to the previously displayed page."
   (interactive)
   (when (zerop (length eww-history))
@@ -248,6 +292,30 @@
   (let ((prev (pop eww-history)))
     (url-retrieve (car prev) 'eww-render (list (car prev) (cadr prev)))))
 
+(defun eww-next-url ()
+  (interactive)
+  (if eww-next-url
+      (eww-browse-url (shr-expand-url eww-next-url eww-current-url))
+    (error "No `next' on this node")))
+
+(defun eww-previous-url ()
+  (interactive)
+  (if eww-previous-url
+      (eww-browse-url (shr-expand-url eww-previous-url eww-current-url))
+    (error "No `previous' on this node")))
+
+(defun eww-up-url ()
+  (interactive)
+  (if eww-up-url
+      (eww-browse-url (shr-expand-url eww-up-url eww-current-url))
+    (error "No `up' on this node")))
+
+(defun eww-top-url ()
+  (interactive)
+  (if eww-top-url
+      (eww-browse-url (shr-expand-url eww-top-url eww-current-url))
+    (error "No `top' on this node")))
+
 (defun eww-reload ()
   "Reload the current page."
   (interactive)




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

* Re: eww
  2013-06-18  2:19 ` eww Tom Tromey
@ 2013-06-18 11:23   ` Lars Magne Ingebrigtsen
  2013-06-18 14:34     ` eww Tom Tromey
                       ` (2 more replies)
  2013-06-18 11:31   ` eww Lars Magne Ingebrigtsen
  1 sibling, 3 replies; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-18 11:23 UTC (permalink / raw)
  To: Tom Tromey; +Cc: ding, emacs-devel

Tom Tromey <tromey@redhat.com> writes:

> It doesn't render parts of the gdb manual very nicely.
> For example in the reverse execution node, the info looks like:
>
> ================================================================
>    If you are debugging in a target environment that supports reverse
> execution, GDB provides the following commands.
>
> `reverse-continue [IGNORE-COUNT]'
> `rc [IGNORE-COUNT]'
>      Beginning at the point where your program last stopped, start
>      executing in reverse.  Reverse execution will stop for breakpoints
>      and synchronous exceptions (signals), just like normal execution.
>      Behavior of asynchronous signals depends on the target environment.
> ================================================================

Heh.  This is because the manual uses the <dl>, <dd> and <dt> tags,
which I didn't even know existed.  :-)

I've now added support for this.

> Also, please consider the appended patch.  It makes eww pick up on
> <link> and <a rel=...> to give it a more info-ish flavor.  I'm
> interested in the possibility of replacing info with html+eww.

Supporting <link> and <a rel=> is a good idea.  The code looks good, but
here's a couple of comments:

> +(defvar eww-next-url nil)
> +(make-variable-buffer-local 'eww-next-url)
> +(defvar eww-previous-url nil)
> +(make-variable-buffer-local 'eww-previous-url)
> +(defvar eww-up-url nil)
> +(make-variable-buffer-local 'eww-up-url)
> +(defvar eww-top-url nil)
> +(make-variable-buffer-local 'eww-top-url)

I think that for package-specific variables like this we're supposed to
use

(set (make-local-variable 'eww-top-url) nil)

in the mode setup instead, so that we're not making variables needlessly
globally buffer-local.

> +(defun eww-open-file (file)
> +  (interactive "fFile: ")
> +  (let ((browse-url-browser-function #'eww-browse-url))
> +    (browse-url-of-file (expand-file-name file))))

Can't we just prepend "file://" to the file name and call `eww'
directly?

> +(defun eww-next-url ()
> +  (interactive)
> +  (if eww-next-url
> +      (eww-browse-url (shr-expand-url eww-next-url eww-current-url))
> +    (error "No `next' on this node")))

Perhaps say "page" instead of "node".

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



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

* Re: eww
  2013-06-18  2:19 ` eww Tom Tromey
  2013-06-18 11:23   ` eww Lars Magne Ingebrigtsen
@ 2013-06-18 11:31   ` Lars Magne Ingebrigtsen
  2013-06-18 14:42     ` eww Tom Tromey
  2013-06-18 23:40     ` eww Juri Linkov
  1 sibling, 2 replies; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-18 11:31 UTC (permalink / raw)
  To: Tom Tromey; +Cc: ding, emacs-devel

Tom Tromey <tromey@redhat.com> writes:

> I'm interested in the possibility of replacing info with html+eww.

As for this, that's not very realistic.  info has a ton of commands
specially suited for navigating manuals, and does a really good job.
eww is a general web browser, and trying to shoe-horn all the missing
info functionality into it would be a mess, I think.

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



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

* Re: eww
  2013-06-16 14:53 eww Lars Magne Ingebrigtsen
                   ` (2 preceding siblings ...)
  2013-06-18  2:19 ` eww Tom Tromey
@ 2013-06-18 11:32 ` joakim
  2013-06-18 12:16   ` eww Andreas Schwab
  2013-06-18 13:57   ` eww Lars Magne Ingebrigtsen
  2013-06-19 10:21 ` eww Ivan Kanis
  2013-08-01 11:59 ` eww John Williams
  5 siblings, 2 replies; 59+ messages in thread
From: joakim @ 2013-06-18 11:32 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> eww probably has a lot of stuff that could still be fixed up, but the
> basics are working now.  That is, you can search for stuff on Google and
> visit Wikipedia.  :-)
>
> I wrote it up a bit here:
>
> http://lars.ingebrigtsen.no/2013/06/eww.html


While you are at it, could you implement something like the patch below?

I use it in the xwidget branch for simplifying browsing in emacs.


diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 695b7a1..1fa52ce 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -667,7 +667,7 @@ regarding its parameter treatment."
 ;; functions allows them to be stand-alone commands, making it easier
 ;; to switch between browsers.
 
-(defun browse-url-interactive-arg (prompt)
+(defun browse-url-interactive-arg (prompt &optional default-url)
   "Read a URL from the minibuffer, prompting with PROMPT.
 If `transient-mark-mode' is non-nil and the mark is active,
 it defaults to the current region, else to the URL at or before
@@ -684,7 +684,8 @@ for use in `interactive'."
 				      "[\t\r\f\n ]+" ""
 				      (buffer-substring-no-properties
 				       (region-beginning) (region-end))))
-				(browse-url-url-at-point)))
+				(browse-url-url-at-point)
+                                default-url))
 	(not (eq (null browse-url-new-window-flag)
 		 (null current-prefix-arg)))))
 
@@ -791,6 +792,13 @@ narrowed."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Browser-independent commands
 
+(defun url-tidy (url)
+  "Tidy up URL as much as possible."
+  (if (equal 0 (string-match ".*://" url))
+      url
+    (concat "http://" url) ;;TODO guess more url forms, like mailto
+    ))
+
 ;; A generic command to call the current browse-url-browser-function
 
 ;;;###autoload
@@ -803,6 +811,7 @@ first, if that exists."
   (interactive (browse-url-interactive-arg "URL: "))
   (unless (called-interactively-p 'interactive)
     (setq args (or args (list browse-url-new-window-flag))))
+  (setq url (url-tidy url))
   (let ((process-environment (copy-sequence process-environment))
 	(function (or (and (string-match "\\`mailto:" url)
 			   browse-url-mailto-function)

-- 
Joakim Verona



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

* Re: eww
  2013-06-18 11:32 ` eww joakim
@ 2013-06-18 12:16   ` Andreas Schwab
  2013-06-18 13:57   ` eww Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 59+ messages in thread
From: Andreas Schwab @ 2013-06-18 12:16 UTC (permalink / raw)
  To: joakim; +Cc: Lars Magne Ingebrigtsen, ding, emacs-devel

joakim@verona.se writes:

> +  (if (equal 0 (string-match ".*://" url))
         (string-match "://" 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] 59+ messages in thread

* Re: eww
  2013-06-18 11:32 ` eww joakim
  2013-06-18 12:16   ` eww Andreas Schwab
@ 2013-06-18 13:57   ` Lars Magne Ingebrigtsen
  2013-06-18 14:01     ` eww joakim
  1 sibling, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-18 13:57 UTC (permalink / raw)
  To: joakim; +Cc: ding, emacs-devel

joakim@verona.se writes:

>    (interactive (browse-url-interactive-arg "URL: "))
>    (unless (called-interactively-p 'interactive)
>      (setq args (or args (list browse-url-new-window-flag))))
> +  (setq url (url-tidy url))

I'm not sure I see the utility here.  I think `browse-url' should (at
least when called from a program) fetch exactly what it's being asked to
fetch, and not do a DWIM analysis.  That should be up to the callers.

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



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

* Re: eww
  2013-06-18 13:57   ` eww Lars Magne Ingebrigtsen
@ 2013-06-18 14:01     ` joakim
  0 siblings, 0 replies; 59+ messages in thread
From: joakim @ 2013-06-18 14:01 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> joakim@verona.se writes:
>
>>    (interactive (browse-url-interactive-arg "URL: "))
>>    (unless (called-interactively-p 'interactive)
>>      (setq args (or args (list browse-url-new-window-flag))))
>> +  (setq url (url-tidy url))
>
> I'm not sure I see the utility here.  I think `browse-url' should (at
> least when called from a program) fetch exactly what it's being asked to
> fetch, and not do a DWIM analysis.  That should be up to the callers.

It was meant only for interactive use. Maybe that wasnt obvious.

-- 
Joakim Verona



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

* Re: eww
  2013-06-18 11:23   ` eww Lars Magne Ingebrigtsen
@ 2013-06-18 14:34     ` Tom Tromey
  2013-06-18 15:01       ` eww Lars Magne Ingebrigtsen
  2013-06-18 14:39     ` eww Tom Tromey
  2013-06-18 19:07     ` eww Stefan Monnier
  2 siblings, 1 reply; 59+ messages in thread
From: Tom Tromey @ 2013-06-18 14:34 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

Lars> Heh.  This is because the manual uses the <dl>, <dd> and <dt> tags,
Lars> which I didn't even know existed.  :-)

Lars> I've now added support for this.

Thanks.

On the same node in the gdb manual, on an 80-column terminal, some of
the paragraph wrap improperly.  E.g., shr renders one as:

================================================================
When you are debugging a program, it is not unusual to realize that you have
gone too far, and some event of interest has already happened. If the target
environment supports it, gdb can allow you to “rewind” the program by running i\
t
backward.
================================================================


If you have 80 columns, the "it" at the end of the 3rd line is split in
the middle.

Can shr not use word-wrap?  Anyhow, the wrapping code is complicated &
spread out enough that I didn't look into it.

Tom



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

* Re: eww
  2013-06-18 11:23   ` eww Lars Magne Ingebrigtsen
  2013-06-18 14:34     ` eww Tom Tromey
@ 2013-06-18 14:39     ` Tom Tromey
  2013-06-18 15:14       ` eww Lars Magne Ingebrigtsen
  2013-06-18 19:07     ` eww Stefan Monnier
  2 siblings, 1 reply; 59+ messages in thread
From: Tom Tromey @ 2013-06-18 14:39 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

Lars> Supporting <link> and <a rel=> is a good idea.  The code looks good, but
Lars> here's a couple of comments:

Thanks.

Here's a version that addresses your comments and adds doc strings and a
ChangeLog entry.  Let me know what you think.

Tom

=== modified file 'lisp/gnus/ChangeLog'
--- lisp/gnus/ChangeLog	2013-06-18 11:24:16 +0000
+++ lisp/gnus/ChangeLog	2013-06-18 14:39:03 +0000
@@ -1,3 +1,16 @@
+2013-06-18  Tom Tromey  <tromey@barimba>
+
+	* eww.el (eww-next-url, eww-previous-url, eww-up-url, eww-top-url):
+	New defvars.
+	(eww-open-file): New defun.
+	(eww-render): Initialize new variables.
+	(eww-display-html): Handle "link" and "a".
+	(eww-handle-link, eww-tag-link, eww-tag-a): New defuns.
+	(eww-mode-map): Move "p" to "l".  Bind "p", "n", "t", and "u".
+	(eww-back-url): Rename from eww-previous-url.
+	(eww-next-url, eww-previous-url, eww-up-url, eww-top-url): New
+	defuns.
+
 2013-06-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* shr.el (shr-tag-table): Insert the images after the table, so that

=== modified file 'lisp/gnus/eww.el'
--- lisp/gnus/eww.el	2013-06-18 09:29:20 +0000
+++ lisp/gnus/eww.el	2013-06-18 14:39:01 +0000
@@ -56,6 +56,11 @@
   "Title of current page.")
 (defvar eww-history nil)
 
+(defvar eww-next-url nil)
+(defvar eww-previous-url nil)
+(defvar eww-up-url nil)
+(defvar eww-top-url nil)
+
 ;;;###autoload
 (defun eww (url)
   "Fetch URL and render the page."
@@ -64,10 +69,20 @@
     (setq url (concat "http://" url)))
   (url-retrieve url 'eww-render (list url)))
 
+;;;###autoload
+(defun eww-open-file (file)
+  "Render a file using EWW."
+  (interactive "fFile: ")
+  (eww (concat "file://" (expand-file-name file))))
+
 (defun eww-render (status url &optional point)
   (let ((redirect (plist-get status :redirect)))
     (when redirect
       (setq url redirect)))
+  (set (make-local-variable 'eww-next-url) nil)
+  (set (make-local-variable 'eww-previous-url) nil)
+  (set (make-local-variable 'eww-up-url) nil)
+  (set (make-local-variable 'eww-top-url) nil)
   (let* ((headers (eww-parse-headers))
 	 (shr-target-id
 	  (and (string-match "#\\(.*\\)" url)
@@ -146,11 +161,33 @@
 	     (input . eww-tag-input)
 	     (textarea . eww-tag-textarea)
 	     (body . eww-tag-body)
-	     (select . eww-tag-select))))
+	     (select . eww-tag-select)
+	     (link . eww-tag-link)
+	     (a . eww-tag-a))))
       (shr-insert-document document)
       (eww-convert-widgets))
     (goto-char (point-min))))
 
+(defun eww-handle-link (cont)
+  (let* ((rel (assq :rel cont))
+  	(href (assq :href cont))
+	(where (assoc (cdr rel)
+		      '(("next" . eww-next-url)
+			("previous" . eww-previous-url)
+			("start" . eww-top-url)
+			("up" . eww-up-url)))))
+    (and href
+	 where
+	 (set (cdr where) (cdr href)))))
+
+(defun eww-tag-link (cont)
+  (eww-handle-link cont)
+  (shr-generic cont))
+
+(defun eww-tag-a (cont)
+  (eww-handle-link cont)
+  (shr-tag-a cont))
+
 (defun eww-update-header-line-format ()
   (if eww-header-line-format
       (setq header-line-format (format-spec eww-header-line-format
@@ -218,8 +255,11 @@
     (define-key map [delete] 'scroll-down-command)
     (define-key map "\177" 'scroll-down-command)
     (define-key map " " 'scroll-up-command)
+    (define-key map "l" 'eww-back-url)
+    (define-key map "n" 'eww-next-url)
     (define-key map "p" 'eww-previous-url)
-    ;;(define-key map "n" 'eww-next-url)
+    (define-key map "u" 'eww-up-url)
+    (define-key map "t" 'eww-top-url)
     map))
 
 (define-derived-mode eww-mode nil "eww"
@@ -240,7 +280,7 @@
   (setq eww-history nil)
   (kill-buffer (current-buffer)))
 
-(defun eww-previous-url ()
+(defun eww-back-url ()
   "Go to the previously displayed page."
   (interactive)
   (when (zerop (length eww-history))
@@ -248,6 +288,42 @@
   (let ((prev (pop eww-history)))
     (url-retrieve (car prev) 'eww-render (list (car prev) (cadr prev)))))
 
+(defun eww-next-url ()
+  "Go to the page marked `next'.
+A page is marked `next' if rel=\"next\" appears in a <link>
+or <a> tag."
+  (interactive)
+  (if eww-next-url
+      (eww-browse-url (shr-expand-url eww-next-url eww-current-url))
+    (error "No `next' on this page")))
+
+(defun eww-previous-url ()
+  "Go to the page marked `previous'.
+A page is marked `previous' if rel=\"previous\" appears in a <link>
+or <a> tag."
+  (interactive)
+  (if eww-previous-url
+      (eww-browse-url (shr-expand-url eww-previous-url eww-current-url))
+    (error "No `previous' on this page")))
+
+(defun eww-up-url ()
+  "Go to the page marked `up'.
+A page is marked `up' if rel=\"up\" appears in a <link>
+or <a> tag."
+  (interactive)
+  (if eww-up-url
+      (eww-browse-url (shr-expand-url eww-up-url eww-current-url))
+    (error "No `up' on this page")))
+
+(defun eww-top-url ()
+  "Go to the page marked `top'.
+A page is marked `top' if rel=\"start\" appears in a <link>
+or <a> tag."
+  (interactive)
+  (if eww-top-url
+      (eww-browse-url (shr-expand-url eww-top-url eww-current-url))
+    (error "No `top' on this page")))
+
 (defun eww-reload ()
   "Reload the current page."
   (interactive)




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

* Re: eww
  2013-06-18 11:31   ` eww Lars Magne Ingebrigtsen
@ 2013-06-18 14:42     ` Tom Tromey
  2013-06-18 15:04       ` eww Lars Magne Ingebrigtsen
  2013-06-18 23:40     ` eww Juri Linkov
  1 sibling, 1 reply; 59+ messages in thread
From: Tom Tromey @ 2013-06-18 14:42 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

Tom> I'm interested in the possibility of replacing info with html+eww.

Lars> As for this, that's not very realistic.  info has a ton of commands
Lars> specially suited for navigating manuals, and does a really good job.
Lars> eww is a general web browser, and trying to shoe-horn all the missing
Lars> info functionality into it would be a mess, I think.

I'm more optimistic about the possibility.
Is there a particular thing you think would be difficult or messy?

Maybe there is a way to do it as a derived mode so that it doesn't
conflict too much with the web-browsing aspect of eww.

Tom



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

* Re: eww
  2013-06-18 14:34     ` eww Tom Tromey
@ 2013-06-18 15:01       ` Lars Magne Ingebrigtsen
  2013-06-18 15:43         ` eww Tom Tromey
  0 siblings, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-18 15:01 UTC (permalink / raw)
  To: Tom Tromey; +Cc: ding, emacs-devel

Tom Tromey <tromey@redhat.com> writes:

> On the same node in the gdb manual, on an 80-column terminal, some of
> the paragraph wrap improperly.  E.g., shr renders one as:
>
> ================================================================
> When you are debugging a program, it is not unusual to realize that you have
> gone too far, and some event of interest has already happened. If the target
> environment supports it, gdb can allow you to “rewind” the program by running i\
> t
> backward.
> ================================================================
>
> If you have 80 columns, the "it" at the end of the 3rd line is split in
> the middle.
>
> Can shr not use word-wrap?  Anyhow, the wrapping code is complicated &
> spread out enough that I didn't look into it.

Oh course shr wraps the text, but it was using `window-width' as the
width, while it should have used one less than that.  Fixed now.

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



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

* Re: eww
  2013-06-18 14:42     ` eww Tom Tromey
@ 2013-06-18 15:04       ` Lars Magne Ingebrigtsen
  2013-06-18 19:13         ` eww Stefan Monnier
  0 siblings, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-18 15:04 UTC (permalink / raw)
  To: Tom Tromey; +Cc: ding, emacs-devel

Tom Tromey <tromey@redhat.com> writes:

> I'm more optimistic about the possibility.
> Is there a particular thing you think would be difficult or messy?

info has a bunch of commands for jumping to the index and searching the
entire manual, etc.  Reading the HTML version of the manual will never
be as convenient as reading the info version.

> Maybe there is a way to do it as a derived mode so that it doesn't
> conflict too much with the web-browsing aspect of eww.

Or just continue to use info, which is really good at this sort of
thing.  :-)

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



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

* Re: eww
  2013-06-18 14:39     ` eww Tom Tromey
@ 2013-06-18 15:14       ` Lars Magne Ingebrigtsen
  2013-06-18 16:17         ` eww Tom Tromey
  0 siblings, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-06-18 15:14 UTC (permalink / raw)
  To: Tom Tromey; +Cc: ding, emacs-devel

Tom Tromey <tromey@redhat.com> writes:

> Here's a version that addresses your comments and adds doc strings and a
> ChangeLog entry.  Let me know what you think.

Looks good; applied.

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



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

* Re: eww
  2013-06-18 15:01       ` eww Lars Magne Ingebrigtsen
@ 2013-06-18 15:43         ` Tom Tromey
  0 siblings, 0 replies; 59+ messages in thread
From: Tom Tromey @ 2013-06-18 15:43 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

>> Can shr not use word-wrap?  Anyhow, the wrapping code is complicated &
>> spread out enough that I didn't look into it.

Lars> Oh course shr wraps the text, but it was using `window-width' as the
Lars> width, while it should have used one less than that.  Fixed now.

Yeah, I was curious about why it doesn't use (setq word-wrap t) and then
not insert hard newlines.

Thanks for the fix.

Tom



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

* Re: eww
  2013-06-18 15:14       ` eww Lars Magne Ingebrigtsen
@ 2013-06-18 16:17         ` Tom Tromey
  2013-06-18 19:06           ` eww Steinar Bang
  0 siblings, 1 reply; 59+ messages in thread
From: Tom Tromey @ 2013-06-18 16:17 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

>> Here's a version that addresses your comments and adds doc strings and a
>> ChangeLog entry.  Let me know what you think.

Lars> Looks good; applied.

I didn't see it in bzr.

Anyway here is a slightly better version.

Differences:

HTML seems to specify "prev", not "previous" (though texinfo still seems
to use "previous").

HTML specifies "start" as well as "contents"; but I noticed that Gtk is
using "home" here.  So now it handles all 3 and picks the "best" one.

Finally, the "rel" value is supposed to be case-insensitive, so downcase it.

Tom

=== modified file 'lisp/gnus/ChangeLog'
--- lisp/gnus/ChangeLog	2013-06-18 11:24:16 +0000
+++ lisp/gnus/ChangeLog	2013-06-18 16:15:25 +0000
@@ -1,3 +1,17 @@
+2013-06-18  Tom Tromey  <tromey@barimba>
+
+	* eww.el (eww-next-url, eww-previous-url, eww-up-url)
+	(eww-start-url, eww-home-url, eww-contents-url):
+	New defvars.
+	(eww-open-file): New defun.
+	(eww-render): Initialize new variables.
+	(eww-display-html): Handle "link" and "a".
+	(eww-handle-link, eww-tag-link, eww-tag-a): New defuns.
+	(eww-mode-map): Move "p" to "l".  Bind "p", "n", "t", and "u".
+	(eww-back-url): Rename from eww-previous-url.
+	(eww-next-url, eww-previous-url, eww-up-url, eww-top-url): New
+	defuns.
+
 2013-06-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* shr.el (shr-tag-table): Insert the images after the table, so that

=== modified file 'lisp/gnus/eww.el'
--- lisp/gnus/eww.el	2013-06-18 09:29:20 +0000
+++ lisp/gnus/eww.el	2013-06-18 16:14:31 +0000
@@ -56,6 +56,13 @@
   "Title of current page.")
 (defvar eww-history nil)
 
+(defvar eww-next-url nil)
+(defvar eww-previous-url nil)
+(defvar eww-up-url nil)
+(defvar eww-home-url nil)
+(defvar eww-start-url nil)
+(defvar eww-contents-url nil)
+
 ;;;###autoload
 (defun eww (url)
   "Fetch URL and render the page."
@@ -64,10 +71,22 @@
     (setq url (concat "http://" url)))
   (url-retrieve url 'eww-render (list url)))
 
+;;;###autoload
+(defun eww-open-file (file)
+  "Render a file using EWW."
+  (interactive "fFile: ")
+  (eww (concat "file://" (expand-file-name file))))
+
 (defun eww-render (status url &optional point)
   (let ((redirect (plist-get status :redirect)))
     (when redirect
       (setq url redirect)))
+  (set (make-local-variable 'eww-next-url) nil)
+  (set (make-local-variable 'eww-previous-url) nil)
+  (set (make-local-variable 'eww-up-url) nil)
+  (set (make-local-variable 'eww-home-url) nil)
+  (set (make-local-variable 'eww-start-url) nil)
+  (set (make-local-variable 'eww-contents-url) nil)
   (let* ((headers (eww-parse-headers))
 	 (shr-target-id
 	  (and (string-match "#\\(.*\\)" url)
@@ -146,11 +165,45 @@
 	     (input . eww-tag-input)
 	     (textarea . eww-tag-textarea)
 	     (body . eww-tag-body)
-	     (select . eww-tag-select))))
+	     (select . eww-tag-select)
+	     (link . eww-tag-link)
+	     (a . eww-tag-a))))
       (shr-insert-document document)
       (eww-convert-widgets))
     (goto-char (point-min))))
 
+(defun eww-handle-link (cont)
+  (let* ((rel (assq :rel cont))
+  	(href (assq :href cont))
+	(where (assoc
+		;; The text associated with :rel is case-insensitive.
+		(if rel (downcase (cdr rel)))
+		      '(("next" . eww-next-url)
+			;; Texinfo uses "previous", but HTML specifies
+			;; "prev", so recognize both.
+			("previous" . eww-previous-url)
+			("prev" . eww-previous-url)
+			;; HTML specifies "start" but also "contents",
+			;; and Gtk seems to use "home".  Recognize
+			;; them all; but store them in different
+			;; variables so that we can readily choose the
+			;; "best" one.
+			("start" . eww-start-url)
+			("home" . eww-home-url)
+			("contents" . eww-contents-url)
+			("up" . eww-up-url)))))
+    (and href
+	 where
+	 (set (cdr where) (cdr href)))))
+
+(defun eww-tag-link (cont)
+  (eww-handle-link cont)
+  (shr-generic cont))
+
+(defun eww-tag-a (cont)
+  (eww-handle-link cont)
+  (shr-tag-a cont))
+
 (defun eww-update-header-line-format ()
   (if eww-header-line-format
       (setq header-line-format (format-spec eww-header-line-format
@@ -218,8 +271,11 @@
     (define-key map [delete] 'scroll-down-command)
     (define-key map "\177" 'scroll-down-command)
     (define-key map " " 'scroll-up-command)
+    (define-key map "l" 'eww-back-url)
+    (define-key map "n" 'eww-next-url)
     (define-key map "p" 'eww-previous-url)
-    ;;(define-key map "n" 'eww-next-url)
+    (define-key map "u" 'eww-up-url)
+    (define-key map "t" 'eww-top-url)
     map))
 
 (define-derived-mode eww-mode nil "eww"
@@ -240,7 +296,7 @@
   (setq eww-history nil)
   (kill-buffer (current-buffer)))
 
-(defun eww-previous-url ()
+(defun eww-back-url ()
   "Go to the previously displayed page."
   (interactive)
   (when (zerop (length eww-history))
@@ -248,6 +304,45 @@
   (let ((prev (pop eww-history)))
     (url-retrieve (car prev) 'eww-render (list (car prev) (cadr prev)))))
 
+(defun eww-next-url ()
+  "Go to the page marked `next'.
+A page is marked `next' if rel=\"next\" appears in a <link>
+or <a> tag."
+  (interactive)
+  (if eww-next-url
+      (eww-browse-url (shr-expand-url eww-next-url eww-current-url))
+    (error "No `next' on this page")))
+
+(defun eww-previous-url ()
+  "Go to the page marked `previous'.
+A page is marked `previous' if rel=\"previous\" appears in a <link>
+or <a> tag."
+  (interactive)
+  (if eww-previous-url
+      (eww-browse-url (shr-expand-url eww-previous-url eww-current-url))
+    (error "No `previous' on this page")))
+
+(defun eww-up-url ()
+  "Go to the page marked `up'.
+A page is marked `up' if rel=\"up\" appears in a <link>
+or <a> tag."
+  (interactive)
+  (if eww-up-url
+      (eww-browse-url (shr-expand-url eww-up-url eww-current-url))
+    (error "No `up' on this page")))
+
+(defun eww-top-url ()
+  "Go to the page marked `top'.
+A page is marked `top' if rel=\"start\", rel=\"home\", or rel=\"contents\"
+appears in a <link> or <a> tag."
+  (interactive)
+  (let ((best-url (or eww-start-url
+		      eww-contents-url
+		      eww-home-url)))
+    (if best-url
+	(eww-browse-url (shr-expand-url best-url eww-current-url))
+      (error "No `top' for this page"))))
+
 (defun eww-reload ()
   "Reload the current page."
   (interactive)




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

* Re: eww
  2013-06-18 16:17         ` eww Tom Tromey
@ 2013-06-18 19:06           ` Steinar Bang
  0 siblings, 0 replies; 59+ messages in thread
From: Steinar Bang @ 2013-06-18 19:06 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

>>>>> Tom Tromey <tromey@redhat.com>:

>>> Here's a version that addresses your comments and adds doc strings and a
>>> ChangeLog entry.  Let me know what you think.

Lars> Looks good; applied.

> I didn't see it in bzr.

It's probably onlt in the gnus git, so far: http://git.gnus.org/ 




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

* Re: eww
  2013-06-18 11:23   ` eww Lars Magne Ingebrigtsen
  2013-06-18 14:34     ` eww Tom Tromey
  2013-06-18 14:39     ` eww Tom Tromey
@ 2013-06-18 19:07     ` Stefan Monnier
  2 siblings, 0 replies; 59+ messages in thread
From: Stefan Monnier @ 2013-06-18 19:07 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: Tom Tromey, ding, emacs-devel

>> +(defvar eww-next-url nil)
>> +(make-variable-buffer-local 'eww-next-url)
>> +(defvar eww-previous-url nil)
>> +(make-variable-buffer-local 'eww-previous-url)
>> +(defvar eww-up-url nil)
>> +(make-variable-buffer-local 'eww-up-url)
>> +(defvar eww-top-url nil)
>> +(make-variable-buffer-local 'eww-top-url)

> I think that for package-specific variables like this we're supposed to
> use

> (set (make-local-variable 'eww-top-url) nil)

> in the mode setup instead, so that we're not making variables needlessly
> globally buffer-local.

For variables whose global value is of no use anyway, you're just as
well to use defvar-local (or equivalent) like Tom did.


        Stefan



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

* Re: eww
  2013-06-18 15:04       ` eww Lars Magne Ingebrigtsen
@ 2013-06-18 19:13         ` Stefan Monnier
  2013-06-18 19:17           ` eww Eli Zaretskii
  2013-06-18 19:27           ` eww Tom Tromey
  0 siblings, 2 replies; 59+ messages in thread
From: Stefan Monnier @ 2013-06-18 19:13 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: Tom Tromey, ding, emacs-devel

>> I'm more optimistic about the possibility.
>> Is there a particular thing you think would be difficult or messy?
> Info has a bunch of commands for jumping to the index and searching the
> entire manual, etc.  Reading the HTML version of the manual will never
> be as convenient as reading the info version.

AFAIK, it's easy to make HTML pages which includes most/all the meta
information that Info pages contain.  So you can then provide the "bunch
of commands" without much trouble.

>> Maybe there is a way to do it as a derived mode so that it doesn't
>> conflict too much with the web-browsing aspect of eww.
> Or just continue to use info, which is really good at this sort of
> thing.  :-)

Info has serious shortcomings which are hard to circumvent.  E.g. it's
pre-formatted.


        Stefan



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

* Re: eww
  2013-06-18 19:13         ` eww Stefan Monnier
@ 2013-06-18 19:17           ` Eli Zaretskii
  2013-06-18 20:21             ` eww Stefan Monnier
  2013-06-18 23:03             ` eww Xue Fuqiao
  2013-06-18 19:27           ` eww Tom Tromey
  1 sibling, 2 replies; 59+ messages in thread
From: Eli Zaretskii @ 2013-06-18 19:17 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: tromey, larsi, ding, emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Date: Tue, 18 Jun 2013 15:13:22 -0400
> Cc: Tom Tromey <tromey@redhat.com>, ding@gnus.org,
> 	emacs-devel <emacs-devel@gnu.org>
> 
> Info has serious shortcomings which are hard to circumvent.  E.g. it's
> pre-formatted.

For manuals we produce ourselves, using the --fill-column switch to
makeinfo can easily overcome the pre-formatted thing.

Any other serious shortcomings?



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

* Re: eww
  2013-06-18 19:13         ` eww Stefan Monnier
  2013-06-18 19:17           ` eww Eli Zaretskii
@ 2013-06-18 19:27           ` Tom Tromey
  1 sibling, 0 replies; 59+ messages in thread
From: Tom Tromey @ 2013-06-18 19:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Lars Magne Ingebrigtsen, ding, emacs-devel

>> Info has a bunch of commands for jumping to the index and searching the
>> entire manual, etc.  Reading the HTML version of the manual will never
>> be as convenient as reading the info version.

Stefan> AFAIK, it's easy to make HTML pages which includes most/all the meta
Stefan> information that Info pages contain.  So you can then provide the "bunch
Stefan> of commands" without much trouble.

makeinfo (I'm looking at the output of makeinfo 5.0) already supplies a
link to the index, like:

<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">

This seems to be in every node.
So I think implementing "i" isn't too bad.


makeinfo also lets us know if the node has a menu:

<table class="menu" border="0" cellspacing="0">

So "m" and the digit arguments seem doable.


Searching seems a bit trickier.

I didn't look at issues if the HTML is in a single file rather than a
file per node.

I also didn't look at info-lookup-symbol.  Though I note that at least
the Gtk manuals use some similar markup, so moving to HTML would
potentially broaden the documentation conveniently available to Emacs
users.

Tom



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

* Re: eww
  2013-06-18 19:17           ` eww Eli Zaretskii
@ 2013-06-18 20:21             ` Stefan Monnier
  2013-06-18 23:34               ` eww James Cloos
  2013-06-19  2:50               ` eww Eli Zaretskii
  2013-06-18 23:03             ` eww Xue Fuqiao
  1 sibling, 2 replies; 59+ messages in thread
From: Stefan Monnier @ 2013-06-18 20:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, tromey, ding, emacs-devel

>> Info has serious shortcomings which are hard to circumvent.  E.g. it's
>> pre-formatted.
> For manuals we produce ourselves, using the --fill-column switch to
> makeinfo can easily overcome the pre-formatted thing.

I'm not sure how that helps refill Info documents to adapt to the size
of the Emacs window, or reliably recognize elements to display them
using face attributes rather than ascii annotations.


        Stefan



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

* Re: eww
  2013-06-18 19:17           ` eww Eli Zaretskii
  2013-06-18 20:21             ` eww Stefan Monnier
@ 2013-06-18 23:03             ` Xue Fuqiao
  2013-06-19  3:03               ` eww Eli Zaretskii
  1 sibling, 1 reply; 59+ messages in thread
From: Xue Fuqiao @ 2013-06-18 23:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: tromey, larsi, Stefan Monnier, ding, emacs-devel

On Wed, Jun 19, 2013 at 3:17 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
>> Date: Tue, 18 Jun 2013 15:13:22 -0400
>> Cc: Tom Tromey <tromey@redhat.com>, ding@gnus.org,
>>       emacs-devel <emacs-devel@gnu.org>
>>
>> Info has serious shortcomings which are hard to circumvent.  E.g. it's
>> pre-formatted.
>
> For manuals we produce ourselves, using the --fill-column switch to
> makeinfo can easily overcome the pre-formatted thing.
>
> Any other serious shortcomings?

Well, I don't see any serious shortcomings, but I found a minor problem:
"texi2any --info" still use the convention of backtick ` and straight
single quote ' to emulate curly quotes “ ” or ‘ ’.  It also use other
ASCII kludge such as => instead of ⇒.  Emacs itself support Unicode
several years ago, what about replacing these characters?  At least add
a switch to texi2any.

(Sorry for the off-topic.)

--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/



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

* Re: eww
  2013-06-18 20:21             ` eww Stefan Monnier
@ 2013-06-18 23:34               ` James Cloos
  2013-06-19  2:50               ` eww Eli Zaretskii
  1 sibling, 0 replies; 59+ messages in thread
From: James Cloos @ 2013-06-18 23:34 UTC (permalink / raw)
  To: ding, emacs-devel; +Cc: tromey, larsi, Eli Zaretskii, Stefan Monnier

>>>>> "SM" == Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

SM> I'm not sure how that helps refill Info documents to adapt to the
SM> size of the Emacs window,

If that ever is done, please be sure not to refill wider, only narrower.

Even with a wide window (such as a landscape-aspect full-screen window)
one doesn't want the text column to be full width.

But refilling to work with a too-narrow window is a good idea.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



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

* Re: eww
  2013-06-18 11:31   ` eww Lars Magne Ingebrigtsen
  2013-06-18 14:42     ` eww Tom Tromey
@ 2013-06-18 23:40     ` Juri Linkov
  2013-06-19  0:51       ` eww Stefan Monnier
  2013-06-25  7:43       ` eww lee
  1 sibling, 2 replies; 59+ messages in thread
From: Juri Linkov @ 2013-06-18 23:40 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: Tom Tromey, ding, emacs-devel

>> I'm interested in the possibility of replacing info with html+eww.
>
> As for this, that's not very realistic.  info has a ton of commands
> specially suited for navigating manuals, and does a really good job.
> eww is a general web browser, and trying to shoe-horn all the missing
> info functionality into it would be a mess, I think.

There are two ways to integrate eww and info:

1. eww could support browser extensions, so e.g. when it detects
a navigable manual, it could load a new extension eww-info.el
that will support next/prev/up navigation and specific commands
such as index and search, etc.

2. Info could reuse the layout engine from shr to render
its content to produce nicer output.

BTW, two additional questions: I noticed that in net/browse-url.el you added
eww between Mosaic and Mosaic CCI in `browse-url-browser-function'.
Why such a strange place?  I think eww as a native browser deserves
to be placed first in the list of supported browsers.

Also while trying to customize `browse-url-browser-function' to eww,
it fails to browse links.  Perhaps, this should be fixed by creating a new
function `browse-url-eww' similar to other `browse-url-...' functions?

Another question is that
`M-x eww RET http://duckduckgo.com/?q=my+user+agent RET'
says that the user agent of eww is just "URL/Emacs".
Any respectable browser has a longish text for the User-Agent.
So its User-Agent would be more informative with something like
"eww/5.130008 URL/1.1 Emacs/24.3.50 (gnu/linux)"...



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

* Re: eww
  2013-06-18 23:40     ` eww Juri Linkov
@ 2013-06-19  0:51       ` Stefan Monnier
  2013-06-19  1:08         ` eww Russ Allbery
  2013-06-19 10:34         ` eww Christopher Schmidt
  2013-06-25  7:43       ` eww lee
  1 sibling, 2 replies; 59+ messages in thread
From: Stefan Monnier @ 2013-06-19  0:51 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Tom Tromey, Lars Magne Ingebrigtsen, ding, emacs-devel

> Another question is that
> `M-x eww RET http://duckduckgo.com/?q=my+user+agent RET'
> says that the user agent of eww is just "URL/Emacs".
> Any respectable browser has a longish text for the User-Agent.
> So its User-Agent would be more informative with something like
> "eww/5.130008 URL/1.1 Emacs/24.3.50 (gnu/linux)"...

I think less is more here.


        Stefan



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

* Re: eww
  2013-06-19  0:51       ` eww Stefan Monnier
@ 2013-06-19  1:08         ` Russ Allbery
  2013-06-19 10:14           ` eww Rasmus
  2013-06-19 10:34         ` eww Christopher Schmidt
  1 sibling, 1 reply; 59+ messages in thread
From: Russ Allbery @ 2013-06-19  1:08 UTC (permalink / raw)
  To: ding

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Another question is that
>> `M-x eww RET http://duckduckgo.com/?q=my+user+agent RET'
>> says that the user agent of eww is just "URL/Emacs".
>> Any respectable browser has a longish text for the User-Agent.
>> So its User-Agent would be more informative with something like
>> "eww/5.130008 URL/1.1 Emacs/24.3.50 (gnu/linux)"...

> I think less is more here.

https://panopticlick.eff.org/ comes to mind.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>



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

* Re: eww
  2013-06-18 20:21             ` eww Stefan Monnier
  2013-06-18 23:34               ` eww James Cloos
@ 2013-06-19  2:50               ` Eli Zaretskii
  2013-06-19  4:49                 ` eww Stefan Monnier
  1 sibling, 1 reply; 59+ messages in thread
From: Eli Zaretskii @ 2013-06-19  2:50 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: tromey, larsi, ding, emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: larsi@gnus.org, tromey@redhat.com, ding@gnus.org, emacs-devel@gnu.org
> Date: Tue, 18 Jun 2013 16:21:23 -0400
> 
> >> Info has serious shortcomings which are hard to circumvent.  E.g. it's
> >> pre-formatted.
> > For manuals we produce ourselves, using the --fill-column switch to
> > makeinfo can easily overcome the pre-formatted thing.
> 
> I'm not sure how that helps refill Info documents to adapt to the size
> of the Emacs window

Use a huge number as the argument of --fill-column, and you have
unbroken physical lines.  The rest is up to us.

> or reliably recognize elements to display them using face attributes
> rather than ascii annotations.

We do that already, don't we?



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

* Re: eww
  2013-06-18 23:03             ` eww Xue Fuqiao
@ 2013-06-19  3:03               ` Eli Zaretskii
  0 siblings, 0 replies; 59+ messages in thread
From: Eli Zaretskii @ 2013-06-19  3:03 UTC (permalink / raw)
  To: Xue Fuqiao; +Cc: tromey, larsi, monnier, ding, emacs-devel

> Date: Wed, 19 Jun 2013 07:03:58 +0800
> From: Xue Fuqiao <xfq.free@gmail.com>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, tromey@redhat.com, larsi@gnus.org, 
> 	ding@gnus.org, emacs-devel <emacs-devel@gnu.org>
> 
> Well, I don't see any serious shortcomings, but I found a minor problem:
> "texi2any --info" still use the convention of backtick ` and straight
> single quote ' to emulate curly quotes “ ” or ‘ ’.  It also use other
> ASCII kludge such as => instead of ⇒.  Emacs itself support Unicode
> several years ago, what about replacing these characters?  At least add
> a switch to texi2any.

There's already a switch.




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

* Re: eww
  2013-06-19  2:50               ` eww Eli Zaretskii
@ 2013-06-19  4:49                 ` Stefan Monnier
  0 siblings, 0 replies; 59+ messages in thread
From: Stefan Monnier @ 2013-06-19  4:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: tromey, larsi, ding, emacs-devel

>> or reliably recognize elements to display them using face attributes
>> rather than ascii annotations.
> We do that already, don't we?

Not reliably, sadly.


        Stefan



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

* Re: eww
  2013-06-19  1:08         ` eww Russ Allbery
@ 2013-06-19 10:14           ` Rasmus
  0 siblings, 0 replies; 59+ messages in thread
From: Rasmus @ 2013-06-19 10:14 UTC (permalink / raw)
  To: ding

Russ Allbery <rra@stanford.edu> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> Another question is that
>>> `M-x eww RET http://duckduckgo.com/?q=my+user+agent RET'
>>> says that the user agent of eww is just "URL/Emacs".
>>> Any respectable browser has a longish text for the User-Agent.
>>> So its User-Agent would be more informative with something like
>>> "eww/5.130008 URL/1.1 Emacs/24.3.50 (gnu/linux)"...
>
>> I think less is more here.
>
> https://panopticlick.eff.org/ comes to mind.

My thought exactly.  More is silver, but less is gold.  

The long user agent string is Fx is to some extend a bug.

–Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers.





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

* Re: eww
  2013-06-16 14:53 eww Lars Magne Ingebrigtsen
                   ` (3 preceding siblings ...)
  2013-06-18 11:32 ` eww joakim
@ 2013-06-19 10:21 ` Ivan Kanis
  2013-06-19 11:52   ` eww Steinar Bang
  2013-06-19 12:14   ` eww Ivan Kanis
  2013-08-01 11:59 ` eww John Williams
  5 siblings, 2 replies; 59+ messages in thread
From: Ivan Kanis @ 2013-06-19 10:21 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

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

June, 16 at 16:53 Lars Magne Ingebrigtsen wrote:

> eww probably has a lot of stuff that could still be fixed up, but the
> basics are working now.  That is, you can search for stuff on Google and
> visit Wikipedia.  :-)

Exciting stuff.

I tried it on today's git mirror of bzr. It doesn't display anything. I
have tried:

 - google.com
 - kanis.fr
 - ivan.kanis.fr

I have attached a snapshot.


[-- Attachment #2: 2013-06-19-121709_820x960_scrot.png --]
[-- Type: image/png, Size: 32726 bytes --]

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

* Re: eww
  2013-06-19  0:51       ` eww Stefan Monnier
  2013-06-19  1:08         ` eww Russ Allbery
@ 2013-06-19 10:34         ` Christopher Schmidt
  1 sibling, 0 replies; 59+ messages in thread
From: Christopher Schmidt @ 2013-06-19 10:34 UTC (permalink / raw)
  To: ding, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Another question is that
>> `M-x eww RET http://duckduckgo.com/?q=my+user+agent RET'
>> says that the user agent of eww is just "URL/Emacs".
>> Any respectable browser has a longish text for the User-Agent.
>> So its User-Agent would be more informative with something like
>> "eww/5.130008 URL/1.1 Emacs/24.3.50 (gnu/linux)"...
>
> I think less is more here.

Why do you think so?

In my opinion, it does not make any practical difference considering the
minimal userbase.

        Christopher



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

* Re: eww
  2013-06-19 10:21 ` eww Ivan Kanis
@ 2013-06-19 11:52   ` Steinar Bang
  2013-06-19 12:14   ` eww Ivan Kanis
  1 sibling, 0 replies; 59+ messages in thread
From: Steinar Bang @ 2013-06-19 11:52 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

>>>>> Ivan Kanis <ivan@kanis.fr>:

> I tried it on today's git mirror of bzr. It doesn't display anything.

I'm guessing Lars works directly against the gnus git repo, so both
Emacs bzr and the git mirror of Emacs bzr would lag in comparison to
that.

The Gnus git repo is here:
 http://git.gnus.org/





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

* Re: eww
  2013-06-19 10:21 ` eww Ivan Kanis
  2013-06-19 11:52   ` eww Steinar Bang
@ 2013-06-19 12:14   ` Ivan Kanis
  1 sibling, 0 replies; 59+ messages in thread
From: Ivan Kanis @ 2013-06-19 12:14 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding, emacs-devel

June, 19 at 12:21 Ivan wrote:

> I tried it on today's git mirror of bzr. It doesn't display anything. I
> have tried:
>
>  - google.com
>  - kanis.fr
>  - ivan.kanis.fr
>
> I have attached a snapshot.

It works with -Q. Something is wrong with my configuration. Sorry for
the noise...


-- 
Rule your mind or it will rule you.
    -- Horace



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

* Re: eww
  2013-06-18 23:40     ` eww Juri Linkov
  2013-06-19  0:51       ` eww Stefan Monnier
@ 2013-06-25  7:43       ` lee
  2013-06-25  9:05         ` eww Tassilo Horn
  1 sibling, 1 reply; 59+ messages in thread
From: lee @ 2013-06-25  7:43 UTC (permalink / raw)
  To: ding

Juri Linkov <juri@jurta.org> writes:

> I think eww as a native browser deserves to be placed first in the
> list of supported browsers.
>
> Also while trying to customize `browse-url-browser-function' to eww,
> it fails to browse links.  Perhaps, this should be fixed by creating a new
> function `browse-url-eww' similar to other `browse-url-...' functions?

How do you make eww the browser to be used?

Another question:  Emacs can display PDF nicely.  When I browse to a PDF
with eww, I get the raw data displayed.  It would be cool if eww would
display PDF as PDF :)


-- 
"Object-oriented programming languages aren't completely convinced that
you should be allowed to do anything with functions."
http://www.joelonsoftware.com/items/2006/08/01.html



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

* Re: eww
  2013-06-25  7:43       ` eww lee
@ 2013-06-25  9:05         ` Tassilo Horn
  2013-06-25 13:27           ` eww Steinar Bang
  2013-06-27  9:05           ` eww lee
  0 siblings, 2 replies; 59+ messages in thread
From: Tassilo Horn @ 2013-06-25  9:05 UTC (permalink / raw)
  To: ding

lee <lee@yun.yagibdah.de> writes:

Hi!

> Another question: Emacs can display PDF nicely.  When I browse to a
> PDF with eww, I get the raw data displayed.  It would be cool if eww
> would display PDF as PDF :)

When seeing the raw PDF, just do `M-x doc-view-mode' and you'll get the
rendered version.  The reason it's not shows by default is that
`doc-view-mode' usually gets triggered by the PDF file extension in
`auto-mode-alist', but the *eww* buffer isn't associated with a file.

Maybe we could add an entry to `magic-mode-alist' that triggers
`doc-view-mode-maybe' if a file starts with

  %PDF-<version>

but I'm not sure if that would lead to false positives...

Another issue with eww <-> doc-view interaction is that once
`doc-view-mode' is enabled in the *eww* buffer, you cannot go back
anymore.  I think it would be a good idea if eww created new buffers for
things it can't handle on its own (so everything except for HTML).

Bye,
Tassilo



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

* Re: eww
  2013-06-25  9:05         ` eww Tassilo Horn
@ 2013-06-25 13:27           ` Steinar Bang
  2013-06-27  9:05           ` eww lee
  1 sibling, 0 replies; 59+ messages in thread
From: Steinar Bang @ 2013-06-25 13:27 UTC (permalink / raw)
  To: ding

>>>>> Tassilo Horn <tsdh@gnu.org>:

> When seeing the raw PDF, just do `M-x doc-view-mode' and you'll get the
> rendered version.  The reason it's not shows by default is that
> `doc-view-mode' usually gets triggered by the PDF file extension in
> `auto-mode-alist', but the *eww* buffer isn't associated with a file.

> Maybe we could add an entry to `magic-mode-alist' that triggers
> `doc-view-mode-maybe' if a file starts with

>   %PDF-<version>

> but I'm not sure if that would lead to false positives...

It would be ok to respect the MIME-type if available.  (Of course,
sometimes the PDF comes as application/octet-stream because the client
will sniff the file anyway and use heuristics to determine how to view
it... so it all "works" fine the way it is...)




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

* Re: eww
  2013-06-25  9:05         ` eww Tassilo Horn
  2013-06-25 13:27           ` eww Steinar Bang
@ 2013-06-27  9:05           ` lee
  1 sibling, 0 replies; 59+ messages in thread
From: lee @ 2013-06-27  9:05 UTC (permalink / raw)
  To: ding

Tassilo Horn <tsdh@gnu.org> writes:

> lee <lee@yun.yagibdah.de> writes:
>
> Hi!
>
>> Another question: Emacs can display PDF nicely.  When I browse to a
>> PDF with eww, I get the raw data displayed.  It would be cool if eww
>> would display PDF as PDF :)
>
> When seeing the raw PDF, just do `M-x doc-view-mode' and you'll get the
> rendered version.

True, that would work fine :)

> Another issue with eww <-> doc-view interaction is that once
> `doc-view-mode' is enabled in the *eww* buffer, you cannot go back
> anymore.  I think it would be a good idea if eww created new buffers
> for things it can't handle on its own (so everything except for HTML).

Hm, I was wondering about buffers:  It doesn't seem to be possible to
have several eww buffers at the same time.

M-x eww asks me for an URL to visit and loads that, replacing the one
that's already loaded instead of opening it in a new buffer.  I usually
have about 50--100 Tabs open in seamonkey, and I need them to be
restored when starting the browser, like seamonkey does, and I need
browsing history and sometimes bookmarks ...  If eww would work with
desktop-mode, all the websites and buffers with PDFs or other things
downloaded could be reloaded when emacs is started ...

Or does that go a little too far?  It rises security concerns ... what
if you downloaded some elisp file and it is somehow accidentally
evaluated?


-- 
"Object-oriented programming languages aren't completely convinced that
you should be allowed to do anything with functions."
http://www.joelonsoftware.com/items/2006/08/01.html



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

* Re: eww
  2013-06-17 23:35             ` eww Ted Zlatanov
  2013-06-18  0:01               ` eww Lars Magne Ingebrigtsen
@ 2013-07-09 10:23               ` Julien Cubizolles
  2013-07-09 10:42                 ` eww David Edmondson
  1 sibling, 1 reply; 59+ messages in thread
From: Julien Cubizolles @ 2013-07-09 10:23 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:


> You should add commentary with short instructions on making it the
> default URL browse action in Gnus.

It's not meant as a replacement for shr to display html messages,
right ? Only to w3m and such ?





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

* Re: eww
  2013-07-09 10:23               ` eww Julien Cubizolles
@ 2013-07-09 10:42                 ` David Edmondson
  0 siblings, 0 replies; 59+ messages in thread
From: David Edmondson @ 2013-07-09 10:42 UTC (permalink / raw)
  To: ding

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

On Tue, Jul 09 2013, Julien Cubizolles wrote:
> Ted Zlatanov <tzz@lifelogs.com> writes:
>
>> You should add commentary with short instructions on making it the
>> default URL browse action in Gnus.
>
> It's not meant as a replacement for shr to display html messages,
> right ? Only to w3m and such ?

It's a wrapper around the HTML display code that is shr.

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

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

* Re: eww
  2013-06-18  0:01               ` eww Lars Magne Ingebrigtsen
@ 2013-07-09 13:20                 ` Ted Zlatanov
  2013-08-01 14:39                   ` eww Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 59+ messages in thread
From: Ted Zlatanov @ 2013-07-09 13:20 UTC (permalink / raw)
  To: ding

On Tue, 18 Jun 2013 02:01:00 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> You should add commentary with short instructions on making it the
>> default URL browse action in Gnus.

LMI> I've now added it as a possibly choice to `browse-url-browser-function',
LMI> which is what Gnus uses.

Amazingly, it works.

Have you seen the list of browsers for that variable?  Wow.

"Your own function.  Or regexp.  Or Lisp evaluator, remotely over a SSH
tunnel, in ROT-13 EBCDIC plus the custom chrome on the back bumper."

Ted




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

* Re: eww
  2013-06-16 14:53 eww Lars Magne Ingebrigtsen
                   ` (4 preceding siblings ...)
  2013-06-19 10:21 ` eww Ivan Kanis
@ 2013-08-01 11:59 ` John Williams
  2013-08-02  0:20   ` eww John Williams
  5 siblings, 1 reply; 59+ messages in thread
From: John Williams @ 2013-08-01 11:59 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

I would like to help test eww, but I am not a Lisp programmer (although
I have hobby-level development experience with other programming
languages). I can see here:

http://git.gnus.org/cgit/gnus.git/tree/lisp?id=d54fa592ab919f897f6d0505b70beb90153e561f

that eww.el is in some git branch, but when I follow the instructions
here:

http://git.gnus.org/cgit/gnus.git/about/

and say:

"git clone http://git.gnus.org/gnus.git && cd gnus && git checkout m0-7"

I cannot see this file.  Could someone help me check out a
revision/branch/whatever that includes eew please?  And also, tell me
how a non-coder (or "a little knowledge is a dangerous thing" coder)
could help with the development of this very, very exciting project?

Thanks heaps,

John







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

* Re: eww
  2013-07-09 13:20                 ` eww Ted Zlatanov
@ 2013-08-01 14:39                   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-08-01 14:39 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> Have you seen the list of browsers for that variable?  Wow.
>
> "Your own function.  Or regexp.  Or Lisp evaluator, remotely over a SSH
> tunnel, in ROT-13 EBCDIC plus the custom chrome on the back bumper."

Heh heh heh.

It definitely could stand some pruning.

-- 
(domestic pets only, the antidote for overdose, milk.)
  No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php




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

* Re: eww
  2013-08-01 11:59 ` eww John Williams
@ 2013-08-02  0:20   ` John Williams
  2013-08-02  0:27     ` eww Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 59+ messages in thread
From: John Williams @ 2013-08-02  0:20 UTC (permalink / raw)
  To: emacs-devel; +Cc: ding

Actually, never mind.  I've downloaded (via git) and compiled the
current version of Emacs (GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu,
GTK+ Version 3.8.2) of 2013-08-02 on localhost.localdomain).

But when I say "M-x eww RET http://www.gnu.org RET" I get a totally
blank buffer.  The eww menu shows up, but when I choose the option
"Browse with external browser", I get the error:

call-interactively: Symbol's value as variable is void: shr-external-browser

Thanks for your work on this great project,

John






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

* Re: eww
  2013-08-02  0:20   ` eww John Williams
@ 2013-08-02  0:27     ` Lars Magne Ingebrigtsen
  2013-08-02 19:48       ` eww Richard Stallman
  0 siblings, 1 reply; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-08-02  0:27 UTC (permalink / raw)
  To: John Williams; +Cc: ding, emacs-devel

John Williams <john.williams@otago.ac.nz> writes:

> But when I say "M-x eww RET http://www.gnu.org RET" I get a totally
> blank buffer. 

I don't get a blank buffer.  Have you compiled your Emacs with libxml
support?

-- 
(domestic pets only, the antidote for overdose, milk.)
  No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php



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

* Re: eww
  2013-08-02  0:27     ` eww Lars Magne Ingebrigtsen
@ 2013-08-02 19:48       ` Richard Stallman
  2013-08-03 11:30         ` eww Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 59+ messages in thread
From: Richard Stallman @ 2013-08-02 19:48 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: john.williams, ding, 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.

    > But when I say "M-x eww RET http://www.gnu.org RET" I get a totally
    > blank buffer. 

    I don't get a blank buffer.  Have you compiled your Emacs with libxml
    support?

Suppose he has done that: isn't it a bug that M-x eww gives a blank
buffer rather than a clear and specific error message?

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




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

* Re: eww
  2013-08-02 19:48       ` eww Richard Stallman
@ 2013-08-03 11:30         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 59+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-08-03 11:30 UTC (permalink / raw)
  To: Richard Stallman; +Cc: john.williams, ding, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Suppose he has done that: isn't it a bug that M-x eww gives a blank
> buffer rather than a clear and specific error message?

Definitely.  But we're trying to determine what actually bugs out here,
which is still unclear.

-- 
(domestic pets only, the antidote for overdose, milk.)
  No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php



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

end of thread, other threads:[~2013-08-03 11:30 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-16 14:53 eww Lars Magne Ingebrigtsen
2013-06-16 15:21 ` eww Adam Sjøgren
2013-06-16 15:29   ` eww Lars Magne Ingebrigtsen
2013-06-16 15:46     ` eww Lars Magne Ingebrigtsen
2013-06-16 17:01       ` eww Dmitry Gutov
2013-06-16 17:06         ` eww Lars Magne Ingebrigtsen
2013-06-17 21:00           ` eww Lars Magne Ingebrigtsen
2013-06-17 23:35             ` eww Ted Zlatanov
2013-06-18  0:01               ` eww Lars Magne Ingebrigtsen
2013-07-09 13:20                 ` eww Ted Zlatanov
2013-08-01 14:39                   ` eww Lars Magne Ingebrigtsen
2013-07-09 10:23               ` eww Julien Cubizolles
2013-07-09 10:42                 ` eww David Edmondson
2013-06-16 23:42 ` eww lee
2013-06-17  5:57   ` eww Lars Magne Ingebrigtsen
2013-06-17 18:46     ` eww lee
2013-06-18  2:19 ` eww Tom Tromey
2013-06-18 11:23   ` eww Lars Magne Ingebrigtsen
2013-06-18 14:34     ` eww Tom Tromey
2013-06-18 15:01       ` eww Lars Magne Ingebrigtsen
2013-06-18 15:43         ` eww Tom Tromey
2013-06-18 14:39     ` eww Tom Tromey
2013-06-18 15:14       ` eww Lars Magne Ingebrigtsen
2013-06-18 16:17         ` eww Tom Tromey
2013-06-18 19:06           ` eww Steinar Bang
2013-06-18 19:07     ` eww Stefan Monnier
2013-06-18 11:31   ` eww Lars Magne Ingebrigtsen
2013-06-18 14:42     ` eww Tom Tromey
2013-06-18 15:04       ` eww Lars Magne Ingebrigtsen
2013-06-18 19:13         ` eww Stefan Monnier
2013-06-18 19:17           ` eww Eli Zaretskii
2013-06-18 20:21             ` eww Stefan Monnier
2013-06-18 23:34               ` eww James Cloos
2013-06-19  2:50               ` eww Eli Zaretskii
2013-06-19  4:49                 ` eww Stefan Monnier
2013-06-18 23:03             ` eww Xue Fuqiao
2013-06-19  3:03               ` eww Eli Zaretskii
2013-06-18 19:27           ` eww Tom Tromey
2013-06-18 23:40     ` eww Juri Linkov
2013-06-19  0:51       ` eww Stefan Monnier
2013-06-19  1:08         ` eww Russ Allbery
2013-06-19 10:14           ` eww Rasmus
2013-06-19 10:34         ` eww Christopher Schmidt
2013-06-25  7:43       ` eww lee
2013-06-25  9:05         ` eww Tassilo Horn
2013-06-25 13:27           ` eww Steinar Bang
2013-06-27  9:05           ` eww lee
2013-06-18 11:32 ` eww joakim
2013-06-18 12:16   ` eww Andreas Schwab
2013-06-18 13:57   ` eww Lars Magne Ingebrigtsen
2013-06-18 14:01     ` eww joakim
2013-06-19 10:21 ` eww Ivan Kanis
2013-06-19 11:52   ` eww Steinar Bang
2013-06-19 12:14   ` eww Ivan Kanis
2013-08-01 11:59 ` eww John Williams
2013-08-02  0:20   ` eww John Williams
2013-08-02  0:27     ` eww Lars Magne Ingebrigtsen
2013-08-02 19:48       ` eww Richard Stallman
2013-08-03 11:30         ` eww Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).