Implement kwarg active emails query.
This commit is contained in:
parent
8fcff8e5dc
commit
b1e0c04a8a
2 changed files with 12 additions and 5 deletions
|
@ -121,10 +121,10 @@ command-line.import.scm: $(COMMAND-LINE-SOURCES)
|
|||
|
||||
MBASE-SOURCES=mbase.scm testing.import.scm util-dict-list.import.scm \
|
||||
primes.import.scm brmember.import.scm ansi.import.scm \
|
||||
cal-period.import.scm cal-month.import.scm \
|
||||
cal-period.import.scm cal-month.import.scm \
|
||||
configuration.import.scm progress.import.scm \
|
||||
table.import.scm mbase-dir.import.scm util-list.import.scm \
|
||||
util-tag.import.scm
|
||||
util-tag.import.scm util-kwargs.import.scm
|
||||
|
||||
mbase.o: mbase.import.scm
|
||||
mbase.import.scm: $(MBASE-SOURCES)
|
||||
|
|
|
@ -78,7 +78,8 @@
|
|||
configuration
|
||||
progress
|
||||
mbase-dir
|
||||
util-tag)
|
||||
util-tag
|
||||
util-kwargs)
|
||||
|
||||
;; Constant unique tag
|
||||
(define TAG-MBASE (make-tag mbase))
|
||||
|
@ -258,14 +259,20 @@
|
|||
|
||||
;; Returns the list of emails of all active members sorted
|
||||
;; alphabetically
|
||||
(define (mbase-active-emails mb)
|
||||
(define-kwproc (mbase-active-emails mb
|
||||
(#:active active #t)
|
||||
(#:suspended suspended #f))
|
||||
(sort
|
||||
(filter
|
||||
string?
|
||||
(map
|
||||
(lambda (mr)
|
||||
(brmember-info mr 'mail))
|
||||
(filter brmember-active?
|
||||
(filter (lambda (mr)
|
||||
(or (and active
|
||||
(brmember-active? mr))
|
||||
(and suspended
|
||||
(brmember-suspended? mr))))
|
||||
(mbase-members mb))))
|
||||
string-ci<?))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue