Gnus development mailing list
 help / color / mirror / Atom feed
* [patch] gnus-boring-article-headers: to-list and cc-list
@ 2003-02-28 18:51 Vasily Korytov
  2003-02-28 20:54 ` ShengHuo ZHU
  0 siblings, 1 reply; 3+ messages in thread
From: Vasily Korytov @ 2003-02-28 18:51 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 228 bytes --]

They do the same, as 'newsgroups, for mailing lists.

Suggested ChangeLog entry:

2003-02-28  Vasily Korytov <deskpot@myrealbox.com>

	* gnus-art.el (gnus-boring-article-headers): New values:
	  'to-list and 'cc-list.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: gnus-art.el.patch --]
[-- Type: text/x-patch, Size: 2130 bytes --]

--- gnus-art.el~	Fri Feb 28 02:14:34 2003
+++ gnus-art.el	Fri Feb 28 21:50:58 2003
@@ -185,6 +185,8 @@
   'empty       Headers with no content.
   'newsgroups  Newsgroup identical to Gnus group.
   'to-address  To identical to To-address.
+  'to-list     To identical to To-list.
+  'cc-list     CC identical to To-list.
   'followup-to Followup-to identical to Newsgroups.
   'reply-to    Reply-to identical to From.
   'date        Date less than four days old.
@@ -193,6 +195,8 @@
   :type '(set (const :tag "Headers with no content." empty)
 	      (const :tag "Newsgroups identical to Gnus group." newsgroups)
 	      (const :tag "To identical to To-address." to-address)
+	      (const :tag "To identical to To-list." to-list)
+	      (const :tag "CC identical to To-list." cc-list)
 	      (const :tag "Followup-to identical to Newsgroups." followup-to)
 	      (const :tag "Reply-to identical to From." reply-to)
 	      (const :tag "Date less than four days old." date)
@@ -1613,6 +1617,32 @@
 			      (nth 1 (mail-extract-address-components to))
 			      to-address)))
 		  (gnus-article-hide-header "to"))))
+	     ((eq elem 'to-list)
+	      (let ((to (message-fetch-field "to"))
+		    (to-list
+		     (gnus-parameter-to-list
+		      (if (boundp 'gnus-newsgroup-name)
+			  gnus-newsgroup-name ""))))
+		(when (and to to-list
+			   (ignore-errors
+			     (gnus-string-equal
+			      ;; only one address in To
+			      (nth 1 (mail-extract-address-components to))
+			      to-list)))
+		  (gnus-article-hide-header "to"))))
+	     ((eq elem 'cc-list)
+	      (let ((cc (message-fetch-field "cc"))
+		    (to-list
+		     (gnus-parameter-to-list
+		      (if (boundp 'gnus-newsgroup-name)
+			  gnus-newsgroup-name ""))))
+		(when (and cc to-list
+			   (ignore-errors
+			     (gnus-string-equal
+			      ;; only one address in CC
+			      (nth 1 (mail-extract-address-components cc))
+			      to-list)))
+		  (gnus-article-hide-header "cc"))))
 	     ((eq elem 'followup-to)
 	      (when (gnus-string-equal
 		     (message-fetch-field "followup-to")

[-- Attachment #1.3: Type: text/plain, Size: 141 bytes --]

-- 
       I accept RFC3156 and RFC1991-compatible encrypted mail.
PGP key fingerprint: 123A 7CCE 6E26 6233 0D87 E01A A0F8 3524 FCD8 1841

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [patch] gnus-boring-article-headers: to-list and cc-list
  2003-02-28 18:51 [patch] gnus-boring-article-headers: to-list and cc-list Vasily Korytov
@ 2003-02-28 20:54 ` ShengHuo ZHU
  2003-02-28 23:04   ` Vasily Korytov
  0 siblings, 1 reply; 3+ messages in thread
From: ShengHuo ZHU @ 2003-02-28 20:54 UTC (permalink / raw)


deskpot@myrealbox.com (Vasily Korytov) writes:

> They do the same, as 'newsgroups, for mailing lists.
>
> Suggested ChangeLog entry:
>
> 2003-02-28  Vasily Korytov <deskpot@myrealbox.com>
>
> 	* gnus-art.el (gnus-boring-article-headers): New values:
> 	  'to-list and 'cc-list.

The patch looks fine.  Could you please sign the copyright assignment
so that we can install the patch?  I'll send you the detail in another
email.

Also could you make a patch to the texi file too?

ShengHuo



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

* Re: [patch] gnus-boring-article-headers: to-list and cc-list
  2003-02-28 20:54 ` ShengHuo ZHU
@ 2003-02-28 23:04   ` Vasily Korytov
  0 siblings, 0 replies; 3+ messages in thread
From: Vasily Korytov @ 2003-02-28 23:04 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 295 bytes --]

>>>>> "ZSH" == ShengHuo ZHU writes:

 ZSH> The patch looks fine.  Could you please sign the copyright assignment
 ZSH> so that we can install the patch?  I'll send you the detail in another
 ZSH> email.

Sure.

 ZSH> Also could you make a patch to the texi file too?

Here it goes.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: gnus.texi.patch --]
[-- Type: text/x-patch, Size: 624 bytes --]

--- gnus.texi~	Fri Feb 28 21:36:09 2003
+++ gnus.texi	Sat Mar  1 01:59:45 2003
@@ -10538,6 +10538,12 @@
 @item to-address
 Remove the @code{To} header if it only contains the address identical to
 the current groups's @code{to-address} parameter.
+@item to-list
+Remove the @code{To} header if it only contains the address identical to
+the current groups's @code{to-list} parameter.
+@item cc-list
+Remove the @code{CC} header if it only contains the address identical to
+the current groups's @code{to-list} parameter.
 @item date
 Remove the @code{Date} header if the article is less than three days
 old.

[-- Attachment #1.3: Type: text/plain, Size: 141 bytes --]

-- 
       I accept RFC3156 and RFC1991-compatible encrypted mail.
PGP key fingerprint: 123A 7CCE 6E26 6233 0D87 E01A A0F8 3524 FCD8 1841

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

end of thread, other threads:[~2003-02-28 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-28 18:51 [patch] gnus-boring-article-headers: to-list and cc-list Vasily Korytov
2003-02-28 20:54 ` ShengHuo ZHU
2003-02-28 23:04   ` Vasily Korytov

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