elispemacs24eww

eww: How to tell the page is loaded


In my elisp code, I am trying to use (eww url) to open a page. How can I know that the page loaded? I need to process the eww buffer.

Emacs 24.4


Solution

  • Unfortunately, eww doesn't appear to call a hook after it finishes rendering a page, so you'll need to hook into eww at a lower level:

    (defun eww-render-and-do-stuff (status url &optional point)
      (eww-render status url point)
      (do-stuff))
    
    (let ((url "http://emacs.stackexchange.com"))
      (url-retrieve url 'eww-render-and-do-stuff (list url)))