From c17b81a7a54e9d206a150a978c62918e5380ba8e Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Mon, 8 Jul 2013 23:51:26 +0000 Subject: [PATCH] Merge changes made in Gnus master --- doc/misc/ChangeLog | 6 ++++++ doc/misc/gnus.texi | 10 +++++++--- lisp/gnus/ChangeLog | 9 +++++++++ lisp/gnus/gnus-registry.el | 23 +++++++++++++++++++++++ lisp/gnus/nnml.el | 5 ++++- 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 5467d2cadca..2fe1914f926 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,9 @@ +2013-07-08 Tassilo Horn + + * gnus.texi (lines): Correct description of + `gnus-registry-track-extra's default value. Mention + `gnus-registry-remove-extra-data'. + 2013-07-06 Lars Ingebrigtsen * gnus.texi (Group Parameters): Mention regexp diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 678521d1220..e5ba2c19eec 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/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 diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 689444878d7..7348b6e603c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,12 @@ +2013-07-08 Lars Magne Ingebrigtsen + + * nnml.el (nnml-request-compact-group): Don't bug out if we can't + delete files (bug#13481). + +2013-07-08 Tassilo Horn + + * gnus-registry.el (gnus-registry-remove-extra-data): New function. + 2013-07-06 Lars Ingebrigtsen * gnus-art.el (gnus-block-private-groups): Allow `global' methods to 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) diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index 64e1ee11977..05d0c902340 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -1094,7 +1094,10 @@ Use the nov database for the current group if available." (concat group ":" new-number-string))) ;; Save to the new file: (nnmail-write-region (point-min) (point-max) newfile)) - (funcall nnmail-delete-file-function oldfile)) + (condition-case () + (funcall nnmail-delete-file-function oldfile) + (file-error + (message "Couldn't delete %s" oldfile)))) ;; 2/ Update all marks for this article: ;; #### NOTE: it is possible that the new article number ;; #### already belongs to a range, whereas the corresponding -- 2.39.2