mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Merge changes made in Gnus trunk.
gnus.texi (Window Layout): @itemize @code doesn't exist. It's @table @code. gnus-registry.el (gnus-registry--split-fancy-with-parent-internal): Fix logic bug. (gnus-registry-post-process-groups): Fix logging of no results and quote sender and subject. network-stream.el (network-stream-open-starttls): Only do opportunistic STARTTLS upgrades if we have built-in gnutls support. Upgrades via gnutls-cli are too slow to be done opportunistically. gnus-start.el (gnus-get-unread-articles): Slight cleanup. (gnus-read-active-for-groups): Don't try to finish getting stuff where we had no early-data returned. (gnus-get-unread-articles): Add a sanity check so that we don't issue two async commands to the same server at the same time. gnus-sum.el (gnus-summary-select-article-buffer): Doc fix. gnus-registry.el (gnus-registry-remake-db): Put the warning on a "warning" level.
This commit is contained in:
parent
2d6af8ddfe
commit
1e3b60017a
8 changed files with 80 additions and 34 deletions
|
|
@ -1699,33 +1699,43 @@ If SCAN, request a scan of that group as well."
|
|||
(gnus-read-active-file-1 method nil))))
|
||||
|
||||
;; Start early async retrieval of data.
|
||||
(dolist (elem type-cache)
|
||||
(destructuring-bind (method method-type infos dummy) elem
|
||||
(when (and method infos
|
||||
(not (gnus-method-denied-p method)))
|
||||
;; If the open-server method doesn't exist, then the method
|
||||
;; itself doesn't exist, so we ignore it.
|
||||
(if (not (ignore-errors (gnus-get-function method 'open-server)))
|
||||
(setq type-cache (delq elem type-cache))
|
||||
(unless (gnus-server-opened method)
|
||||
(gnus-open-server method))
|
||||
(when (and
|
||||
(gnus-server-opened method)
|
||||
(gnus-check-backend-function
|
||||
'retrieve-group-data-early (car method)))
|
||||
(when (gnus-check-backend-function 'request-scan (car method))
|
||||
(gnus-request-scan nil method))
|
||||
;; Store the token we get back from -early so that we
|
||||
;; can pass it to -finish later.
|
||||
(setcar (nthcdr 3 elem)
|
||||
(gnus-retrieve-group-data-early method infos)))))))
|
||||
(let ((done-methods nil)
|
||||
sanity-spec)
|
||||
(dolist (elem type-cache)
|
||||
(destructuring-bind (method method-type infos dummy) elem
|
||||
(setq sanity-spec (list (car method) (cadr method)))
|
||||
(when (and method infos
|
||||
(not (gnus-method-denied-p method)))
|
||||
;; If the open-server method doesn't exist, then the method
|
||||
;; itself doesn't exist, so we ignore it.
|
||||
(if (not (ignore-errors (gnus-get-function method 'open-server)))
|
||||
(setq type-cache (delq elem type-cache))
|
||||
(unless (gnus-server-opened method)
|
||||
(gnus-open-server method))
|
||||
(when (and
|
||||
;; This is a sanity check, so that we never
|
||||
;; attempt to start two async requests to the
|
||||
;; same server, because that will fail. This
|
||||
;; should never happen, since the methods should
|
||||
;; be unique at this point, but apparently it
|
||||
;; does happen in the wild with some setups.
|
||||
(not (member sanity-spec done-methods))
|
||||
(gnus-server-opened method)
|
||||
(gnus-check-backend-function
|
||||
'retrieve-group-data-early (car method)))
|
||||
(push sanity-spec done-methods)
|
||||
(when (gnus-check-backend-function 'request-scan (car method))
|
||||
(gnus-request-scan nil method))
|
||||
;; Store the token we get back from -early so that we
|
||||
;; can pass it to -finish later.
|
||||
(setcar (nthcdr 3 elem)
|
||||
(gnus-retrieve-group-data-early method infos))))))))
|
||||
|
||||
;; Do the rest of the retrieval.
|
||||
(dolist (elem type-cache)
|
||||
(destructuring-bind (method method-type infos early-data) elem
|
||||
(when (and method infos
|
||||
(not (eq (gnus-server-status method)
|
||||
'denied)))
|
||||
(not (gnus-method-denied-p method)))
|
||||
(let ((updatep (gnus-check-backend-function
|
||||
'request-update-info (car method))))
|
||||
;; See if any of the groups from this method require updating.
|
||||
|
|
@ -1763,6 +1773,7 @@ If SCAN, request a scan of that group as well."
|
|||
;; Finish up getting the data from the methods that have -early
|
||||
;; methods.
|
||||
((and
|
||||
early-data
|
||||
(gnus-check-backend-function 'finish-retrieve-group-infos (car method))
|
||||
(or (not (gnus-agent-method-p method))
|
||||
(gnus-online method)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue