diff options
author | Gnus developers <ding@gnus.org.noreply> | 2013-07-08 23:51:26 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2013-07-08 23:51:26 +0000 |
commit | c17b81a7a54e9d206a150a978c62918e5380ba8e (patch) | |
tree | c621892070fe8e8993258539455bdcbc6dc618b5 /lisp/gnus/gnus-registry.el | |
parent | 7fd72e2c01bb03aba7d37166a145b9d3c178fb35 (diff) | |
download | emacs-c17b81a7a54e9d206a150a978c62918e5380ba8e.tar.gz |
Merge changes made in Gnus master
Diffstat (limited to 'lisp/gnus/gnus-registry.el')
-rw-r--r-- | lisp/gnus/gnus-registry.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 5a7dfd82d28..6f2fe78c3d8 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/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) |