[emacs-w3m:13080] Re: always text/plain on ASCII text

Boruch Baum <[email protected]>
Newsgroups gmane.emacs.w3m
Message-ID <[email protected]>
On 2019-01-24 08:01, Emanuel Berg wrote:
> When I visit a text file with Emacs-w3m,
> e.g. [1], it asks me
>
>     COMP-HIST content type (default Download or
>     External-view)
>
> and I answer that text/plain.
>
> To begin with, I think that is a cryptic
> question, and to continue, it gets even worse
> (more confusing) since the situation is as
> mundane as showing a text file.
>
> However, I suppose I'd be content if I could
> disable that question and instead always show
> text files as text/plain.
>
> Is this possible to do with a variable or
> other configuration?
>
> TIA
>
> [1] http://user.it.uu.se/~embe8573/COMP-HIST
>

There's a variable `w3m-content-type-alist' which by default includes
the entries:

 ("text/plain" "\\.\\(?:txt\\|tex\\|el\\)\\'" nil nil)
 ("text/html" "\\.s?html?\\'" w3m-goto-url-new-session nil)
 ("text/sgml" "\\.sgml?\\'" nil "text/plain")

You can change the entry for "text/plain" to perform action
w3m-goto-url-new-session, and that should do it.

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.