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

Re: Problem with browse-url-of-buffer and w3m



>>>>> In [emacs-w3m : No.08761] Yoichi NAKAYAMA wrote:

> At Thu, 15 Jun 2006 23:38:38 +0200,
> Lukas Loehrer wrote:
>> I ran into a problem with the function browse-url-of-buffer when w3m
>> is used as the browser. If the buffer to be viewed has no file
>> associated with it, it is saved in a temporary file that does not have
>> a .html extention.

Emacs 22 adds ".html" by default.  Though I've never tested it,
you might possibly be able to do that even with Emacs 21.4 by:

(setq-default browse-url-temp-file-name "/some/where/burl-temp.html")

>> It is thus not recognized by w3m as an html
>> document. If I set w3m-local-find-file-function to nil,, I can open
>> the file after supplying the "text/html" content type in the
>> mini-buffer when asked. As far as I can tell, the variable w3m-content-type-alist
>> varaiable is consulted by the funtion w3m-local-file-type to determine
>> the content type of local files. Files without an extention are
>> "unknown".

> [...]

>> Does anyone have any other ideas how to fix this problem?

> The buffer contents is already rendered.

Exactly.  It becomes quite useless if you save it to a file
because faces and properties are removed.

> Doesn't 'M' (w3m-view-url-with-external-browser) solve the
> problem?

Otherwise, you can feed html content to the external browser if
you run `browse-url-of-buffer' in the buffer where an html
source is viewed.  To make emacs-w3m display an html source,
type the backslash key in the *w3m* buffer.