From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37819 Path: main.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: compute to-group parameter automatically? Date: Fri, 17 Aug 2001 12:50:38 +0200 Organization: Programmerer Ingebrigtsen Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035173507 17588 80.91.224.250 (21 Oct 2002 04:11:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:11:47 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 28892 invoked from network); 17 Aug 2001 10:51:00 -0000 Original-Received: from quimby.gnus.org (195.204.10.139) by gnus.org with SMTP; 17 Aug 2001 10:51:00 -0000 Original-Received: (from news@localhost) by quimby.gnus.org (8.9.3/8.9.3) id MAA04181 for ding@gnus.org; Fri, 17 Aug 2001 12:50:46 +0200 (CEST) Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-NNTP-Posting-Host: quimbies.gnus.org Original-X-Trace: quimby.gnus.org 998045446 14727 195.204.10.148 (17 Aug 2001 10:50:46 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 17 Aug 2001 10:50:46 GMT Mail-Copies-To: never X-Now-Playing: Toshimaru Nakemura and Sachiko M's _Do_: "Do #1" User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 X-Face: &w!^oO~dS|}-P0~ge{$c!h\ I have an entry ("^nnimap:foo.bar$" (to-group . "foo.bar")) in > gnus-parameters . Is there a way to compute the to-group parameter for > many groups, so that I can say ("^nnimap:foo\\." (to-group . XXX)) and > don't have to list each group? No, but you can say: (dolist (group gnus-newsrc-alist) (when (string-match "^nnml:\\(.*\\)$" (setq group (car group))) (insert (format "(\"^%s$\" (to-group . \"%s\"))\n" group (match-string 1 group))))) :-) Having a more general substring match thing going on in that variable would be possible, but I don't quite see how to express that: For example: (("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)) ("mail\\.me" (gnus-use-scoring t)) ("list\\..*" (total-expire . t) (broken-reply-to . t))) There's many params that contains strings... Well, I guess "\\1" (etc) in them all could be replaced by the matching sub string. Would that be useful? -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen