Parent split by subject first, then sender.
authorTed Zlatanov <tzz@lifelogs.com>
Fri, 15 Apr 2011 12:48:20 +0000 (07:48 -0500)
committerTed Zlatanov <tzz@lifelogs.com>
Fri, 15 Apr 2011 12:48:20 +0000 (07:48 -0500)
* gnus-registry.el (gnus-registry--split-fancy-with-parent-internal):
Track by subject first, then sender.

lisp/ChangeLog
lisp/gnus-registry.el

index 9f5c0c6..a8628ed 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-15  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-registry.el (gnus-registry--split-fancy-with-parent-internal):
+       Track by subject first, then sender.
+
 2011-04-14  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-registry.el: Updated gnus-registry docs.
index 9f95ce7..77ed5a5 100644 (file)
@@ -425,6 +425,31 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
       (setq found (gnus-registry-post-process-groups
                    "references" refstr found)))
 
+     ;; else: there were no matches, now try the extra tracking by subject
+     (when (and (null found)
+                (memq 'subject gnus-registry-track-extra)
+                subject
+                (< gnus-registry-minimum-subject-length (length subject)))
+       (let ((groups (apply
+                      'append
+                      (mapcar
+                       (lambda (reference)
+                         (gnus-registry-get-id-key reference 'group))
+                       (registry-lookup-secondary-value db 'subject subject)))))
+         (setq found
+               (loop for group in groups
+                     when (gnus-registry-follow-group-p group)
+                     do (gnus-message
+                         ;; warn more if gnus-registry-track-extra
+                         (if gnus-registry-track-extra 7 9)
+                         "%s (extra tracking) traced subject '%s' to %s"
+                         log-agent subject group)
+                     collect group))
+         ;; filter the found groups and return them
+         ;; the found groups are NOT the full groups
+         (setq found (gnus-registry-post-process-groups
+                      "subject" subject found))))
+
      ;; else: there were no matches, try the extra tracking by sender
      (when (and (null found)
                 (memq 'sender gnus-registry-track-extra)
@@ -453,30 +478,6 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
        (setq found (gnus-registry-post-process-groups
                     "sender" sender found)))
 
-     ;; else: there were no matches, now try the extra tracking by subject
-     (when (and (null found)
-                (memq 'subject gnus-registry-track-extra)
-                subject
-                (< gnus-registry-minimum-subject-length (length subject)))
-       (let ((groups (apply
-                      'append
-                      (mapcar
-                       (lambda (reference)
-                         (gnus-registry-get-id-key reference 'group))
-                       (registry-lookup-secondary-value db 'subject subject)))))
-         (setq found
-               (loop for group in groups
-                     when (gnus-registry-follow-group-p group)
-                     do (gnus-message
-                         ;; warn more if gnus-registry-track-extra
-                         (if gnus-registry-track-extra 7 9)
-                         "%s (extra tracking) traced subject '%s' to %s"
-                         log-agent subject group)
-                     collect group))
-         ;; filter the found groups and return them
-         ;; the found groups are NOT the full groups
-         (setq found (gnus-registry-post-process-groups
-                      "subject" subject found))))
      ;; after the (cond) we extract the actual value safely
      (car-safe found)))