[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: w3m-view-url-with-external-browser horrible user experience
- From: Leo Liu <sdl.web@xxxxxxxxx>
- Date: Wed, 16 Oct 2013 15:07:59 +0800
- X-ml-name: emacs-w3m
- X-mail-count: 12192
- References: <m138o1j4jn.fsf@xxxxxxxxx> <b4my55taik6.fsf@xxxxxxx>
On 2013-10-16 13:30 +0800, Katsumi Yamaoka wrote:
> Does it really take SECONDS? Though I've never felt it inconvenient,
> normal web browsing using emacs-w3m will take SECONDS too, IIUC.
Yes, at least 2 seconds. No, it is not the time that matters the most,
it is the uncertainty about when the browser will pop up, which steals
focus from emacs and distracts users as a result.
> `w3m-view-url-with-external-browser' fetches the header of a url
> before launching an external browser, in order to examine the
> content type of a url and choose an external browser according
> to the user option `w3m-content-type-alist'. For instance, it
> launches an image viewer for image/* types, launches xdvi for
> the application/dvi type, etc. Yes, fetching the header is
> indeed an overhead (it runs w3m) if you don't want to use a
> browser other than your kitchen sink web browser.
I think this is not ideal. Why not delegate to the GUI browser to decide
what to do based on the content-type? Modern browsers can view many
things that some desktop envs can't even do. emacs-w3m is trying too
hard to be helpful.
> But it is author's will or purpose, maybe. Instead, you can replace it
> with the one like this:
>
> (defun w3m-view-url-with-browse-url ()
> "Launch `browse-url'."
> (interactive)
> (let ((url (or (w3m-anchor) (w3m-image) w3m-current-url)))
> (when (w3m-url-valid url)
> (message "Browsing <%s>..." url)
> (browse-url url))))
>
> (define-key w3m-mode-map "M" 'w3m-view-url-with-browse-url)
Thanks. If upstream insists on current behaviour I'll adopt this
solution.
Thanks,
Leo