[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rename `eww' to `web'

From: Jambunathan K
Subject: Re: Rename `eww' to `web'
Date: Sat, 06 Jul 2013 09:58:57 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> I don't care too much about the dispatcher, though, so it's OK with me
>> if Emacs is the default dispatcher (the current status) and we make it
>> easy to make `eww' the default instead.
> Maybe it's fine to let eww handle the mime-type -> major-mode mapping.
> But it's still unclear how to cleanly cause url-handler-mode to affect
> C-x C-f such that eww is called.

I believe, the actual gluing could be achieved with minimal investments.

The magic seems to happen so.

   (get operation 'url-file-handlers)
   (put 'insert-file-contents 'url-file-handlers 'url-insert-file-contents)

So `url-file-handlers' (actually `url-insert') need to check for
`(mm-handle-media-type handle)' and call one of the handlers (See

           ((equal (car content-type) "text/html")
            (eww-display-html charset url))
           ((string-match "^image/" (car content-type))
            (eww-display-raw charset)))

Are there any intervening operation between `insert-file-contents' and

   (add-hook 'find-file-hook 'url-handlers-set-buffer-mode)


Is `find-file-hook' the right place for a `renderer'? For "multipart"
buffers are there renderers on a per-part/region basis.  


Btw, url-handler-mode seems to be doing synchronous fetch while eww
seems to do an aynch fetch.  Should C-x C-f be "blocking" or can it be
an "asynchronous" C-x C-f?


As for write operation, "Wiki URLs" are "writable" and can also be

   ;; These are operations that we do not support yet (DAV!!!)
   (put 'file-writable-p 'url-file-handlers 'ignore)

>         Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]