Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-parameters: Inconsitency between group parameters and group local variables (was: gcc-self in `gnus-parameters' doesn't work as expected)
       [not found] <87irgiwr1g.fsf@baldur.tsdh.de>
@ 2006-12-28 17:25 ` Reiner Steib
  2006-12-28 18:28   ` gnus-parameters: Inconsitency between group parameters and group local variables Tassilo Horn
  0 siblings, 1 reply; 2+ messages in thread
From: Reiner Steib @ 2006-12-28 17:25 UTC (permalink / raw)
  Cc: bugs, ding

[ Shifting this to ding ]

On Mon, Dec 11 2006, Tassilo Horn wrote:

> No Gnus v0.6
[...]
> I've set up my gnus-parameters as follows:
>
> ,----[ ~/.gnus.el ]
> | (setq gnus-parameters
> |       '(("^nnimap\\+Fastmail:INBOX"
> |          (gnus-use-scoring nil)
> |          (gcc-self . t))
> |         ("^nnimap\\+Fastmail:INBOX\\.D-BARF$"
> |          (to-address . "D-BARF@yahoogroups.de")
> |          (subscribed . t)
> |          (gnus-use-scoring t)
> |          (gcc-self . "nnimap+Fastmail:INBOX.Sent Items"))
> |         ("^nnimap\\+Fastmail:INBOX\\.emms-patches$"
> |          (to-address . "emms-patches@gnu.org")
> |          (subscribed . t)
> |          (gnus-use-scoring t)
> |          (gcc-self . "nnimap+Fastmail:INBOX.Sent Items"))))
> `----
>
> Normally I love reading my mail in a newsgroup-like fashion, so the
> first entry in `gnus-parameters' enables gcc-self for all my IMAP groups
> of my Fastmail account and disables scoring, which I don't need for
> mail:
[...]
> Unfortunately, emms-patches and D-BARF are mailing list where
> self-gcc-ing is not what I want. There I want sent mail to go into my
> usual archive group for mail, that is 
>
>   "nnimap+Fastmail:INBOX.Sent Items"
>
[...]
> I've tried (gcc-self . "nnimap+Fastmail:INBOX.Sent Items"), (gcc-self
> . nil), and (gcc-self . none), but if I write a mail in one of the two
> groups, the gcc-header's value always is nnimap+Fastmail:INBOX.D-BARF or
> nnimap+Fastmail:INBOX.emms-patches (=> (gcc-self . t) still active).

You need to move the more general match "^nnimap\\+Fastmail:INBOX" to
the end of the list:

(setq gnus-parameters
      '(("^nnimap\\+Fastmail:INBOX\\.D-BARF$"
         (to-address . "D-BARF@yahoogroups.de")
         (subscribed . t)
         (gnus-use-scoring t)
         (gcc-self . "nnimap+Fastmail:INBOX.Sent Items"))
        ;; [...]
	("^nnimap\\+Fastmail:INBOX"
         (gnus-use-scoring nil)
         (gcc-self . t))))

> Soring is enabled for the two groups, so the matches should be correct.

The difference is that `gnus-use-scoring' is a group local variable,
whereas `gcc-self' is a group parameter (dotted list).  Surprisingly,
they behave different:

(setq gnus-parameters
      '(("^nnimap\\+.*:INBOX"
	 (tmp-variable 11)
	 (display . 11))
        ("^nnimap\\+.*:INBOX\\.test$"
	 (tmp-variable 22)
	 (display . 22))))

When I enter INBOX.test `M-: tmp-variable RET' returns 22 whereas 
`M-: (gnus-group-find-parameter gnus-newsgroup-name 'display) RET'
returns 11.

I think this inconsistent behavior should be fixed.  IMHO it would be
better if we choose the same behavior `gnus-posting-styles'.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



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

* Re: gnus-parameters: Inconsitency between group parameters and group local variables
  2006-12-28 17:25 ` gnus-parameters: Inconsitency between group parameters and group local variables (was: gcc-self in `gnus-parameters' doesn't work as expected) Reiner Steib
