emacs-devel
[Top][All Lists]
Advanced

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

Re: Rename `eww' to `web'


From: Ted Zlatanov
Subject: Re: Rename `eww' to `web'
Date: Fri, 05 Jul 2013 14:03:42 -0400
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

On Fri, 05 Jul 2013 07:02:18 -0400 Stefan Monnier <address@hidden> wrote: 

>> So I think it makes sense to go straight to `eww' for that case: opening
>> a URL with `C-x C-f'.  Like I said, it's DWIMmery.  There will be a
>> small percentage of users unhappy with it, who will want to just view
>> the file, and we should make that easy (I guessed `find-file-literally'
>> incorrectly but it can be something simple to set in `url-handler-mode'
>> defcustoms).  The key thing is that there are no command names to
>> discover--opening a URL Just Works.

SM> I currently use C-x C-f with url-handler-mode on a regular basis to open
SM> PDF, tarballs, and Elisp files.  Sometime it gets it wrong because it
SM> only uses the URL name rather than the content-type metadata to choose
SM> the major mode, but want to make sure this keeps working.

So `eww' should pass data to the registered handler for that
MIME type, like most web browsers?  I think that's sensible and would
simply shift the dispatch responsibility.

SM> But I don't see any reason why this should collide with using eww in
SM> other cases: eww can't do anything particularly useful with PDF,
SM> tarballs and Elisp code anyway.

OK.  IOW, `eww' and web browsers in general are supposed to be
navigators between content, while the content itself is rendered by
either a HTML/CSS/etc display engine (`eww' uses `shr') or passed off to
an external handler.  So I think this is a manageable problem, if we
simply say Emacs is the fallback handler for any content `eww' doesn't
handle, and provide a way in `eww' to pass the content off to Emacs.

GM> emacs -Q -f url-handler-mode
GM> C-x C-f ftp://ftp.gnu.org
GM> C-x C-f http://www.gnu.org
>> Yup.  The necessary changes to make this usable IMHO are:
>> 1) make it call `eww' by default and provide for a way to instead look
>> at file contents (current behavior, right?)

SM> Why would you want to use eww for all URLs, since it only handles HTML
SM> in a useful way, AFAIU?

`eww' browses the URL, then decides how it should be rendered or
downloaded.  You don't know the type of the URL until you retrieve it,
so a generic dispatcher/navigator like `eww' is your best bet.

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.  Perhaps with Juanma's
dispatcher.el.

>> 2) enable `url-handler-mode' by default

SM> Fine by me

Cool!  Any objections to enabling it by default from anyone else?

SM> (BTW, I've been using the hack below to ape completion on http
SM> URLs).

Nice.  I'm not sure if it should be a package or a built-in feature, but
it probably needs more discussion.

Ted




reply via email to

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