From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/9729 Path: main.gmane.org!not-for-mail From: "Edward J. Sabol" Newsgroups: gmane.emacs.gnus.general Subject: Re: Posting styles Date: Thu, 30 Jan 1997 16:47:44 -0500 Message-ID: <199701302147.QAA01798@alderaan.gsfc.nasa.gov> References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035149707 20178 80.91.224.250 (20 Oct 2002 21:35:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:35:07 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id OAA03068 for ; Thu, 30 Jan 1997 14:05:05 -0800 Original-Received: from alderaan.gsfc.nasa.gov (alderaan.gsfc.nasa.gov [128.183.127.237]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Thu, 30 Jan 1997 22:47:45 +0100 Original-Received: by alderaan.gsfc.nasa.gov (950413.SGI.8.6.12/951211.SGI.AUTO) id QAA01798; Thu, 30 Jan 1997 16:47:44 -0500 Original-To: ding@ifi.uio.no In-reply-to: (message from Steinar Bang on 30 Jan 1997 18:30:07 +0100) Xref: main.gmane.org gmane.emacs.gnus.general:9729 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:9729 Excerpts from mail: (30-Jan-97) Posting styles by Steinar Bang Steinar> Could someone summarize the posting styles of GNUS? Gnus-posting-styles was originally implemented in September Gnus 0.10 and later removed right before the Gnus 5.2 release (I assume due to some incompatibility with message-mode which was added late in the September Gnus development period) under the cloak of darkness and without even a ChangeLog entry. See the Ding nnml archive circa September 28th, 1995 for the whole story of the origin of gnus-posting-styles. The gnus-posting-styles variable was an alist of `(MATCH . STYLE-LIST)' pairs where MATCH could be either a regexp or a function/form to be eval'ed and STYLE-LIST was an alist of `(ATTRIBUTE . VALUE)' pairs. Valid attributes were supposed to be one of `signature', `from', `organization', and `xface' or a string signifying an abtitrary message header. VALUE could also be a function or form to be eval'ed. For example: (setq gnus-post-style '((".*" . ((signature . nil) (xface . "~/.xface") (organization . "Rebel Alliance") ("X-Home-Page" . (getenv "WWW_HOME")) ("X-Arbitrary-Header" . "blah, blah, blah") )) ((posting-from-work-p) . ((signature . "~/.work-signature") (from . "user@bar.com"))) ((not (usenet-post-p)) . ((signature . "~/.mail-signature"))) ("^rec.humor" . ((signature . (my-funny-signature-randomizer)) (from . "user@foo.com"))) ("^alt.quotations" . ((signature . (my-quote-randomizer)) (from . "user@foo.com"))) ("^comp" . ((signature . "My computer is better than yours!") (organization . "Whiz-Bang Computer, Inc."))) (".*emacs.*" . ((signature . "Give me Emacs or give me death!"))) ("^nnml: . ((signature . "~/.mail-signature"))) )) Gnus iterated through each element of the alist in order and used all the styles that match. Thus, the order of items in the list was significant. In the above example, the signature "Give me Emacs or give me death!" would be used in both comp.editors.emacs.* and alt.religion.emacs, but not comp.unix.programmer. I think this has a *lot* of intrisic freedom that using group parameters doesn't give you. See the above example where in two cases the MATCH portion of the alist are `(posting-from-work-p)' and `(not (usenet-post-p)'. Group parameters couldn't do that. Excerpts from mail: (30-Jan-97) Re: GNUS... by Per Persson Per> My guess is that it should be a part of the Group Parameters thingiebob Per> now, no? This seems like the most sensible thing to me. The problem with using group parameters for posting styles comes when you have well over 200 hundred groups that you are subscribed to. Setting a specific style for say, all the comp.* groups gets pretty tedious. Topics can help with this, but then you're forcing everyone to use topics. For the best of both worlds, maybe if similar group parameters exist they could override the variable settings? My suggestion is to keep it as a variable as defined above and possibly rename it message-posting-styles. I can see people wanting to use it or something like it outside of Gnus whereever there is message-mode. The definition of this message-posting-styles variable would probably have to be tweaked in some manner to make it non-Gnus-specific. For example, instead of (setq gnus-posting-style '(("^rec.humor" . ((signature . (my-funny-signature-randomizer)) (from . "user@foo.com"))))) there would be (setq message-posting-style '((gnus-group-name-matches "^rec.humor") . ((signature . (my-funny-signature-randomizer)) (from . "user@foo.com"))))) This way it could be generic. Later, Ed