aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2008-08-31 10:43:43 +0000
committerMiles Bader2008-08-31 10:43:43 +0000
commitb86402ab4420302287185df92f0f3fefe0d295bb (patch)
treeaf4448e9aa422e58514a423c3656ab7dec6d113d
parentcc12456a64e4c0767873c8b2f88896a2fef97b7d (diff)
downloademacs-b86402ab4420302287185df92f0f3fefe0d295bb.tar.gz
emacs-b86402ab4420302287185df92f0f3fefe0d295bb.zip
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1392
-rw-r--r--lisp/gnus/ChangeLog15
-rw-r--r--lisp/gnus/gnus-registry.el26
2 files changed, 35 insertions, 6 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index af50f4bd4b3..ff84e0937a1 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,18 @@
12008-08-30 Teodor Zlatanov <tzz@lifelogs.com>
2
3 * gnus-spec.el (gnus-parse-simple-format): Revert last patch.
4
52008-08-29 Katsumi Yamaoka <yamaoka@jpl.org>
6
7 * gnus-spec.el (gnus-parse-simple-format): Remove trailing whitespace.
8
92008-08-21 Teodor Zlatanov <tzz@lifelogs.com>
10
11 * gnus-registry.el (gnus-registry-max-track-groups): New variable to
12 prevent tracking too many groups.
13 (gnus-registry-split-fancy-with-parent, gnus-registry-fetch-groups):
14 Use it.
15
12008-08-11 Ralf Angeli <angeli@caeruleus.net> 162008-08-11 Ralf Angeli <angeli@caeruleus.net>
2 17
3 * gnus-art.el (gnus-article-next-page): Respect `scroll-margin' when 18 * gnus-art.el (gnus-article-next-page): Respect `scroll-margin' when
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index ba641388939..8704d7ce3df 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -149,6 +149,12 @@ and no extra data."
149 :group 'gnus-registry 149 :group 'gnus-registry
150 :type 'boolean) 150 :type 'boolean)
151 151
152(defcustom gnus-registry-max-track-groups 20
153 "The maximum number of non-unique group matches to check for a message ID."
154 :group 'gnus-registry
155 :type '(radio (const :format "Unlimited " nil)
156 (integer :format "Maximum non-unique matches: %v")))
157
152(defcustom gnus-registry-track-extra nil 158(defcustom gnus-registry-track-extra nil
153 "Whether the registry should track extra data about a message. 159 "Whether the registry should track extra data about a message.
154The Subject and Sender (From:) headers are currently tracked this 160The Subject and Sender (From:) headers are currently tracked this
@@ -506,7 +512,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
506 9 512 9
507 "%s is looking for matches for reference %s from [%s]" 513 "%s is looking for matches for reference %s from [%s]"
508 log-agent reference refstr) 514 log-agent reference refstr)
509 (dolist (group (gnus-registry-fetch-groups reference)) 515 (dolist (group (gnus-registry-fetch-groups
516 reference
517 gnus-registry-max-track-groups))
510 (when (and group (gnus-registry-follow-group-p group)) 518 (when (and group (gnus-registry-follow-group-p group))
511 (gnus-message 519 (gnus-message
512 7 520 7
@@ -530,7 +538,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
530 matches) 538 matches)
531 (when (and this-sender 539 (when (and this-sender
532 (equal sender this-sender)) 540 (equal sender this-sender))
533 (let ((groups (gnus-registry-fetch-groups key))) 541 (let ((groups (gnus-registry-fetch-groups
542 key
543 gnus-registry-max-track-groups)))
534 (dolist (group groups) 544 (dolist (group groups)
535 (push group found-full) 545 (push group found-full)
536 (setq found (append (list group) (delete group found))))) 546 (setq found (append (list group) (delete group found)))))
@@ -557,7 +567,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
557 matches) 567 matches)
558 (when (and this-subject 568 (when (and this-subject
559 (equal subject this-subject)) 569 (equal subject this-subject))
560 (let ((groups (gnus-registry-fetch-groups key))) 570 (let ((groups (gnus-registry-fetch-groups
571 key
572 gnus-registry-max-track-groups)))
561 (dolist (group groups) 573 (dolist (group groups)
562 (push group found-full) 574 (push group found-full)
563 (setq found (append (list group) (delete group found))))) 575 (setq found (append (list group) (delete group found)))))
@@ -1002,8 +1014,8 @@ Returns the first place where the trail finds a group name."
1002 crumb 1014 crumb
1003 (gnus-group-short-name crumb)))))))) 1015 (gnus-group-short-name crumb))))))))
1004 1016
1005(defun gnus-registry-fetch-groups (id) 1017(defun gnus-registry-fetch-groups (id &optional max)
1006 "Get the groups of a message, based on the message ID." 1018 "Get the groups (up to MAX, if given) of a message, based on the message ID."
1007 (let ((trail (gethash id gnus-registry-hashtb)) 1019 (let ((trail (gethash id gnus-registry-hashtb))
1008 groups) 1020 groups)
1009 (dolist (crumb trail) 1021 (dolist (crumb trail)
@@ -1015,7 +1027,9 @@ Returns the first place where the trail finds a group name."
1015 (if (or (not (stringp crumb)) gnus-registry-use-long-group-names) 1027 (if (or (not (stringp crumb)) gnus-registry-use-long-group-names)
1016 crumb 1028 crumb
1017 (gnus-group-short-name crumb)) 1029 (gnus-group-short-name crumb))
1018 groups)))) 1030 groups))
1031 (when (and max (> (length groups) max))
1032 (return))))
1019 ;; return the list of groups 1033 ;; return the list of groups
1020 groups)) 1034 groups))
1021 1035