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

Re: w3m-goto-url on dodgy url file:/foo.html



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.