[gnus git] branch master updated: m0-7-168-g584376e =1= Add function to remove extra data from the registry.
Tassilo Horn <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 584376ed60bab46579d52434749da73c1580b600 (commit)
from db8f931b91eec8c0af89fd51e46c74624869de16 (commit)
- Log -----------------------------------------------------------------
commit 584376ed60bab46579d52434749da73c1580b600
Author: Tassilo Horn <[email protected]>
Date: Mon Jul 8 15:37:26 2013 +0200
Add function to remove extra data from the registry.
* gnus-registry.el (gnus-registry-remove-extra-data): New function.
* gnus.texi (lines): Correct description of
`gnus-registry-track-extra's default value. Mention
`gnus-registry-remove-extra-data'.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5859e4b..d11974f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-08 Tassilo Horn <[email protected]>
+
+ * gnus-registry.el (gnus-registry-remove-extra-data): New function.
+
2013-07-06 Lars Ingebrigtsen <[email protected]>
* gnus-art.el (gnus-block-private-groups): Allow `global' methods to
diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el
index 5a7dfd8..6f2fe78 100644
--- a/lisp/gnus-registry.el
+++ b/lisp/gnus-registry.el
@@ -1186,6 +1186,29 @@ data stored in the registry."
(gnus-select-group-with-message-id group message-id) t)
(throw 'found t))))))))
+(defun gnus-registry-remove-extra-data (extra)
+ "Remove tracked EXTRA data from the gnus registry.
+EXTRA is a list of symbols. Valid symbols are those contained in
+the docs of `gnus-registry-track-extra'. This command is useful
+when you stop tracking some extra data and now want to purge it
+from your existing entries."
+ (interactive (list (mapcar 'intern
+ (completing-read-multiple
+ "Extra data: "
+ '("subject" "sender" "recipient")))))
+ (when extra
+ (let ((db gnus-registry-db))
+ (registry-reindex db)
+ (loop for k being the hash-keys of (oref db :data)
+ using (hash-value v)
+ do (let ((newv (delq nil (mapcar #'(lambda (entry)
+ (unless (member (car entry) extra)
+ entry))
+ v))))
+ (registry-delete db (list k) nil)
+ (gnus-registry-insert db k newv)))
+ (registry-reindex db))))
+
;; TODO: a few things
(provide 'gnus-registry)
diff --git a/texi/ChangeLog b/texi/ChangeLog
index a4537e1..370d09a 100644
--- a/texi/ChangeLog
+++ b/texi/ChangeLog
@@ -1,3 +1,9 @@
+2013-07-08 Tassilo Horn <[email protected]>
+
+ * gnus.texi (lines): Correct description of
+ `gnus-registry-track-extra's default value. Mention
+ `gnus-registry-remove-extra-data'.
+
2013-07-06 Lars Ingebrigtsen <[email protected]>
* gnus.texi (Group Parameters): Mention regexp
diff --git a/texi/gnus.texi b/texi/gnus.texi
index 0501bf7..7e6802d 100644
--- a/texi/gnus.texi
+++ b/texi/gnus.texi
@@ -26006,9 +26006,13 @@ following variables.
@defvar gnus-registry-track-extra
This is a list of symbols, so it's best to change it from the
-Customize interface. By default it's @code{(subject sender)}, which
-may work for you. It can be annoying if your mail flow is large and
-people don't stick to the same groups.
+Customize interface. By default it's @code{(subject sender recipient)},
+which may work for you. It can be annoying if your mail flow is large
+and people don't stick to the same groups.
+
+When you decide to stop tracking any of those extra data, you can use
+the command @code{gnus-registry-remove-extra-data} to purge it from
+the existing registry entries.
@end defvar
@defvar gnus-registry-split-strategy
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 4 ++++
lisp/gnus-registry.el | 23 +++++++++++++++++++++++
texi/ChangeLog | 6 ++++++
texi/gnus.texi | 10 +++++++---
4 files changed, 40 insertions(+), 3 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project