aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/gnus/nnimap.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/nnimap.el')
-rw-r--r--lisp/gnus/nnimap.el65
1 files changed, 33 insertions, 32 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index e619c0f13c2..e7f91b7cc33 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -820,39 +820,40 @@ textual parts.")
820 group)) 820 group))
821 t)))) 821 t))))
822 822
823(deffoo nnimap-request-scan-group (group &optional server info) 823(deffoo nnimap-request-group-scan (group &optional server info)
824 (setq group (nnimap-decode-gnus-group group)) 824 (setq group (nnimap-decode-gnus-group group))
825 (let (marks high low) 825 (when (nnimap-change-group nil server)
826 (with-current-buffer (nnimap-buffer) 826 (let (marks high low)
827 (erase-buffer) 827 (with-current-buffer (nnimap-buffer)
828 (let ((group-sequence 828 (erase-buffer)
829 (nnimap-send-command "SELECT %S" (utf7-encode group t))) 829 (let ((group-sequence
830 (flag-sequence 830 (nnimap-send-command "SELECT %S" (utf7-encode group t)))
831 (nnimap-send-command "UID FETCH 1:* FLAGS"))) 831 (flag-sequence
832 (setf (nnimap-group nnimap-object) group) 832 (nnimap-send-command "UID FETCH 1:* FLAGS")))
833 (nnimap-wait-for-response flag-sequence) 833 (setf (nnimap-group nnimap-object) group)
834 (setq marks 834 (nnimap-wait-for-response flag-sequence)
835 (nnimap-flags-to-marks 835 (setq marks
836 (nnimap-parse-flags 836 (nnimap-flags-to-marks
837 (list (list group-sequence flag-sequence 837 (nnimap-parse-flags
838 1 group "SELECT"))))) 838 (list (list group-sequence flag-sequence
839 (when (and info 839 1 group "SELECT")))))
840 marks) 840 (when (and info
841 (nnimap-update-infos marks (list info)) 841 marks)
842 (nnimap-store-info info (gnus-active (gnus-info-group info)))) 842 (nnimap-update-infos marks (list info))
843 (goto-char (point-max)) 843 (nnimap-store-info info (gnus-active (gnus-info-group info))))
844 (let ((uidnext (nth 5 (car marks)))) 844 (goto-char (point-max))
845 (setq high (or (if uidnext 845 (let ((uidnext (nth 5 (car marks))))
846 (1- uidnext) 846 (setq high (or (if uidnext
847 (nth 3 (car marks))) 847 (1- uidnext)
848 0) 848 (nth 3 (car marks)))
849 low (or (nth 4 (car marks)) uidnext 1))))) 849 0)
850 (with-current-buffer nntp-server-buffer 850 low (or (nth 4 (car marks)) uidnext 1)))))
851 (erase-buffer) 851 (with-current-buffer nntp-server-buffer
852 (insert 852 (erase-buffer)
853 (format 853 (insert
854 "211 %d %d %d %S\n" (1+ (- high low)) low high group)) 854 (format
855 t))) 855 "211 %d %d %d %S\n" (1+ (- high low)) low high group))
856 t))))
856 857
857(deffoo nnimap-request-create-group (group &optional server args) 858(deffoo nnimap-request-create-group (group &optional server args)
858 (setq group (nnimap-decode-gnus-group group)) 859 (setq group (nnimap-decode-gnus-group group))