From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80619 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.general Subject: Re: Problem with gnus-parameters Date: Tue, 29 Nov 2011 09:37:34 +0100 Message-ID: <878vmziasx.fsf@tsdh.uni-koblenz.de> References: <878vn0c9as.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1322555884 31062 80.91.229.12 (29 Nov 2011 08:38:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 29 Nov 2011 08:38:04 +0000 (UTC) Cc: ding@gnus.org To: Katsumi Yamaoka Original-X-From: ding-owner+M28901@lists.math.uh.edu Tue Nov 29 09:38:00 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RVJCN-0000Gi-1j for ding-account@gmane.org; Tue, 29 Nov 2011 09:37:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1RVJCF-0001yC-EO; Tue, 29 Nov 2011 02:37:47 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RVJCD-0001xx-TQ for ding@lists.math.uh.edu; Tue, 29 Nov 2011 02:37:45 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RVJC6-0003KW-F8 for ding@lists.math.uh.edu; Tue, 29 Nov 2011 02:37:45 -0600 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RVJC4-0003vv-OT for ding@gnus.org; Tue, 29 Nov 2011 09:37:36 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 424191A412A; Tue, 29 Nov 2011 09:37:36 +0100 (CET) X-Virus-Scanned: amavisd-new at uni-koblenz.de Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JPJ1lrtBu9EY; Tue, 29 Nov 2011 09:37:35 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from tsdh.uni-koblenz.de (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id B01461A411C; Tue, 29 Nov 2011 09:37:35 +0100 (CET) In-Reply-To: (Katsumi Yamaoka's message of "Tue, 29 Nov 2011 13:47:48 +0900") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80619 Archived-At: Katsumi Yamaoka writes: Hi, > Tassilo Horn wrote: >> This suggests that the `gnus-parameters' are applied with the same >> semantics as `gnus-posting-styles': > >> ,----[ (info "(gnus)Posting Styles") ] >>| Each style will be applicable if the first element "matches", in some >>| form or other. > > No, as for `gnus-parameters' the last match is applied now: > > 2010-09-26 Lars Magne Ingebrigtsen > > * gnus.el (gnus-group-fast-parameter): Return the last matching > parameter instead of the first matching parameter. > > In addition, the value of any parameter for a `gnus-parameters' > element that doesn't have that parameter is treated as nil. Ok, I see. > So, > >> (setq gnus-parameters >> `((,(rx "nnimap+") >> (gnus-use-scoring nil) >> (gcc-self . t)) > >> ;; Where to expire >> (,(rx "nnimap+Uni:") >> (expiry-target . "nnimap+Uni:Trash")) >> (,(rx "nnimap+Fastmail:") >> (expiry-target . "nnimap+Fastmail:INBOX.Trash")) >> (,(rx "nnimap+Gmail:") >> (expiry-target . "nnimap+Gmail:[Google Mail]/Trash")) > >> ;; Mailing List exceptions >> (,(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)))) > > for the "nnimap+Gmail:foo" group for example, there are two matching > element; one sets gcc-self to t but the last one resets it to nil. > Maybe the solution is to add (gcc-self . t) to every element having no > gcc-self. That would solve my issue, but the general question is: Is there a reason why `gnus-parameters' are applied differently than posting styles? >From user's perspective, the posting styles approach is extremely convenient, because I don't need to duplicate information. Now, to achieve what I want, I need to duplicate information five times that would be there implicitly with the iterative first-to-last posting style application approach. --8<---------------cut here---------------start------------->8--- (setq gnus-parameters `((,(rx "nnimap+") (gnus-use-scoring nil) (gcc-self . t)) ;; Where to expire (,(rx "nnimap+Uni:") (gcc-self . t) ;; DUPLICATE (expiry-target . "nnimap+Uni:Trash")) (,(rx "nnimap+Fastmail:") (gcc-self . t) ;; DUPLICATE (expiry-target . "nnimap+Fastmail:INBOX.Trash")) (,(rx "nnimap+Gmail:") (gcc-self . t) ;; DUPLICATE (expiry-target . "nnimap+Gmail:[Google Mail]/Trash")) ;; Mailing List exceptions (,(rx "nnimap+Uni:ml/") (expiry-target . "nnimap+Uni:Trash") ;; DUPLICATE (gcc-self . "nnimap+Uni:Sent")) (,(rx "nnimap+Fastmail:INBOX.mailinglists.") (expiry-target . "nnimap+Fastmail:INBOX.Trash") ;; DUPLICATE (gcc-self . "nnimap+Fastmail:INBOX.Sent Items") (gnus-use-scoring t)))) --8<---------------cut here---------------end--------------->8--- And even more baffling, the group local variables (like gnus-use-scoring) actually seem to be applied exactly like posting styles. Above, I've disabled it for all nnimap groups except for my mailinglist groups on my fastmail account. That works just fine as-is without the need of adding (gnus-use-scoring nil) to any other part. IMO, the current implementation is pretty confusing. And although the docs state that there are parameters and group local variable, it doesn't tell how that influences their application. Well, basically it doesn't say anything about how group parameters are applied, anyway... Bye, Tassilo