Gnus development mailing list
 help / color / mirror / Atom feed
* compute to-group parameter automatically?
@ 2001-08-03 16:33 Kai Großjohann
  2001-08-05 18:13 ` Amos Gouaux
  2001-08-17 10:50 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Kai Großjohann @ 2001-08-03 16:33 UTC (permalink / raw)


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?

kai
-- 
~/.signature: No such file or directory


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

* Re: compute to-group parameter automatically?
  2001-08-03 16:33 compute to-group parameter automatically? Kai Großjohann
@ 2001-08-05 18:13 ` Amos Gouaux
  2001-08-17 10:50 ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Amos Gouaux @ 2001-08-05 18:13 UTC (permalink / raw)


>>>>> On Fri, 03 Aug 2001 18:33:43 +0200,
>>>>> Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> (kg) writes:

kg> many groups, so that I can say ("^nnimap:foo\\." (to-group . XXX)) and
kg> don't have to list each group?

Shame you couldn't do something like:

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


-- 
Amos



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

* Re: compute to-group parameter automatically?
  2001-08-03 16:33 compute to-group parameter automatically? Kai Großjohann
  2001-08-05 18:13 ` Amos Gouaux
@ 2001-08-17 10:50 ` Lars Magne Ingebrigtsen
  2001-08-17 11:39   ` Kai Großjohann
  1 sibling, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-17 10:50 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> 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


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

* Re: compute to-group parameter automatically?
  2001-08-17 10:50 ` Lars Magne Ingebrigtsen
@ 2001-08-17 11:39   ` Kai Großjohann
  2001-08-17 12:25     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2001-08-17 11:39 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> 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?

Yes.

Maybe one could also allow Lisp forms to compute the value of a
parameter.  Then the to-group parameter for the help-gnu-emacs mailing
list and friends could automatically be computed by reversing the
order of words...

kai
-- 
~/.signature: No such file or directory


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

* Re: compute to-group parameter automatically?
  2001-08-17 11:39   ` Kai Großjohann
@ 2001-08-17 12:25     ` Lars Magne Ingebrigtsen
  2001-08-17 14:33       ` Kai Großjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-17 12:25 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

>> 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?
>
> Yes.

I've now done so.  (Gah.  I've totally forgotten how to write Emacs
Lisp.  Too me *ages* to figure out how `replace-match' worked.)

> Maybe one could also allow Lisp forms to compute the value of a
> parameter.  Then the to-group parameter for the help-gnu-emacs mailing
> list and friends could automatically be computed by reversing the
> order of words...

Sure.  What would the syntax for that be?

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: compute to-group parameter automatically?
  2001-08-17 12:25     ` Lars Magne Ingebrigtsen
@ 2001-08-17 14:33       ` Kai Großjohann
  2001-08-17 14:45         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2001-08-17 14:33 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> Maybe one could also allow Lisp forms to compute the value of a
>> parameter.  Then the to-group parameter for the help-gnu-emacs mailing
>> list and friends could automatically be computed by reversing the
>> order of words...
>
> Sure.  What would the syntax for that be?

How about the same as for normal group parameters?  The `Group
Parameters' node describes something.

kai
-- 
~/.signature: No such file or directory


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

* Re: compute to-group parameter automatically?
  2001-08-17 14:33       ` Kai Großjohann
@ 2001-08-17 14:45         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-17 14:45 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> How about the same as for normal group parameters?  The `Group
> Parameters' node describes something.

Looking over the code, I think that's probably already possible.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~2001-08-17 14:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-03 16:33 compute to-group parameter automatically? Kai Großjohann
2001-08-05 18:13 ` Amos Gouaux
2001-08-17 10:50 ` Lars Magne Ingebrigtsen
2001-08-17 11:39   ` Kai Großjohann
2001-08-17 12:25     ` Lars Magne Ingebrigtsen
2001-08-17 14:33       ` Kai Großjohann
2001-08-17 14:45         ` Lars Magne Ingebrigtsen

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