@ 2006-12-28 18:28   ` Tassilo Horn
  0 siblings, 0 replies; 2+ messages in thread
From: Tassilo Horn @ 2006-12-28 18:28 UTC (permalink / raw)


Reiner Steib <reinersteib+from-uce@imap.cc> writes:

Hi Reiner,

> You need to move the more general match "^nnimap\\+Fastmail:INBOX" to
> the end of the list:
>
> (setq gnus-parameters
>       '(("^nnimap\\+Fastmail:INBOX\\.D-BARF$"
>          (to-address . "D-BARF@yahoogroups.de")
>          (subscribed . t)
>          (gnus-use-scoring t)
>          (gcc-self . "nnimap+Fastmail:INBOX.Sent Items"))
>         ;; [...]
> 	("^nnimap\\+Fastmail:INBOX"
>          (gnus-use-scoring nil)
>          (gcc-self . t))))

I tried that, and then the gcc-self works correct. Unfortunately then
gnus-use-scoring in nil in D-BARF. So it seems the group parameters
(dotted lists) have to be set for the most strict match first to the
most general last.

Instead group local variables need to be set the other way round.

So I tried separating group parameters and group local variables
strictly:

,----[ C-h v gnus-parameters RET ]
| Value:
| (("^nnimap\\+Fastmail:INBOX\\.D-BARF$"
|   (to-address . "D-BARF@yahoogroups.de")
|   (subscribed . t)
|   (gcc-self . none))
|  ("^nnimap\\+Fastmail:INBOX\\.emms-patches$"
|   (to-address . "emms-patches@gnu.org")
|   (subscribed . t)
|   (gcc-self . none))
|  ("^nnimap\\+Fastmail:INBOX"
|   (gnus-use-scoring nil)
|   (gcc-self . t))
|  ("^nnimap\\+Fastmail:INBOX\\.D-BARF$"
|   (gnus-use-scoring t))
|  ("^nnimap\\+Fastmail:INBOX\\.emms-patches$"
|   (gnus-use-scoring t)
|   (gnus-thread-sort-functions
|    '(gnus-thread-sort-by-number gnus-thread-sort-by-total-score
|                                 (not gnus-thread-sort-by-date)))))
`----

I did some short testing and it seems to work. :-)

>> Soring is enabled for the two groups, so the matches should be
>> correct.
>
> The difference is that `gnus-use-scoring' is a group local variable,
> whereas `gcc-self' is a group parameter (dotted list).  Surprisingly,
> they behave different:
>
> (setq gnus-parameters
>       '(("^nnimap\\+.*:INBOX"
> 	 (tmp-variable 11)
> 	 (display . 11))
>         ("^nnimap\\+.*:INBOX\\.test$"
> 	 (tmp-variable 22)
> 	 (display . 22))))
>
> When I enter INBOX.test `M-: tmp-variable RET' returns 22 whereas `M-:
> (gnus-group-find-parameter gnus-newsgroup-name 'display) RET' returns
> 11.
>
> I think this inconsistent behavior should be fixed.

Please do that.

> IMHO it would be better if we choose the same behavior
> `gnus-posting-styles'.

Yes. That's exactly what I expected when I did my setup because the docs
don't tell a difference.

In my first try I only used `gnus-parameters' and mixed my posting
styles in with (posting-style ...) blocks. Of course it didn't work
properly. If it had the same behavior as the posting styles, it should
have worked.

Bye and thanks,
Tassilo
-- 
My opinions may have changed, but not the fact that I am right.




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

end of thread, other threads:[~2006-12-28 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87irgiwr1g.fsf@baldur.tsdh.de>
2006-12-28 17:25 ` gnus-parameters: Inconsitency between group parameters and group local variables (was: gcc-self in `gnus-parameters' doesn't work as expected) Reiner Steib
2006-12-28 18:28   ` gnus-parameters: Inconsitency between group parameters and group local variables Tassilo Horn

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