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

Re: always text/plain on ASCII text



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