summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-08-31 10:43:43 +0000
committerMiles Bader <miles@gnu.org>2008-08-31 10:43:43 +0000
commitb86402ab4420302287185df92f0f3fefe0d295bb (patch)
treeaf4448e9aa422e58514a423c3656ab7dec6d113d
parentcc12456a64e4c0767873c8b2f88896a2fef97b7d (diff)
downloademacs-b86402ab4420302287185df92f0f3fefe0d295bb.tar.gz
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 @@
+2008-08-30 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-spec.el (gnus-parse-simple-format): Revert last patch.
+
+2008-08-29 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-spec.el (gnus-parse-simple-format): Remove trailing whitespace.
+
+2008-08-21 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-registry.el (gnus-registry-max-track-groups): New variable to
+ prevent tracking too many groups.
+ (gnus-registry-split-fancy-with-parent, gnus-registry-fetch-groups):
+ Use it.
+
2008-08-11 Ralf Angeli <angeli@caeruleus.net>
* 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."
:group 'gnus-registry
:type 'boolean)
+(defcustom gnus-registry-max-track-groups 20
+ "The maximum number of non-unique group matches to check for a message ID."
+ :group 'gnus-registry
+ :type '(radio (const :format "Unlimited " nil)
+ (integer :format "Maximum non-unique matches: %v")))
+
(defcustom gnus-registry-track-extra nil
"Whether the registry should track extra data about a message.
The Subject and Sender (From:) headers are currently tracked this
@@ -506,7 +512,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
9
"%s is looking for matches for reference %s from [%s]"
log-agent reference refstr)
- (dolist (group (gnus-registry-fetch-groups reference))
+ (dolist (group (gnus-registry-fetch-groups
+ reference
+ gnus-registry-max-track-groups))
(when (and group (gnus-registry-follow-group-p group))
(gnus-message
7
@@ -530,7 +538,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
matches)
(when (and this-sender
(equal sender this-sender))
- (let ((groups (gnus-registry-fetch-groups key)))
+ (let ((groups (gnus-registry-fetch-groups
+ key
+ gnus-registry-max-track-groups)))
(dolist (group groups)
(push group found-full)
(setq found (append (list group) (delete group found)))))
@@ -557,7 +567,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
matches)
(when (and this-subject
(equal subject this-subject))
- (let ((groups (gnus-registry-fetch-groups key)))
+ (let ((groups (gnus-registry-fetch-groups
+ key
+ gnus-registry-max-track-groups)))
(dolist (group groups)
(push group found-full)
(setq found (append (list group) (delete group found)))))
@@ -1002,8 +1014,8 @@ Returns the first place where the trail finds a group name."
crumb
(gnus-group-short-name crumb))))))))
-(defun gnus-registry-fetch-groups (id)
- "Get the groups of a message, based on the message ID."
+(defun gnus-registry-fetch-groups (id &optional max)
+ "Get the groups (up to MAX, if given) of a message, based on the message ID."
(let ((trail (gethash id gnus-registry-hashtb))
groups)
(dolist (crumb trail)
@@ -1015,7 +1027,9 @@ Returns the first place where the trail finds a group name."
(if (or (not (stringp crumb)) gnus-registry-use-long-group-names)
crumb
(gnus-group-short-name crumb))
- groups))))
+ groups))
+ (when (and max (> (length groups) max))
+ (return))))
;; return the list of groups
groups))