Gnus development mailing list
 help / color / mirror / Atom feed
* how gnus-parameter works when several regexps match
@ 2011-02-10 12:04 Francis Moreau
  2011-02-10 13:05 ` Tassilo Horn
  0 siblings, 1 reply; 5+ messages in thread
From: Francis Moreau @ 2011-02-10 12:04 UTC (permalink / raw)
  To: ding

Hi,

let say I have this (taken from the gnus documentation):

     (setq gnus-parameters
           '(("mail\\..*"
              (gnus-show-threads nil)
              (gnus-use-scoring nil)
              (gnus-summary-line-format
               "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
              (gcc-self . t)
              (display . all))

             ("^nnimap:\\(foo.bar\\)$"
              (to-group . "\\1"))

             ("mail\\.me"
              (gnus-use-scoring  t))))

I'm wondering what the group parameters are for the group named
'mail.me'.

Does it have group parameters defined by "mail\\.*" _and_ "mail\\.me" or
only the last one ?

I tried and it seems that it uses only the last match. If so is it
possible to change this behaviour ?

Thanks
-- 
Francis



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

* Re: how gnus-parameter works when several regexps match
  2011-02-10 12:04 how gnus-parameter works when several regexps match Francis Moreau
@ 2011-02-10 13:05 ` Tassilo Horn
  2011-02-10 22:09   ` Francis Moreau
  0 siblings, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2011-02-10 13:05 UTC (permalink / raw)
  To: ding

Francis Moreau <francis.moro@gmail.com> writes:

Hi Francis,

>      (setq gnus-parameters
>            '(("mail\\..*"
>               (gnus-show-threads nil)
>               (gnus-use-scoring nil)
>               (gnus-summary-line-format
>                "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
>               (gcc-self . t)
>               (display . all))
>
>              ("^nnimap:\\(foo.bar\\)$"
>               (to-group . "\\1"))
>
>              ("mail\\.me"
>               (gnus-use-scoring  t))))
>
> I'm wondering what the group parameters are for the group named
> 'mail.me'.
>
> Does it have group parameters defined by "mail\\.*" _and_ "mail\\.me"
> or only the last one ?

It should have all parameters of "mail\\..*" with the gnus-use-scoring
value of "mail\\.me", which overrides the value specified in the former.

I have this, and it works that way:

--8<---------------cut here---------------start------------->8---
(setq gnus-parameters
      `(
        (,(rx (or "emacs" "gnus"))
         (gnus-button-emacs-level 10))
        (,(rx "nnimap+")
         (gnus-use-scoring nil)
         (gcc-self . t))
        (,(rx "nnimap+Uni:ml/")
         (gcc-self . "nnimap+Uni:Sent"))
        (,(rx "nnimap+Fastmail:INBOX.mailinglists.")
         (gcc-self . "nnimap+Fastmail:INBOX.Sent Items")
         (gnus-use-scoring t))))
--8<---------------cut here---------------end--------------->8---

For example, I don't use scoring in all my nnimap groups, except for the
groups below nnimap+Fastmail:INBOX.mailinglists, where scoring is turned
on.

Bye,
Tassilo
-- 
Sent from my Emacs



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

* Re: how gnus-parameter works when several regexps match
  2011-02-10 13:05 ` Tassilo Horn
@ 2011-02-10 22:09   ` Francis Moreau
  2011-02-11  8:26     ` Tassilo Horn
  0 siblings, 1 reply; 5+ messages in thread
From: Francis Moreau @ 2011-02-10 22:09 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: ding

Tassilo Horn <tassilo@member.fsf.org> writes:

[...]

>
> It should have all parameters of "mail\\..*" with the gnus-use-scoring
> value of "mail\\.me", which overrides the value specified in the former.
>
> I have this, and it works that way:
>
>
> --8<---------------cut here---------------start------------->8---
> (setq gnus-parameters
>       `(
>         (,(rx (or "emacs" "gnus"))
>          (gnus-button-emacs-level 10))
>         (,(rx "nnimap+")
>          (gnus-use-scoring nil)
>          (gcc-self . t))
>         (,(rx "nnimap+Uni:ml/")
>          (gcc-self . "nnimap+Uni:Sent"))
>         (,(rx "nnimap+Fastmail:INBOX.mailinglists.")
>          (gcc-self . "nnimap+Fastmail:INBOX.Sent Items")
>          (gnus-use-scoring t))))
> --8<---------------cut here---------------end--------------->8---
>
> For example, I don't use scoring in all my nnimap groups, except for the
> groups below nnimap+Fastmail:INBOX.mailinglists, where scoring is turned
> on.

Ok, that's what I'd like to get.

But, it doesn't work for me (trademark. It's a long story between Gnus
and me, you know).

For example doing this:

    (setq gnus-parameters '(
          ("nnimap\\+foo:INBOX"
            (gcc-self . t)
            (posting-style
              (name "toto")
              (address "titi@foo.com")))

           ("nnimap\\+foo"
             (display . [not expire])
             (gnus-large-newsgroup 1000))))

In this case I expect to have name set to 'toto' and adress set to
'titi@foo.com' in my INBOX group. However they are not. I think they are
set to user-full-name and user-mail-address values.

They are set to the expected values only if I comment the second rule
like the following:

    (setq gnus-parameters '(
          ("nnimap\\+foo:INBOX"
            (gcc-self . t)
            (posting-style
              (name "toto")
              (address "titi@foo.com")))))

;           ("nnimap\\+foo"
;             (display . [not expire])
;             (gnus-large-newsgroup 1000))))
;

Do you have any idea why I get this behaviour ?

