* gnus-registry.el (gnus-registry-split-fancy-with-parent): use
authorTeodor Zlatanov <tzz@lifelogs.com>
Tue, 28 Sep 2004 14:23:14 +0000 (14:23 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Tue, 28 Sep 2004 14:23:14 +0000 (14:23 +0000)
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
lisp/gnus-registry.el
lisp/gnus-util.el

index 2deb846..bba9174 100644 (file)
@@ -1,5 +1,12 @@
 2004-09-28  Teodor Zlatanov  <tzz@lifelogs.com>
 
+       * 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)
index 0acdb28..bc95112 100644 (file)
@@ -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
index 50be7ac..bd0fe7e 100644 (file)
@@ -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."