[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:
(B> Does it really take SECONDS? Though I've never felt it inconvenient,
(B> normal web browsing using emacs-w3m will take SECONDS too, IIUC.
(BYes, at least 2 seconds. No, it is not the time that matters the most,
(Bit is the uncertainty about when the browser will pop up, which steals
(Bfocus from emacs and distracts users as a result.
(B> `w3m-view-url-with-external-browser' fetches the header of a url
(B> before launching an external browser, in order to examine the
(B> content type of a url and choose an external browser according
(B> to the user option `w3m-content-type-alist'. For instance, it
(B> launches an image viewer for image/* types, launches xdvi for
(B> the application/dvi type, etc. Yes, fetching the header is
(B> indeed an overhead (it runs w3m) if you don't want to use a
(B> browser other than your kitchen sink web browser.
(BI think this is not ideal. Why not delegate to the GUI browser to decide
(Bwhat to do based on the content-type? Modern browsers can view many
(Bthings that some desktop envs can't even do. emacs-w3m is trying too
(Bhard to be helpful.
(B> But it is author's will or purpose, maybe. Instead, you can replace it
(B> with the one like this:
(B> (defun w3m-view-url-with-browse-url ()
(B> "Launch `browse-url'."
(B> (let ((url (or (w3m-anchor) (w3m-image) w3m-current-url)))
(B> (when (w3m-url-valid url)
(B> (message "Browsing <%s>..." url)
(B> (browse-url url))))
(B> (define-key w3m-mode-map "M" 'w3m-view-url-with-browse-url)
(BThanks. If upstream insists on current behaviour I'll adopt this