mu-scm: add support for mailing-list
method + doc + test
This commit is contained in:
@ -79,6 +79,12 @@
|
||||
"20051209233303.GA13812@gauss.org" "439B41ED.2080402@euler.org"
|
||||
"439A1E03.3090604@euler.org" "20051211184308.GB13513@gauss.org")
|
||||
(references msg)))
|
||||
|
||||
(let ((msg (car (mfind "subject:\"gcc include search order\""))))
|
||||
(test-equal "gcc include search order" (subject msg))
|
||||
(test-equal "klub" (header msg "precedence"))
|
||||
(test-equal "gcc-help.gcc.gnu.org" (mailing-list msg))
|
||||
(test-equal #f (references msg)))
|
||||
(test-end "test-message-more"))
|
||||
|
||||
(define (test-options)
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
sexp
|
||||
|
||||
date
|
||||
iso-date
|
||||
last-change
|
||||
|
||||
message-id
|
||||
@ -42,6 +41,7 @@
|
||||
subject
|
||||
|
||||
references
|
||||
mailing-list
|
||||
|
||||
language
|
||||
size
|
||||
@ -223,6 +223,10 @@ fake-message-id (see impls) are filtered out. If there are no references, return
|
||||
#f."
|
||||
(find-field message ':references))
|
||||
|
||||
(define-method (mailing-list (message <message>))
|
||||
"Get the mailing-list id for MESSAGE or #f if not available."
|
||||
(find-field message ':list))
|
||||
|
||||
;; Flags.
|
||||
|
||||
(define-method (flags (message <message>))
|
||||
|
||||
@ -630,6 +630,7 @@ Get the list of references (message-ids of related messages) for this message.
|
||||
This combines the @t{References} and @t{In-Reply-To} fields, from oldest to the
|
||||
immediate parent. Returns @code{#f} if there are no references.
|
||||
|
||||
For example:
|
||||
@lisp
|
||||
(references msg)
|
||||
=> ("439C1136.90504@@euler.org" "4399DD94.5070309@@euler.org"
|
||||
@ -637,6 +638,18 @@ immediate parent. Returns @code{#f} if there are no references.
|
||||
439A1E03.3090604@@euler.org" "20051211184308.GB13513@@gauss.org")
|
||||
@end lisp
|
||||
|
||||
|
||||
@deffn {Scheme Procedure} mailing-list message
|
||||
@end deffn
|
||||
Get the mailing-list id for this message (corresponding with the @t{List-Id:}
|
||||
field), or @code{#f} if there is none.
|
||||
|
||||
For example:
|
||||
@lisp
|
||||
(mailing-list msg)
|
||||
=> "gnu-emacs-sources.gnu.org"
|
||||
@end lisp
|
||||
|
||||
@c @deffn {Scheme Procedure} sexp message
|
||||
@c @end deffn
|
||||
@c Get the message's s-expression.
|
||||
|
||||
Reference in New Issue
Block a user