Gnus development mailing list
 help / color / mirror / Atom feed
From: Matt Armstrong <matt@lickey.com>
Subject: Re: Generating Mail-Followup-To: headers
Date: Fri, 19 Oct 2001 14:31:51 -0600	[thread overview]
Message-ID: <87k7xrmkw8.fsf@squeaker.lickey.com> (raw)
In-Reply-To: <87bsj3fq0n.fsf@mclinux.com> (Josh Huber's message of "Fri, 19 Oct 2001 14:23:04 -0400")

Josh Huber <huber@alum.wpi.edu> writes:

> take a look at this function I just whipped up:
> 
> (defun gnus-find-subscribed-addresses ()
>   (delete-if
>    nil (mapcar '(lambda (group)
> 		  (or (gnus-group-find-parameter group 'to-address)
> 		      (gnus-group-find-parameter group 'to-list)))
> 	       (delete-if-not '(lambda (group)
> 				 (gnus-group-find-parameter
> 				  group 'subscribed))
> 			      (mapcar '(lambda (item) (car item))
> 				      gnus-newsrc-alist)))))
> 
> I'm pretty sure that I shouldn't be just accessing gnus-newsrc-alist
> directly -- someone tell me what I should be doing.
>
> oh, and you'll need something like this:
> 
> (setq gnus-parameters
>       '(("^mail\\.lists\\." (subscribed . t))))

Way cool!

gnus-group-prepare-flat skips the first element of gnus-newsrc-alist
(which appears to always be a dummy group).  Besides that, it looks
like that is the best way to get at all the group names.

Here is the same thing in a procedural style that I can actually
understand.  :-)

(defun gnus-find-subscribed-addresses ()
  (let ((newsrc (cdr gnus-newsrc-alist))
	group address list)
    (while newsrc
      (setq group (car (car newsrc))
	    newsrc (cdr newsrc))
      (if (and (gnus-group-find-parameter group 'subscribed)
	       (setq address (or (gnus-group-find-parameter group 'to-address)
				 (gnus-group-find-parameter group 'to-list))))
	  (setq list (cons address list))))
    list))

-- 
matt



  reply	other threads:[~2001-10-19 20:31 UTC|newest]

Thread overview: 147+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-18  5:11 Matt Armstrong
2001-10-18  5:43 ` Paul Jarc
2001-10-18 16:08   ` Matt Armstrong
2001-10-18 16:19     ` Kai Großjohann
2001-10-18 16:41       ` Paul Jarc
2001-10-18 18:17         ` Kai Großjohann
2001-10-18 23:19           ` Maciej Matysiak
2001-10-19  9:03             ` Kai Großjohann
2001-11-01 21:54               ` Maciej Matysiak
2001-11-01 22:10                 ` Matt Armstrong
2001-11-02  1:03                   ` Samuel Padgett
2001-11-07 13:39                     ` Maciej Matysiak
2001-11-07 13:30                   ` Maciej Matysiak
2001-11-07 14:26                     ` Per Abrahamsen
2001-11-07 14:31                       ` Didier Verna
2001-11-07 14:40                         ` Per Abrahamsen
2001-11-07 14:44                     ` Josh Huber
2001-11-07 15:36                       ` Kai Großjohann
2001-11-07 16:08                         ` Matt Armstrong
2001-11-07 17:03                           ` Kai Großjohann
2001-11-07 19:59                           ` Josh Huber
2001-11-02  8:31                 ` Kai Großjohann
2001-11-02 16:09                   ` Matt Armstrong
2001-11-02 16:52                     ` OT: make bbdb shut up about different email addresses? Josh Huber
2001-11-02 17:37                       ` Matt Armstrong
2001-11-02 17:48                         ` Jason R. Mastaler
2001-11-02 19:44                           ` Matt Armstrong
2001-11-02 19:58                             ` Paul Jarc
2001-11-02 18:35                         ` Matt Armstrong
2001-11-02 22:27                       ` Jack Twilley
2001-11-02 23:54                         ` Matt Armstrong
2001-11-03  5:16                           ` thoughts on spam Bill White
2001-11-03  6:33                             ` Jason R. Mastaler
2001-11-03  7:29                               ` SPAM? What SPAM? (was: thoughts on spam) Robin S. Socha
2001-11-03 18:13                                 ` Harry Putnam
2001-11-03 18:39                                   ` Jason R. Mastaler
2001-11-03 19:04                                     ` Karl Kleinpaste
2001-11-03 19:12                                       ` Jason R. Mastaler
2001-11-03 19:21                                       ` Harry Putnam
2001-11-03 22:52                                         ` Karl Kleinpaste
2001-11-03 14:48                               ` thoughts on spam Bill White
2001-11-03 15:12                                 ` Stainless Steel Rat
2001-11-03 18:24                                   ` Jason R. Mastaler
2001-11-04  6:01                                     ` Stainless Steel Rat
2001-11-04  7:00                                       ` Jason R. Mastaler
2001-11-04  8:40                                         ` Stainless Steel Rat
2001-11-05 20:04                                           ` Jason R. Mastaler
2001-11-05 20:38                                             ` Stainless Steel Rat
2001-11-05 23:06                                               ` Jason R. Mastaler
2001-11-06  1:52                                                 ` Stainless Steel Rat
2001-11-06  2:07                                                   ` Stainless Steel Rat
2001-11-06  2:43                                                     ` Paul Jarc
2001-11-06  3:05                                                       ` Harry Putnam
2001-11-06  3:26                                                       ` Stainless Steel Rat
2001-11-05 22:01                                         ` Chris Shenton
2001-11-05 22:54                                           ` Matt Armstrong
2001-11-03 18:26                                   ` Robin S. Socha
2001-11-03 18:42                                     ` Jason R. Mastaler
2001-11-03 18:56                                     ` Fabien Penso
2001-11-03 19:24                                       ` Robin S. Socha
2001-11-04  5:54                                         ` Stainless Steel Rat
2001-11-04  7:07                                           ` Jason R. Mastaler
2001-11-04  9:04                                             ` Stainless Steel Rat
2001-11-04 17:57                                               ` Matt Armstrong
2001-11-04 20:46                                                 ` Stainless Steel Rat
2001-11-05  3:49                                                   ` Paul Jarc
2001-11-05  4:34                                                     ` Stainless Steel Rat
2001-11-05  5:27                                                       ` Harry Putnam
2001-11-05 15:59                                                   ` Matt Armstrong
2001-11-05 16:57                                                     ` Stainless Steel Rat
2001-11-05 17:45                                                       ` [OT] " Fabien Penso
2001-11-05 19:25                                                         ` Stainless Steel Rat
2001-11-05 19:33                                                       ` Harry Putnam
2001-11-05 19:58                                                         ` Stainless Steel Rat
2001-11-05 20:01                                                         ` Karl Kleinpaste
2001-11-05 20:35                                                         ` Matt Armstrong
2001-11-06  6:51                                                           ` Harry Putnam
2001-11-06 16:55                                                             ` Matt Armstrong
2001-11-06 18:51                                                               ` Harry Putnam
2001-11-06 19:19                                                                 ` Lost Mail (was thoughts on spam) Stainless Steel Rat
2001-11-06 20:02                                                                 ` thoughts on spam Matt Armstrong
2001-11-06 20:49                                                                   ` Harry Putnam
2001-11-06 19:52                                                         ` Steinar Bang
2001-11-04 17:33                                             ` François Pinard
2001-11-04 17:23                                           ` François Pinard
2001-11-03 20:32                                       ` Russ Allbery
2001-11-03 18:15                                 ` Harry Putnam
2001-11-04  4:08                                   ` Bill White
2001-11-04  4:04                                     ` Harry Putnam
2001-11-04  4:07                             ` Harry Putnam
2001-11-04  7:11                               ` Bill White
2001-11-04  7:10                                 ` Jason R. Mastaler
2001-11-04 13:47                                 ` Harry Putnam
2001-11-04 17:45                                   ` bbdb arcana Bill White
2001-11-07 13:43                   ` Generating Mail-Followup-To: headers Maciej Matysiak
2001-10-19  4:48           ` Per Abrahamsen
2001-10-19 13:46             ` Josh Huber
2001-10-19 14:08               ` Per Abrahamsen
2001-10-19 15:49                 ` Paul Jarc
2001-10-19 15:29               ` Matt Armstrong
2001-10-19 16:19                 ` Paul Jarc
2001-10-19 19:29                   ` Matt Armstrong
2001-10-19 19:44                     ` Josh Huber
2001-10-19 20:59                     ` Kai Großjohann
2001-10-19 15:42               ` Paul Jarc
2001-10-19 16:16                 ` Per Abrahamsen
2001-10-19 16:25                   ` Paul Jarc
2001-10-19 17:01                     ` Josh Huber
2001-10-19 17:04                       ` Josh Huber
2001-10-19 19:46                         ` Paul Jarc
2001-10-19 19:54                           ` Paul Jarc
2001-10-19 20:05                             ` Josh Huber
2001-10-19 20:50                               ` Matt Armstrong
2001-10-19 21:12                                 ` Paul Jarc
2001-10-20  6:52                                   ` Josh Huber
2001-10-20  9:41                                   ` Per Abrahamsen
2001-10-21  0:58                                     ` Matt Armstrong
2001-10-19 20:16                       ` Paul Jarc
2001-10-19 21:12                         ` Josh Huber
2001-10-19 21:40                           ` Paul Jarc
2001-10-20  6:25                             ` Josh Huber
2001-10-19 17:51                   ` Kai Großjohann
2001-10-19 18:23                     ` Josh Huber
2001-10-19 20:31                       ` Matt Armstrong [this message]
2001-10-19 20:53                         ` Josh Huber
2001-10-19 22:28                         ` Kai Großjohann
2001-10-19 23:58                           ` Matt Armstrong
2001-10-20 10:56                             ` Kai Großjohann
2001-10-20 11:19                             ` ShengHuo ZHU
2001-10-20  4:47                           ` Paul Jarc
2001-10-20 10:57                             ` Kai Großjohann
2001-10-20  6:29                           ` Josh Huber
2001-10-19 19:26                     ` Matt Armstrong
2001-10-19 21:08                       ` Kai Großjohann
2001-10-19 21:20                       ` Kai Großjohann
2001-10-20  9:51                     ` Per Abrahamsen
2001-10-20 10:59                       ` Kai Großjohann
2001-10-19 16:31               ` Kai Großjohann
2001-10-18 16:59     ` Paul Jarc
2001-10-18 16:36   ` Josh Huber
2001-10-18 17:11     ` Paul Jarc
2001-10-18 17:56       ` Josh Huber
2001-10-18 18:52         ` Matt Armstrong
2001-10-18 19:11           ` Josh Huber
2001-10-18 19:29             ` Matt Armstrong
2001-10-18 19:27         ` Paul Jarc
2001-10-19  9:05         ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k7xrmkw8.fsf@squeaker.lickey.com \
    --to=matt@lickey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).