[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: w3m mode should extend to .txt files by default
- From: Naohiro Aota <nao.aota@xxxxxxxxx>
- Date: Wed, 03 Dec 2008 00:39:14 +0900 (JST)
- X-ml-name: emacs-w3m
- X-mail-count: 10482
- References: <87r64u420r.fsf@xxxxxxxxxxx> <20081202.160209.739619810224990144.naota@xxxxxxxxx> <d46ca6c20812020642s611fa1bfw1d4b5a9a1c0654b2@xxxxxxxxxxxxxx>
From: "Eduardo Ochs" <eduardoochs@xxxxxxxxx>
Subject: [emacs-w3m:10480] Re: w3m mode should extend to .txt files by default
Date: Tue, 2 Dec 2008 09:42:14 -0500
> Is it possible to adapt that idea to force w3m to open local files
> that do not end with "\\.[sx]?html?\\'" as HTML?
>
> Here's an example: run
>
> (snip)
>
> and now (broken, but I hope this may be a step in the right
> direction):
>
> (snip)
>
> In the case ".html" w3m treats it as HTML, as expected;
> in the case ".txt" w3m renders it as plain text (not good),
> in the case ".ht" I get the message
>
> Input emacs.ht's content type (default Download):
>
> in the minibuffer while a temporary buffer called "*w3m-work*" is
> displayed, and when I answer "text/html" w3m renders it as HTML -
> good, but how do I skip the question? And it seems that the answer is
> cached in ~/.w3m/ in some format that I do not understand...
> and the case ".php" seems to be similar to the case ".ht"...
You mean you want open any local file as HTML? Maybe, this is what you
want.
(let ((w3m-local-find-file-regexps '(nil . ""))
(w3m-content-type-alist (append w3m-content-type-alist
'(("text/html" "" nil nil)))))
(w3m "file:///home/naota/list.php"))
Regards,