[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rename `eww' to `web'
From: |
Stefan Monnier |
Subject: |
Re: Rename `eww' to `web' |
Date: |
Sat, 06 Jul 2013 05:31:22 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> 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
> `eww-render').
> (cond
> ((equal (car content-type) "text/html")
> (eww-display-html charset url))
> ((string-match "^image/" (car content-type))
> (eww-display-image))
> (t
> (eww-display-raw charset)))
The problem is indeed that find-file's code separates the "fetch data"
from "setup major mode", so the way it works is fairly different from
the way eww works.
> Are there any intervening operation between `insert-file-contents' and
> `find-file-hook'.
> (add-hook 'find-file-hook 'url-handlers-set-buffer-mode)
That doesn't sound very reliable.
> 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?
Indeed, that's another important difference. Maybe if we want to invoke
eww from C-x C-f we need to do it at a higher level than in
insert-file-contents and/or find-file-hook, e.g. something more like
find-directory-functions (tho not for directories), and only if
find-file is called interactively.
Stefan
- Re: Rename `eww' to `web', (continued)
- Re: Rename `eww' to `web', Stefan Monnier, 2013/07/04
- Re: Rename `eww' to `web', Ted Zlatanov, 2013/07/04
- Re: Rename `eww' to `web', Stefan Monnier, 2013/07/05
- Re: Rename `eww' to `web', Ted Zlatanov, 2013/07/05
- Re: Rename `eww' to `web', Stefan Monnier, 2013/07/05
- Re: Rename `eww' to `web', Jambunathan K, 2013/07/06
- Re: Rename `eww' to `web', Jambunathan K, 2013/07/06
- Re: Rename `eww' to `web',
Stefan Monnier <=
- Re: Rename `eww' to `web', Katsumi Yamaoka, 2013/07/04
- Re: Rename `eww' to `web', Stephen Berman, 2013/07/04
- Re: Rename `eww' to `web', Xue Fuqiao, 2013/07/04
- Re: Rename `eww' to `web', Stephen Berman, 2013/07/06
- Re: Rename `eww' to `web', Jambunathan K, 2013/07/04
- Re: Rename `eww' to `web', Richard Stallman, 2013/07/04
- Re: Rename `eww' to `web', Ted Zlatanov, 2013/07/04
Re: Rename `eww' to `web', Lars Ingebrigtsen, 2013/07/06