Gnus development mailing list
 help / color / mirror / Atom feed
* setting group properties based on group name and regexp
@ 2000-05-24 16:33 Dave Cohen
  2000-05-24 19:45 ` Karl Kleinpaste
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Cohen @ 2000-05-24 16:33 UTC (permalink / raw)


Is it possible in my .gnus to set group properties based on the group
name?  I'm especially interested in maching the names against regular
expressions.  I'm familiar with setting group properties using 'G p',
but that requires manual setting each time I create a new group.

I'd like all groups matching "mail/out/*" (mail I've sent) to have a
different summary mode line, showing the mail recipient instead of the
sender.

I'd like all groups matching "mail/*" but NOT matching "mail/in/*"
(mail I've saved) to display all messages and disable expiration.

I'm not worried about getting the regexps to match correctly.  I'm
just wondering if anyone can show me some lisp that sets properties
based on regexps matching group name.  Something like
gnus-posting-styles, but for group properties, would be ideal.

Many thanks.  My apologies if this is a FAQ.

-Dave





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

* Re: setting group properties based on group name and regexp
  2000-05-24 16:33 setting group properties based on group name and regexp Dave Cohen
@ 2000-05-24 19:45 ` Karl Kleinpaste
  0 siblings, 0 replies; 2+ messages in thread
From: Karl Kleinpaste @ 2000-05-24 19:45 UTC (permalink / raw)


Dave Cohen <dnc@bigfoot.com> writes:
> Is it possible in my .gnus to set group properties based on the group
> name?

This is (part of) what I use.

(setq gnus-select-group-hook
      (function
       (lambda ()
	 (cond ((string-match "clari." gnus-newsgroup-name)
		(setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-6,6n%]%)   %s\n"))
	       ((string-match "comp.sources" gnus-newsgroup-name)
		(setq gnus-summary-line-format "%U%R%z%I%(%[%4L%]%)   %s\n"))
	       ((string-match "nnir:\\|nnml:[alpu]" gnus-newsgroup-name)
		(setq gnus-summary-line-format "%U%R%z %d %I%(%[%4L: %-20,20f%]%) %s\n"))
	       (t
		(setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-20,20f%]%) %s\n")))
	 (setq gnus-summary-mode-line-format
	       (if (string-match "nnir:" gnus-newsgroup-name)
		   "Gnus: %G [%A] %Z" "Gnus: %g [%A] %Z"))
	 )))

--karl



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

end of thread, other threads:[~2000-05-24 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-24 16:33 setting group properties based on group name and regexp Dave Cohen
2000-05-24 19:45 ` Karl Kleinpaste

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