Gnus development mailing list
 help / color / mirror / Atom feed
* Defining multiple banners for a mail group.
@ 2002-06-19  3:56 Steve Youngs
  2002-06-19 20:20 ` Toby Speight
  2002-06-20 16:37 ` Paul Jarc
  0 siblings, 2 replies; 6+ messages in thread
From: Steve Youngs @ 2002-06-19  3:56 UTC (permalink / raw)


Hi Folks!

So many mailing lists these days have [un]subscription info or
advertising tacked onto the end of every message... Thank God for the
'banner' parameter. :-)

Unfortunately, I'm starting to see mailing lists with multiple bits of
this type of thing.  So '(banner . signature)' doesn't work because
that only removes the last signature in a message.

I could...

(setq gnus-article-banner-alist
      '((big-banner . "regexp-1\\|regexp-2")))

(setq gnus-parameters
      '(("group\\(1\\|2\\)"
         (banner . big-banner))))

But I want to do something like...

(setq gnus-article-banner-alist
      '((banner-1 . "regexp-1")
        (banner-2 . "regexp-2")))

(setq gnus-parameters
      '(("group1"
         (banner . banner-1))
        ("group2"
         (banner . (concat banner-1 "\\|" banner-2)))))

But I can't get it to work.  Anybody got any ideas?


-- 
|---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
|            XEmacs - It's not just an editor.             |
|                    It's a way of life.                   |
|------------------------------------<youngs@xemacs.org>---|




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Defining multiple banners for a mail group.
  2002-06-19  3:56 Defining multiple banners for a mail group Steve Youngs
@ 2002-06-19 20:20 ` Toby Speight
  2002-06-23  7:01   ` Steve Youngs
  2002-06-20 16:37 ` Paul Jarc
  1 sibling, 1 reply; 6+ messages in thread
From: Toby Speight @ 2002-06-19 20:20 UTC (permalink / raw)


0> In article <microsoft-free.x44rfzx6p3.fsf@eicq.dnsalias.org>,
0> Steve Youngs <URL:mailto:youngs@xemacs.org> ("SY") wrote:

SY> I want to do something like...
SY>
SY> (setq gnus-article-banner-alist
SY>       '((banner-1 . "regexp-1")
SY>         (banner-2 . "regexp-2")))
SY>
SY> (setq gnus-parameters
SY>       '(("group1"
SY>          (banner . banner-1))
SY>         ("group2"
SY>          (banner . (concat banner-1 "\\|" banner-2)))))
SY>
SY> But I can't get it to work.  Anybody got any ideas?

(setq gnus-article-banner-alist
  (let* ((b1 "regexp-1")
         (b2 "regexp-2"))
     (list (cons 'banner-1 b1)
           (cons 'banner-2 b2)
           (cons 'banner-1-2 (concat b1 "\\|" b2)))))

(setq gnus-parameters
      '(("group1"
         (banner . banner-1))
        ("group2"
         (banner . banner-1-2))))


IIRC, the `banner' parameter value must be a symbol.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Defining multiple banners for a mail group.
  2002-06-19  3:56 Defining multiple banners for a mail group Steve Youngs
  2002-06-19 20:20 ` Toby Speight
@ 2002-06-20 16:37 ` Paul Jarc
  2002-06-23  6:58   ` Steve Youngs
  1 sibling, 1 reply; 6+ messages in thread
From: Paul Jarc @ 2002-06-20 16:37 UTC (permalink / raw)


Steve Youngs <youngs@xemacs.org> wrote:
> But I want to do something like...
>
> (setq gnus-article-banner-alist
>       '((banner-1 . "regexp-1")
>         (banner-2 . "regexp-2")))
>
> (setq gnus-parameters
>       '(("group1"
>          (banner . banner-1))
>         ("group2"
>          (banner . (concat banner-1 "\\|" banner-2)))))
>
> But I can't get it to work.  Anybody got any ideas?

Use normal variables instead of gnus-article-banner-alist entries, and
use `, in gnus-parameters.
(setq my-banner-1 "regexp-1"
      my-banner-2 "regexp-2"
      gnus-parameters
      `(("group1"
         (banner . ,my-banner-1))
        ("group2"
         (banner . ,(concat my-banner-1 "\\|" my-banner-2)))))


paul



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Defining multiple banners for a mail group.
  2002-06-20 16:37 ` Paul Jarc
@ 2002-06-23  6:58   ` Steve Youngs
  2002-06-24 18:35     ` Paul Jarc
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Youngs @ 2002-06-23  6:58 UTC (permalink / raw)


|--==> "PJ" == Paul Jarc <prj@po.cwru.edu> writes:

  PJ> Steve Youngs <youngs@xemacs.org> wrote:
  >>("group2"
  >>(banner . (concat banner-1 "\\|" banner-2)))))
  >>
  >>But I can't get it to work.  Anybody got any ideas?

  PJ> Use normal variables instead of gnus-article-banner-alist entries, and
  PJ> use `, in gnus-parameters.
  PJ> (setq my-banner-1 "regexp-1"
  PJ>       my-banner-2 "regexp-2"
  PJ>       gnus-parameters
  PJ>       `(("group1"
  PJ>          (banner . ,my-banner-1))
  PJ>         ("group2"
  PJ>          (banner . ,(concat my-banner-1 "\\|" my-banner-2)))))

