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

opening local files with arbitrary extensions as HTML



Hi list,

what is the recommended way to force w3m to open a local file as HTML?
Here's an example: the first call to w3m below works, but the second
one treats the local file as plain text and does not invoke w3m to
render it as HTML...

 (let ((w3m-async-exec nil))
   (w3m "file:///usr/share/doc/galeon-common/FAQ.html"))

 (let ((w3m-async-exec nil))
   (w3m "file:///usr/share/doc/apache2-doc/manual/howto/cgi.html.en"))

I've tried to find variables that I could set with "let" to force the
"type" to "text/html", but the best that I was able to get was this:

 (let ((w3m-content-type-alist '(("text/html" ""
browse-url-default-browser nil))))
   (let ((w3m-local-find-file-regexps '(nil . "")))
     (let ((w3m-async-exec nil))
       (w3m "file:///usr/share/doc/apache2-doc/manual/howto/cgi.html.en")
     )
   )
 )

but this produces a buffer in which following links don't work
("Symbol's value as variable is void: w3m-content-type-alist")...

 Thanks in advance, cheers,
   Eduardo Ochs
   http://angg.twu.net/
   eduardoochs@xxxxxxxxx


P.S.: my main reason for needing a way to force w3m to treat files as HTML is this: <http://angg.twu.net/eev-article.html#local-copies>...