+ ;; the references string must be valid and parse to valid references
+ (if (and refstr (gnus-extract-references refstr))
+ (progn
+ (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
+ res
+ gnus-registry-unfollowed-groups)
+ (gnus-registry-grep-in-list
+ res
+ nnmail-split-fancy-with-parent-ignore-groups))
+ (setq res nil)))
+ references))
+
+ ;; else: there were no references, now try the extra tracking
+ (let ((sender (gnus-string-remove-all-properties(message-fetch-field "from")))
+ (subject (gnus-string-remove-all-properties
+ (gnus-registry-simplify-subject
+ (message-fetch-field "subject"))))
+ (single-match t))
+ (when (and single-match
+ (gnus-registry-track-sender-p)
+ sender)
+ (maphash
+ (lambda (key value)
+ (let ((this-sender (cdr
+ (gnus-registry-fetch-extra key 'sender))))
+ (when (and single-match
+ this-sender
+ (equal sender this-sender))
+ ;; too many matches, bail
+ (unless (equal res (gnus-registry-fetch-group key))
+ (setq single-match nil))
+ (setq res (gnus-registry-fetch-group key))
+ (when (and sender res)
+ (gnus-message
+ ;; raise level of messaging if gnus-registry-track-extra
+ (if gnus-registry-track-extra 7 9)
+ "%s (extra tracking) traced sender %s to group %s"
+ "gnus-registry-split-fancy-with-parent"
+ sender
+ res)))))
+ gnus-registry-hashtb))
+ (when (and single-match
+ (gnus-registry-track-subject-p)
+ subject
+ (< gnus-registry-minimum-subject-length (length subject)))
+ (maphash
+ (lambda (key value)
+ (let ((this-subject (cdr
+ (gnus-registry-fetch-extra key 'subject))))
+ (when (and single-match
+ this-subject
+ (equal subject this-subject))
+ ;; too many matches, bail
+ (unless (equal res (gnus-registry-fetch-group key))
+ (setq single-match nil))
+ (setq res (gnus-registry-fetch-group key))
+ (when (and subject res)
+ (gnus-message
+ ;; raise level of messaging if gnus-registry-track-extra
+ (if gnus-registry-track-extra 7 9)
+ "%s (extra tracking) traced subject %s to group %s"
+ "gnus-registry-split-fancy-with-parent"
+ subject
+ res)))))
+ gnus-registry-hashtb))
+ (unless single-match
+ (gnus-message
+ 3
+ "gnus-registry-split-fancy-with-parent: too many extra matches for %s"
+ refstr)
+ (setq res nil))))
+ (when (and refstr res)
+ (gnus-message
+ 5