Yep, that works quite well.  But I'd rather use
'gnus-article-banner-alist' than define a whole stack of little
variables.  However, your suggestion helped me solve another little
problem I had, so thank you.

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
|            XEmacs - It's not just an editor.             |
|                    It's a way of life.                   |
|------------------------------------<youngs@xemacs.org>---|




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Defining multiple banners for a mail group.
  2002-06-19 20:20 ` Toby Speight
@ 2002-06-23  7:01   ` Steve Youngs
  0 siblings, 0 replies; 6+ messages in thread
From: Steve Youngs @ 2002-06-23  7:01 UTC (permalink / raw)


|--==> "TS" == Toby Speight <streapadair@gmx.net> writes:

  SY> ("group2"
  SY> (banner . (concat banner-1 "\\|" banner-2)))))
  SY> 
  SY> But I can't get it to work.  Anybody got any ideas?

  TS> (setq gnus-article-banner-alist
  TS>   (let* ((b1 "regexp-1")
  TS>          (b2 "regexp-2"))
  TS>      (list (cons 'banner-1 b1)
  TS>            (cons 'banner-2 b2)
  TS>            (cons 'banner-1-2 (concat b1 "\\|" b2)))))

Perfect!  That's exactly what I'm looking for.  Thanks.

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
|            XEmacs - It's not just an editor.             |
|                    It's a way of life.                   |
|------------------------------------<youngs@xemacs.org>---|




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Defining multiple banners for a mail group.
  2002-06-23  6:58   ` Steve Youngs
@ 2002-06-24 18:35     ` Paul Jarc
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Jarc @ 2002-06-24 18:35 UTC (permalink / raw)


Steve Youngs <youngs@xemacs.org> wrote:
>   PJ> Use normal variables instead of gnus-article-banner-alist entries, and
>   PJ> use `, in gnus-parameters.
>   PJ> (setq my-banner-1 "regexp-1"
>   PJ>       my-banner-2 "regexp-2"
>   PJ>       gnus-parameters
>   PJ>       `(("group1"
>   PJ>          (banner . ,my-banner-1))
>   PJ>         ("group2"
>   PJ>          (banner . ,(concat my-banner-1 "\\|" my-banner-2)))))
>
> Yep, that works quite well.  But I'd rather use
> 'gnus-article-banner-alist' than define a whole stack of little
> variables.  However, your suggestion helped me solve another little
> problem I had, so thank you.

Well, the variables are used at the time gnus-parameters is defined,
not when the parameters are used.  So if you just don't want to
pollute the global variable namespace, a let form would work here too.
FWIW.


paul



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-06-24 18:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-19  3:56 Defining multiple banners for a mail group Steve Youngs
2002-06-19 20:20 ` Toby Speight
2002-06-23  7:01   ` Steve Youngs
2002-06-20 16:37 ` Paul Jarc
2002-06-23  6:58   ` Steve Youngs
2002-06-24 18:35     ` Paul Jarc

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).