From 4f4770c1675cf6cd57f333ab989344a59759bdb3 Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Tue, 28 Sep 2004 14:23:14 +0000 Subject: [PATCH] * gnus-registry.el (gnus-registry-split-fancy-with-parent): use gnus-extract-references instead of gnus-split-references * gnus-util.el (gnus-extract-references): new function, analogous to gnus-split-references but extracts only the message-ID without anything extra --- lisp/ChangeLog | 7 +++++++ lisp/gnus-registry.el | 2 +- lisp/gnus-util.el | 10 ++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2deb8463b..bba9174f1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2004-09-28 Teodor Zlatanov + * gnus-registry.el (gnus-registry-split-fancy-with-parent): use + gnus-extract-references instead of gnus-split-references + + * gnus-util.el (gnus-extract-references): new function, analogous + to gnus-split-references but extracts only the message-ID without + anything extra + * hashcash.el (hashcash-generate-payment) (hashcash-check-payment): do the right thing if hashcash-path is nil (because the hashcash program could not be found) diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el index 0acdb28e4..bc951128e 100644 --- a/lisp/gnus-registry.el +++ b/lisp/gnus-registry.el @@ -371,7 +371,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." references res) (if refstr (progn - (setq references (nreverse (gnus-split-references refstr))) + (setq references (nreverse (gnus-extract-references refstr))) (mapcar (lambda (x) (setq res (or (gnus-registry-fetch-group x) res)) (when (or (gnus-registry-grep-in-list diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 50be7ac30..bd0fe7e15 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -480,6 +480,16 @@ inside loops." ids)) (nreverse ids))) +(defun gnus-extract-references (references) + "Return a list of Message-IDs in REFERENCES (in In-Reply-To + format), trimmed to only contain the Message-IDs." + (let ((ids (gnus-split-references references)) + refs) + (dolist (id ids) + (when (string-match "<[^<>]+>" id) + (push (match-string 0 id) refs))) + refs)) + (defsubst gnus-parent-id (references &optional n) "Return the last Message-ID in REFERENCES. If N, return the Nth ancestor instead." -- 2.25.1