Thanks
-- 
Francis



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

* Re: how gnus-parameter works when several regexps match
  2011-02-10 22:09   ` Francis Moreau
@ 2011-02-11  8:26     ` Tassilo Horn
  2011-02-11 10:45       ` Francis Moreau
  0 siblings, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2011-02-11  8:26 UTC (permalink / raw)
  To: ding

Francis Moreau <francis.moro@gmail.com> writes:

Hi Francis,

first of all, till some months ago, there was a difference in the
handling of (foo . bar) parameters and (foo val) variables.  In fact,
one of them would override values from groups matched before and the
others did not.  Lars fixed that some time ago, so you should be sure
that your Gnus version is pretty new.

> But, it doesn't work for me (trademark. It's a long story between Gnus
> and me, you know).
>
> For example doing this:
>
>     (setq gnus-parameters '(
>           ("nnimap\\+foo:INBOX"
>             (gcc-self . t)
>             (posting-style
>               (name "toto")
>               (address "titi@foo.com")))
>
>            ("nnimap\\+foo"
>              (display . [not expire])
>              (gnus-large-newsgroup 1000))))
>
> In this case I expect to have name set to 'toto' and adress set to
> 'titi@foo.com' in my INBOX group. However they are not. I think they
> are set to user-full-name and user-mail-address values.

Hm, I've never tried mixing posting-styles in the gnus-parameters...

What if you swap the groups.  At least I have my posting-styles and
gnus-parameters configured starting with lax regexps (matching whole
backends, or at least servers), and following regexps match only some
groups to override some general parameters.

> They are set to the expected values only if I comment the second rule
> like the following:
>
>     (setq gnus-parameters '(
>           ("nnimap\\+foo:INBOX"
>             (gcc-self . t)
>             (posting-style
>               (name "toto")
>               (address "titi@foo.com")))))
>
> ;           ("nnimap\\+foo"
> ;             (display . [not expire])
> ;             (gnus-large-newsgroup 1000))))
> ;
>
> Do you have any idea why I get this behaviour ?

I think that pretty much looks like the issue I described at the start
of my mail.  So you probably need a newer Gnus version.

Oh, btw, gcc-ing is broken in the current gnus head.  Currently, I use
revision

  0bca1908b8a435b5ade1dbebeb9f98207e81d9c4

which works for me.

Bye,
Tassilo



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

* Re: how gnus-parameter works when several regexps match
  2011-02-11  8:26     ` Tassilo Horn
@ 2011-02-11 10:45       ` Francis Moreau
  0 siblings, 0 replies; 5+ messages in thread
From: Francis Moreau @ 2011-02-11 10:45 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: ding

Hi Tassilo,

Tassilo Horn <tassilo@member.fsf.org> writes:

> Francis Moreau <francis.moro@gmail.com> writes:
>
> first of all, till some months ago, there was a difference in the
> handling of (foo . bar) parameters and (foo val) variables.  In fact,
> one of them would override values from groups matched before and the
> others did not.  Lars fixed that some time ago, so you should be sure
> that your Gnus version is pretty new.

Thanks for the info, I was using a revision made at the end of January
but I've now updated to the one you mentionned.

>
>
>> But, it doesn't work for me (trademark. It's a long story between Gnus
>> and me, you know).
>>
>> For example doing this:
>>
>>     (setq gnus-parameters '(
>>           ("nnimap\\+foo:INBOX"
>>             (gcc-self . t)
>>             (posting-style
>>               (name "toto")
>>               (address "titi@foo.com")))
>>
>>            ("nnimap\\+foo"
>>              (display . [not expire])
>>              (gnus-large-newsgroup 1000))))
>>
>> In this case I expect to have name set to 'toto' and adress set to
>> 'titi@foo.com' in my INBOX group. However they are not. I think they
>> are set to user-full-name and user-mail-address values.
>
> Hm, I've never tried mixing posting-styles in the gnus-parameters...
>

It seems that posting-styles doesn't work very well in this case. If the
last rule doesn't have posting-style definition then it ignores all
previous definition given by matched previous rules and use
user-mail-address and co...

Well I just gave a test with gcc-self and it's the same...

BTW I looked at your example and I think it doesn't fit my case since
any last rules define gcc-self in your case. Would be interesting to see
if you remove gcc-self in one last rule then you herit the value of the
previous matching rule.

>
> What if you swap the groups.

same behaviour.

> At least I have my posting-styles and gnus-parameters configured
> starting with lax regexps (matching whole backends, or at least
> servers), and following regexps match only some groups to override
> some general parameters.
>
>> They are set to the expected values only if I comment the second rule
>> like the following:
>>
>>     (setq gnus-parameters '(
>>           ("nnimap\\+foo:INBOX"
>>             (gcc-self . t)
>>             (posting-style
>>               (name "toto")
>>               (address "titi@foo.com")))))
>>
>> ;           ("nnimap\\+foo"
>> ;             (display . [not expire])
>> ;             (gnus-large-newsgroup 1000))))
>> ;
>>
>> Do you have any idea why I get this behaviour ?
>
> I think that pretty much looks like the issue I described at the start
> of my mail.  So you probably need a newer Gnus version.

Done, but still the same behaviour

Thanks for your help.
-- 
Francis



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

end of thread, other threads:[~2011-02-11 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 12:04 how gnus-parameter works when several regexps match Francis Moreau
2011-02-10 13:05 ` Tassilo Horn
2011-02-10 22:09   ` Francis Moreau
2011-02-11  8:26     ` Tassilo Horn
2011-02-11 10:45       ` Francis Moreau

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