Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: Re: Selective HTML rendering using group parameters
Date: Wed, 15 Mar 2006 17:56:15 +0900	[thread overview]
Message-ID: <yamaokar754f5n4.fsf@jpl.org> (raw)
In-Reply-To: <m3bqw85ju6.fsf@tuxie.homelinux.net>

>>>>> In <m3bqw85ju6.fsf@tuxie.homelinux.net> Nelson Ferreira wrote:

> I came across a weird issue regarding group-parameters and
> "group-local" variables.

> I have the following in my gnus:

> ,---- .gnus ----
>| (setq
>|  mm-automatic-display (remove "text/html" mm-automatic-display)
>|  mm-discouraged-alternatives '("text/html" "text/richtext" "text/enriched" "multipart/related")
>|  )
> `----

> in order to have HTML rendering off by default.
> However there are some mailing lists I subscribed where the HTML is
> well-formed enough (and there is no option for text-only :( ) where I
> wanted to enable html rendering by default on those groups.

> So I tried the following in the group parameters of one of the groups
> with "good" HTML:

> ,---- group parameters ---
>| ((mm-automatic-display
>|   (append
>|    (list "text/html")
>|    mm-automatic-display))
>|  (mm-discouraged-alternatives
>|   (remove "text/html"
>|           (remove "multipart/related" mm-discouraged-alternatives))))
> `----

> Sure enough if I press space from the *Group* buffer, the HTML in the
> message is rendered, and it so happens in all other messages in that
> "summary buffer session" .

> However, if no message is immediately rendered (I press ENTER or only
> ticked articles are in the summary buffer) then when the article is
> shown, the HTML is not rendered.

[...]

Well, I think you may want to use `gnus-newsgroup-variables' to
declare that those mm- variables are the group parameters.  Does
this Info document help?

(info "(gnus)RSS")
--8<---------------cut here---------------start------------->8---
   Even if you have added `"text/html"' to the
`mm-discouraged-alternatives' variable (*note Display Customization:
(emacs-mime)Display Customization.) since you don't want to see HTML
parts, it might be more useful especially in `nnrss' groups to display
`text/html' parts.  Here's an example of setting
`mm-discouraged-alternatives' as a group parameter (*note Group
Parameters::) in order to display `text/html' parts only in `nnrss'
groups:

     ;; Set the default value of `mm-discouraged-alternatives'.
     (eval-after-load "gnus-sum"
       '(add-to-list
         'gnus-newsgroup-variables
         '(mm-discouraged-alternatives
           . '("text/html" "image/.*"))))

     ;; Display `text/html' parts in `nnrss' groups.
     (add-to-list
      'gnus-parameters
      '("\\`nnrss:" (mm-discouraged-alternatives nil)))
--8<---------------cut here---------------end--------------->8---



  parent reply	other threads:[~2006-03-15  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-15  5:59 Nelson Ferreira
2006-03-15  8:05 ` Nelson Ferreira
2006-03-15  8:56 ` Katsumi Yamaoka [this message]
2006-03-15 20:20   ` Nelson Ferreira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yamaokar754f5n4.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).