aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2015-02-05 04:02:46 +0000
committerKatsumi Yamaoka2015-02-05 04:02:46 +0000
commitf518a387c952f8b0d70cfec4087ce0b14f79fd27 (patch)
tree7b47f62a55fb4f1f3537363b4e534421b96cb48a
parent2c6d035968e865d70512086c310f0584b1d6eadc (diff)
downloademacs-f518a387c952f8b0d70cfec4087ce0b14f79fd27.tar.gz
emacs-f518a387c952f8b0d70cfec4087ce0b14f79fd27.zip
lisp/gnus/nnimap.el (nnimap-request-group-scan): Further `M-g' group fixes
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/nnimap.el63
2 files changed, 37 insertions, 31 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 0de7af4128d..bd34bebf51a 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12015-02-05 Lars Ingebrigtsen <larsi@gnus.org>
2
3 * nnimap.el (nnimap-request-group-scan): Ensure that we've selected the
4 correct server.
5
12015-02-05 Vincent Bernat <bernat@luffy.cx> (tiny change) 62015-02-05 Vincent Bernat <bernat@luffy.cx> (tiny change)
2 7
3 * nnimap.el (nnimap-request-group-scan): Fix the function name. 8 * nnimap.el (nnimap-request-group-scan): Fix the function name.
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index cdbc2a68709..e7f91b7cc33 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -822,37 +822,38 @@ textual parts.")
822 822
823(deffoo nnimap-request-group-scan (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))