[Top][All Lists]

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

Re: [Reuben Thomas] browse-url.el Opera support

From: Reuben Thomas
Subject: Re: [Reuben Thomas] browse-url.el Opera support
Date: Sat, 17 Jan 2004 16:27:17 +0100 (CET)

> I don't understand `several kb of script'

I was looking at the length of browse-url.el. I now see that a lot of it
isn't just calling browsers, but the bit that is (especially the support
for particular browsers) is embarrassingly long.

> The current mechanism would have been junked if I'd been able to
> continue maintaining browse-url.

I've had a go at reworking browse-url-generic to be useful with more
browsers and simpler to customise.

> In most cases, I'd hope you wouldn't have to configure anything.

:-) Well, browse-url already defaults to htmlview for the generic browser,
which works well for me.

OK, I attach a preliminary rework of browse-url.el. I've done three main

1. In line with what RMS said elsewhere, I've removed support for non-free
browsers. Most of the code in this category was to support old versions of
Netscape. Mozilla and new versions of Netscape are adequately supported by
my new implementation of browse-url-generic.

2. I've removed support for other browsers that can be supported by my new
browse-url-generic, e.g. MMM, Grail, Lynx-in-xterm.

3. I've rewritten browse-url-generic so that browse-url-generic-args is a
string, not a list (I've not redone the other browser support code to be
consistent with this; perhaps it's not worthwhile or even
counterproductive). This string may contain the token __URL__; if so, the
URL given is substituted for it. Otherwise, the URL is added as an extra
final argument. The string is split at spaces to be passed to

The reason for using a string rather than a list of args is that it's
easier for users to configure. Slightly more careful parsing of the string
(e.g. respecting quotes when splitting it into individual args) would
solve most remaining problems with that approach.

I'm also sorely tempted to remove the special support for Mosaic, as it's
long and the program is obsolete, but perhaps there are enough users on
older hardware who don't have alternative more modern browsers.

The version of browse-url.el I attach is a modified version of that
supplied with Emacs 21.3.1, and all the modifications are by me (I didn't
use any of the XEmacs code I mentioned before). It's also a little under
half the size of the 21.3.1 version.

http://www.mupsych.org/~rrt/ | Floc: an egregiously good aperitif

Attachment: browse-url.el
Description: Text document

reply via email to

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