Mercurial > emacs
comparison lisp/gnus/nnimap.el @ 111986:faa4a1c986c6
Merge changes made in Gnus trunk.
nnimap.el (nnimap-wait-for-response): Always look (at least) at the previous line.
nnimap.el (nnimap-quirk): New function.
(nnimap-retrieve-group-data-early): Use it.
(nnimap-quirks): New alist.
gnus.texi (Foreign Groups): Added clarification of foreign groups.
gnus-sum.el (gnus-summary-push-marks-to-backend): Fix the logic for copying read-ness to the backends.
gnus-group.el (gnus-group-kill-group): Notify the backend that the group has been killed.
(gnus-group-yank-group): Ditto.
gnus-start.el (gnus-subscribe-newsgroup): Notify the backend.
nnir.el: Improve customizations.
gnus.texi (Archived Messages): Removed outdated comment and text.
nnfolder.el (nnfolder-save-all-buffers): Refactor out into its own function.
(nnfolder-request-expire-articles): Save all the buffers after doing expiry.
nnmail.el (nnmail-expiry-target-group): Revert the "all articles are the last article", since that led to serious performance regressions when expiring nnml groups.
gnus-html.el (gnus-html-schedule-image-fetching): Make sure the HTML fetching stops when Gnus exits.
gnus-srvr.el: Avoid passing nil regexp argument to delete-matching-lines.
auth-source.el (auth-source-gpg-encrypt-to): New variable to set the list of recipient keys, or use symmetric encryption if not a list.
(auth-source-create): Use it to make `epa-file-encrypt-to' local for an EPA override, replacing the call to `netrc-store-data'.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 16 Dec 2010 22:22:28 +0000 |
parents | 3b8b4f28c758 |
children | edfb54ff984c |
comparison
equal
deleted
inserted
replaced
111979:b8b55da43e95 | 111986:faa4a1c986c6 |
---|---|
136 (dormant "gnus-dormant") | 136 (dormant "gnus-dormant") |
137 (score "gnus-score") | 137 (score "gnus-score") |
138 (save "gnus-save") | 138 (save "gnus-save") |
139 (download "gnus-download") | 139 (download "gnus-download") |
140 (forward "gnus-forward"))) | 140 (forward "gnus-forward"))) |
141 | |
142 (defvar nnimap-quirks | |
143 '(("QRESYNC" "Zimbra" "QRESYNC "))) | |
141 | 144 |
142 (defun nnimap-buffer () | 145 (defun nnimap-buffer () |
143 (nnimap-find-process-buffer nntp-server-buffer)) | 146 (nnimap-find-process-buffer nntp-server-buffer)) |
144 | 147 |
145 (defun nnimap-header-parameters () | 148 (defun nnimap-header-parameters () |
895 (dolist (mark marks) | 898 (dolist (mark marks) |
896 (when (setq flag (cadr (assq mark nnimap-mark-alist))) | 899 (when (setq flag (cadr (assq mark nnimap-mark-alist))) |
897 (push flag flags))) | 900 (push flag flags))) |
898 flags)) | 901 flags)) |
899 | 902 |
903 (deffoo nnimap-request-update-group-status (group status &optional server) | |
904 (when (nnimap-possibly-change-group nil server) | |
905 (let ((command (assoc | |
906 status | |
907 '((subscribe "SUBSCRIBE") | |
908 (unsubscribe "UNSUBSCRIBE"))))) | |
909 (when command | |
910 (with-current-buffer (nnimap-buffer) | |
911 (nnimap-command "%s %S" (cadr command) (utf7-encode group t))))))) | |
912 | |
900 (deffoo nnimap-request-set-mark (group actions &optional server) | 913 (deffoo nnimap-request-set-mark (group actions &optional server) |
901 (when (nnimap-possibly-change-group group server) | 914 (when (nnimap-possibly-change-group group server) |
902 (let (sequence) | 915 (let (sequence) |
903 (with-current-buffer (nnimap-buffer) | 916 (with-current-buffer (nnimap-buffer) |
904 (erase-buffer) | 917 (erase-buffer) |
1078 (setf (nnimap-examined nnimap-object) group) | 1091 (setf (nnimap-examined nnimap-object) group) |
1079 (if (and qresyncp | 1092 (if (and qresyncp |
1080 uidvalidity | 1093 uidvalidity |
1081 modseq) | 1094 modseq) |
1082 (push | 1095 (push |
1083 (list (nnimap-send-command "EXAMINE %S (QRESYNC (%s %s))" | 1096 (list (nnimap-send-command "EXAMINE %S (%s (%s %s))" |
1084 (utf7-encode group t) | 1097 (utf7-encode group t) |
1098 (nnimap-quirk "QRESYNC") | |
1085 uidvalidity modseq) | 1099 uidvalidity modseq) |
1086 'qresync | 1100 'qresync |
1087 nil group 'qresync) | 1101 nil group 'qresync) |
1088 sequences) | 1102 sequences) |
1089 (let ((start | 1103 (let ((start |
1104 (utf7-encode group t)) | 1118 (utf7-encode group t)) |
1105 (nnimap-send-command "UID FETCH %d:* FLAGS" start) | 1119 (nnimap-send-command "UID FETCH %d:* FLAGS" start) |
1106 start group command) | 1120 start group command) |
1107 sequences)))) | 1121 sequences)))) |
1108 sequences)))) | 1122 sequences)))) |
1123 | |
1124 (defun nnimap-quirk (command) | |
1125 (let ((quirk (assoc command nnimap-quirks))) | |
1126 ;; If this server is of a type that matches a quirk, then return | |
1127 ;; the "quirked" command instead of the proper one. | |
1128 (if (or (null quirk) | |
1129 (not (string-match (nth 1 quirk) (nnimap-greeting nnimap-object)))) | |
1130 command | |
1131 (nth 2 quirk)))) | |
1109 | 1132 |
1110 (deffoo nnimap-finish-retrieve-group-infos (server infos sequences) | 1133 (deffoo nnimap-finish-retrieve-group-infos (server infos sequences) |
1111 (when (and sequences | 1134 (when (and sequences |
1112 (nnimap-possibly-change-group nil server)) | 1135 (nnimap-possibly-change-group nil server)) |
1113 (with-current-buffer (nnimap-buffer) | 1136 (with-current-buffer (nnimap-buffer) |
1539 (while (and (setq openp (memq (process-status process) | 1562 (while (and (setq openp (memq (process-status process) |
1540 '(open run))) | 1563 '(open run))) |
1541 (not (re-search-backward | 1564 (not (re-search-backward |
1542 (format "^%d .*\n" sequence) | 1565 (format "^%d .*\n" sequence) |
1543 (if nnimap-streaming | 1566 (if nnimap-streaming |
1544 (max (point-min) (- (point) 500)) | 1567 (max (point-min) |
1568 (- (point) 500) | |
1569 (save-excursion | |
1570 (forward-line -1) | |
1571 (point))) | |
1545 (point-min)) | 1572 (point-min)) |
1546 t))) | 1573 t))) |
1547 (when messagep | 1574 (when messagep |
1548 (nnheader-message 7 "nnimap read %dk" (/ (buffer-size) 1000))) | 1575 (nnheader-message 7 "nnimap read %dk" (/ (buffer-size) 1000))) |
1549 (nnheader-accept-process-output process) | 1576 (nnheader-accept-process-output process) |