diff options
| author | Andrew G Cohen | 2022-03-04 16:44:40 +0800 |
|---|---|---|
| committer | Andrew G Cohen | 2022-03-17 19:19:39 +0800 |
| commit | 7fef2e04b219f25c64db0e83ec6f4ae707fb7f83 (patch) | |
| tree | 35f735c978bb0b103edb3eed2626fb9469b23f34 | |
| parent | 90040f0e9f0d2a8fd2a8b1bc7904bb1db05470b0 (diff) | |
| download | emacs-7fef2e04b219f25c64db0e83ec6f4ae707fb7f83.tar.gz emacs-7fef2e04b219f25c64db0e83ec6f4ae707fb7f83.zip | |
Improve propagation of gnus/nnselect group info
* lisp/gnus/nnselect.el (nnselect-push-info): Speed up pushing the
nnselect info back to the originating groups.
| -rw-r--r-- | lisp/gnus/nnselect.el | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el index 586dec65af8..d6289f13395 100644 --- a/lisp/gnus/nnselect.el +++ b/lisp/gnus/nnselect.el | |||
| @@ -878,6 +878,9 @@ article came from is also searched." | |||
| 878 | ;; When the backend can store marks we collect any | 878 | ;; When the backend can store marks we collect any |
| 879 | ;; changes. Unlike a normal group the mark lists only | 879 | ;; changes. Unlike a normal group the mark lists only |
| 880 | ;; include marks for articles we retrieved. | 880 | ;; include marks for articles we retrieved. |
| 881 | (when (and (gnus-check-backend-function | ||
| 882 | 'request-set-mark gnus-newsgroup-name) | ||
| 883 | (not (gnus-article-unpropagatable-p type))) | ||
| 881 | (let* ((old (range-list-intersection | 884 | (let* ((old (range-list-intersection |
| 882 | artlist | 885 | artlist |
| 883 | (alist-get type (gnus-info-marks group-info)))) | 886 | (alist-get type (gnus-info-marks group-info)))) |
| @@ -889,7 +892,7 @@ article came from is also searched." | |||
| 889 | ;; This shouldn't happen, but is a sanity check. | 892 | ;; This shouldn't happen, but is a sanity check. |
| 890 | (setq del (range-intersection | 893 | (setq del (range-intersection |
| 891 | (gnus-active artgroup) del)) | 894 | (gnus-active artgroup) del)) |
| 892 | (push (list del 'del (list type)) delta-marks))) | 895 | (push (list del 'del (list type)) delta-marks)))) |
| 893 | 896 | ||
| 894 | ;; Marked sets are of mark-type 'tuple, 'list, or | 897 | ;; Marked sets are of mark-type 'tuple, 'list, or |
| 895 | ;; 'range. We merge the lists with what is already in | 898 | ;; 'range. We merge the lists with what is already in |
| @@ -914,12 +917,15 @@ article came from is also searched." | |||
| 914 | (setq list (cdr all)))) | 917 | (setq list (cdr all)))) |
| 915 | ;; now merge with the original list and sort just to | 918 | ;; now merge with the original list and sort just to |
| 916 | ;; make sure | 919 | ;; make sure |
| 917 | (setq list | 920 | (setq |
| 918 | (sort (map-merge | 921 | list (sort |
| 919 | 'alist list | 922 | (map-merge |
| 920 | (alist-get type (gnus-info-marks group-info))) | 923 | 'alist list |
| 921 | (lambda (elt1 elt2) | 924 | (delq nil |
| 922 | (< (car elt1) (car elt2)))))) | 925 | (mapcar |
| 926 | (lambda (x) (unless (memq (car x) artlist) x)) | ||
| 927 | (alist-get type (gnus-info-marks group-info))))) | ||
| 928 | 'car-less-than-car))) | ||
| 923 | (t | 929 | (t |
| 924 | (setq list | 930 | (setq list |
| 925 | (range-compress-list | 931 | (range-compress-list |
| @@ -963,9 +969,13 @@ article came from is also searched." | |||
| 963 | (cdr (assoc artgroup select-reads))) | 969 | (cdr (assoc artgroup select-reads))) |
| 964 | (sort (cdr (assoc artgroup select-unreads)) #'<)))) | 970 | (sort (cdr (assoc artgroup select-unreads)) #'<)))) |
| 965 | (gnus-get-unread-articles-in-group | 971 | (gnus-get-unread-articles-in-group |
| 966 | group-info (gnus-active artgroup) t) | 972 | group-info (gnus-active artgroup) t)) |
| 967 | (gnus-group-update-group artgroup t t))))))) | 973 | (gnus-group-update-group |
| 968 | 974 | artgroup t | |
| 975 | (equal group-info | ||
| 976 | (setq group-info (copy-sequence (gnus-get-info artgroup)) | ||
| 977 | group-info | ||
| 978 | (delq (gnus-info-params group-info) group-info))))))))) | ||
| 969 | 979 | ||
| 970 | (declare-function gnus-registry-get-id-key "gnus-registry" (id key)) | 980 | (declare-function gnus-registry-get-id-key "gnus-registry" (id key)) |
| 971 | 981 | ||