[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: w3m-goto-url on dodgy url file:/foo.html
- From: Kevin Ryde <user42@xxxxxxxxxx>
- Date: Mon, 27 Apr 2009 08:54:33 +1000
- X-ml-name: emacs-w3m
- X-mail-count: 10851
- References: <877i1cnq8e.fsf@xxxxxxxxx> <b4mfxfz4sh2.fsf@xxxxxxx>
Katsumi Yamaoka <yamaoka@xxxxxxx> writes:
>
> - ((string-match "\\`\\(\\(file:/\\{1,2\\}\\)\\|about://dtree\\)/" url)
> + ((string-match "\\`\\(\\(file:/\\{0,2\\}\\)\\|about://dtree\\)/" url)
>
> Is it ok?
Looks likely. Though I notice it's not quite right (before or after :-)
on a url with a hostname (a valid form),
(w3m-url-to-file-name "file://localhost/index.html")
=> "/localhost/index.html"
where I think it would be "index.html", or maybe tramp-ism or something.
Maybe url-parse.el could be pressed into service for the dirty work of
picking apart a string url. It might be shipping builtin with emacs23.