diff options
| author | Gnus developers | 2010-09-23 23:14:02 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-09-23 23:14:02 +0000 |
| commit | b1ae92bae4c387155db45c297b7f78e4467d8ac4 (patch) | |
| tree | 45499c2dce3629f29636cc195f68163476d5848a | |
| parent | faf8b5bc19513bc7612103648a98a37629607f2e (diff) | |
| download | emacs-b1ae92bae4c387155db45c297b7f78e4467d8ac4.tar.gz emacs-b1ae92bae4c387155db45c297b7f78e4467d8ac4.zip | |
Merge changes made in Gnus trunk.
nnimap.el (nnimap-update-info): When UIDNEXT is present, use that for the active.
Split -request-update-info into -request-marks and -update-info.
nnimap.el (nnimap-transform-headers): Don't bug out on invalid BODYSTRUCTUREs.
nnimap.el (nnimap-transform-headers): Unfold quoted {42} headers.
nnir.el (nnir-run-imap): Fix up nnir to work with the new nnimap.
nnimap.el (nnimap-stream): Add starttls support.
gnus-int.el (gnus-request-update-info): Protect against backends not having the function.
gnus-html.el (gnus-html-rescale-image): Revert change that uses window-inside-pixel-edges.
gnus-start.el (gnus-fixup-nnimap-unread-after-getting-new-news): Remove.
nnimap.el (nnimap-retrieve-headers): Return 'headers.
gnus-sum.el (gnus-summary-local-variables): Prepare for list/range makeover.
gnus-start.el: Add new variable gnus-use-backend-marks, and start reading marks again.
| -rw-r--r-- | doc/misc/gnus.texi | 6 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 71 | ||||
| -rw-r--r-- | lisp/gnus/gnus-html.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-int.el | 13 | ||||
| -rw-r--r-- | lisp/gnus/gnus-start.el | 47 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 36 | ||||
| -rw-r--r-- | lisp/gnus/nnfolder.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 45 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 34 | ||||
| -rw-r--r-- | lisp/gnus/nnmaildir.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnmairix.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnml.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nntp.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnweb.el | 3 |
14 files changed, 182 insertions, 85 deletions
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 3085b338e97..39137996f85 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -1646,6 +1646,12 @@ If non-@code{nil}, play the Gnus jingle at startup. | |||
| 1646 | Jingle to be played if the above variable is non-@code{nil}. The | 1646 | Jingle to be played if the above variable is non-@code{nil}. The |
| 1647 | default is @samp{Tuxedomoon.Jingle4.au}. | 1647 | default is @samp{Tuxedomoon.Jingle4.au}. |
| 1648 | 1648 | ||
| 1649 | @item gnus-use-backend-marks | ||
| 1650 | @vindex gnus-use-backend-marks | ||
| 1651 | If non-@code{nil}, Gnus will store article marks both in the | ||
| 1652 | @file{.newsrc.eld} file and in the backends. This will slow down | ||
| 1653 | group operation some. | ||
| 1654 | |||
| 1649 | @end table | 1655 | @end table |
| 1650 | 1656 | ||
| 1651 | 1657 | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 3ca70cabe50..b60c5dffb8e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,63 @@ | |||
| 1 | 2010-09-23 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2010-09-23 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * gnus-start.el (gnus-use-backend-marks): New variable. | ||
| 4 | (gnus-get-unread-articles-in-group): Use it. | ||
| 5 | |||
| 6 | * gnus-sum.el (gnus-summary-local-variables): Prepare for list/range | ||
| 7 | makeover. | ||
| 8 | |||
| 9 | 2010-09-23 Andrew Cohen <cohen@andy.bu.edu> | ||
| 10 | |||
| 11 | * nnimap.el (nnimap-retrieve-headers): Return 'headers. | ||
| 12 | |||
| 13 | 2010-09-23 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 14 | |||
| 15 | * gnus-start.el (gnus-fixup-nnimap-unread-after-getting-new-news): | ||
| 16 | Removed. | ||
| 17 | (gnus-setup-news-hook): Removed | ||
| 18 | gnus-fixup-nnimap-unread-after-getting-new-news. | ||
| 19 | |||
| 20 | * gnus-int.el (gnus-request-update-info): Protect against backends not | ||
| 21 | having the function. | ||
| 22 | |||
| 23 | * nnimap.el (nnimap-stream): Mention starttls. | ||
| 24 | (nnimap-open-connection): Add starttls support. | ||
| 25 | |||
| 26 | 2010-09-23 Andrew Cohen <cohen@andy.bu.edu> | ||
| 27 | |||
| 28 | * nnir.el (nnir-run-imap): Fix up nnir to work with the new nnimap. | ||
| 29 | |||
| 30 | 2010-09-23 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 31 | |||
| 32 | * nnimap.el (nnimap-transform-headers): Don't bug out on invalid | ||
| 33 | BODYSTRUCTUREs. | ||
| 34 | (nnimap-transform-headers): Unfold quoted {42} headers. | ||
| 35 | |||
| 36 | * gnus-start.el (gnus-get-unread-articles): Allow backends to update | ||
| 37 | the info. | ||
| 38 | (gnus-get-unread-articles): Only call updatep on backends that support | ||
| 39 | it. | ||
| 40 | |||
| 41 | * nnweb.el (nnweb-request-update-info): NOOP. | ||
| 42 | |||
| 43 | * nnmaildir.el (nnmaildir-request-marks): Renamed from -update-info. | ||
| 44 | |||
| 45 | * nnfolder.el (nnfolder-request-marks): Renamed from -update-info, | ||
| 46 | since it only deals with marks. | ||
| 47 | |||
| 48 | * gnus-int.el (gnus-request-marks): Renamed gnus-request-update-info to | ||
| 49 | gnus-request-marks, and make a new gnus-request-update-info. | ||
| 50 | |||
| 51 | * nnimap.el (nnimap-update-info): When UIDNEXT is present, use that for | ||
| 52 | the active instead of the high number, which is usually too low. | ||
| 53 | |||
| 54 | 2010-09-23 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 55 | |||
| 56 | * netrc.el (netrc-parse): Remove encrypt.el mentions. | ||
| 57 | * encrypt.el: Removed. | ||
| 58 | |||
| 59 | 2010-09-23 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 60 | |||
| 3 | * nnimap.el (nnimap-update-info): Sync non-standard flags from the | 61 | * nnimap.el (nnimap-update-info): Sync non-standard flags from the |
| 4 | server in symbolic form. | 62 | server in symbolic form. |
| 5 | 63 | ||
| @@ -22,11 +80,6 @@ | |||
| 22 | `gnus-get-unread-articles-in-group' update info, since that can be | 80 | `gnus-get-unread-articles-in-group' update info, since that can be |
| 23 | really slow and doesn't seem to be needed? | 81 | really slow and doesn't seem to be needed? |
| 24 | 82 | ||
| 25 | 2010-09-22 Dan Christensen <jdc@uwo.ca> | ||
| 26 | |||
| 27 | * time-date.el (date-to-time): Try using parse-time-string first before | ||
| 28 | using the slower timezone-make-date-arpa-standard. | ||
| 29 | |||
| 30 | 2010-09-22 Julien Danjou <julien@danjou.info> | 83 | 2010-09-22 Julien Danjou <julien@danjou.info> |
| 31 | 84 | ||
| 32 | * gnus-group.el (gnus-group-insert-group-line): Call | 85 | * gnus-group.el (gnus-group-insert-group-line): Call |
| @@ -84,11 +137,9 @@ | |||
| 84 | 137 | ||
| 85 | 2010-09-22 Julien Danjou <julien@danjou.info> | 138 | 2010-09-22 Julien Danjou <julien@danjou.info> |
| 86 | 139 | ||
| 87 | * gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges | 140 | * gnus-html.el (gnus-html-put-image): Stop using markers. They are |
| 88 | rather than window-pixel-edges. | 141 | harmful if you have 2 images side-by-side, they can't be properly |
| 89 | (gnus-html-put-image): Stop using markers. They are harmful if you have | 142 | update on text deletion. Using text-property is safer here. |
| 90 | 2 images side-by-side, they can't be properly update on text deletion. | ||
| 91 | Using text-property is safer here. | ||
| 92 | (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of | 143 | (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of |
| 93 | data. | 144 | data. |
| 94 | 145 | ||
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 8acd6f8679c..a693a2b842d 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el | |||
| @@ -432,7 +432,7 @@ Return a string with image data." | |||
| 432 | image | 432 | image |
| 433 | (let* ((width (car size)) | 433 | (let* ((width (car size)) |
| 434 | (height (cdr size)) | 434 | (height (cdr size)) |
| 435 | (edges (window-inside-pixel-edges (get-buffer-window (current-buffer)))) | 435 | (edges (window-pixel-edges (get-buffer-window (current-buffer)))) |
| 436 | (window-width (truncate (* gnus-max-image-proportion | 436 | (window-width (truncate (* gnus-max-image-proportion |
| 437 | (- (nth 2 edges) (nth 0 edges))))) | 437 | (- (nth 2 edges) (nth 0 edges))))) |
| 438 | (window-height (truncate (* gnus-max-image-proportion | 438 | (window-height (truncate (* gnus-max-image-proportion |
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index df7f979d538..395f47daf35 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el | |||
| @@ -584,12 +584,21 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned." | |||
| 584 | (and group (gnus-group-real-name group)) | 584 | (and group (gnus-group-real-name group)) |
| 585 | (nth 1 gnus-command-method))))) | 585 | (nth 1 gnus-command-method))))) |
| 586 | 586 | ||
| 587 | (defsubst gnus-request-update-info (info gnus-command-method) | 587 | (defun gnus-request-update-info (info gnus-command-method) |
| 588 | (when (gnus-check-backend-function | ||
| 589 | 'request-update-info (car gnus-command-method)) | ||
| 590 | (when (stringp gnus-command-method) | ||
| 591 | (setq gnus-command-method (gnus-server-to-method gnus-command-method))) | ||
| 592 | (funcall (gnus-get-function gnus-command-method 'request-update-info) | ||
| 593 | (gnus-group-real-name (gnus-info-group info)) info | ||
| 594 | (nth 1 gnus-command-method)))) | ||
| 595 | |||
| 596 | (defsubst gnus-request-marks (info gnus-command-method) | ||
| 588 | "Request that GNUS-COMMAND-METHOD update INFO." | 597 | "Request that GNUS-COMMAND-METHOD update INFO." |
| 589 | (when (stringp gnus-command-method) | 598 | (when (stringp gnus-command-method) |
| 590 | (setq gnus-command-method (gnus-server-to-method gnus-command-method))) | 599 | (setq gnus-command-method (gnus-server-to-method gnus-command-method))) |
| 591 | (when (gnus-check-backend-function | 600 | (when (gnus-check-backend-function |
| 592 | 'request-update-info (car gnus-command-method)) | 601 | 'request-marks (car gnus-command-method)) |
| 593 | (let ((group (gnus-info-group info))) | 602 | (let ((group (gnus-info-group info))) |
| 594 | (and (funcall (gnus-get-function gnus-command-method | 603 | (and (funcall (gnus-get-function gnus-command-method |
| 595 | 'request-update-info) | 604 | 'request-update-info) |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 77ce8ee6324..d5880e81a78 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -380,6 +380,13 @@ disc." | |||
| 380 | :group 'gnus-newsrc | 380 | :group 'gnus-newsrc |
| 381 | :type 'boolean) | 381 | :type 'boolean) |
| 382 | 382 | ||
| 383 | (defcustom gnus-use-backend-marks nil | ||
| 384 | "If non-nil, Gnus will store and retrieve marks from the backends. | ||
| 385 | This means that marks will be stored both in .newsrc.eld and in | ||
| 386 | the backend, and will slow operation down somewhat." | ||
| 387 | :group 'gnus-newsrc | ||
| 388 | :type 'boolean) | ||
| 389 | |||
| 383 | (defcustom gnus-check-bogus-groups-hook nil | 390 | (defcustom gnus-check-bogus-groups-hook nil |
| 384 | "A hook run after removing bogus groups." | 391 | "A hook run after removing bogus groups." |
| 385 | :group 'gnus-start-server | 392 | :group 'gnus-start-server |
| @@ -402,8 +409,7 @@ This hook is called as the first thing when Gnus is started." | |||
| 402 | :group 'gnus-start | 409 | :group 'gnus-start |
| 403 | :type 'hook) | 410 | :type 'hook) |
| 404 | 411 | ||
| 405 | (defcustom gnus-setup-news-hook | 412 | (defcustom gnus-setup-news-hook nil |
| 406 | '(gnus-fixup-nnimap-unread-after-getting-new-news) | ||
| 407 | "A hook after reading the .newsrc file, but before generating the buffer." | 413 | "A hook after reading the .newsrc file, but before generating the buffer." |
| 408 | :group 'gnus-start | 414 | :group 'gnus-start |
| 409 | :type 'hook) | 415 | :type 'hook) |
| @@ -420,8 +426,7 @@ This hook is called as the first thing when Gnus is started." | |||
| 420 | :type 'hook) | 426 | :type 'hook) |
| 421 | 427 | ||
| 422 | (defcustom gnus-after-getting-new-news-hook | 428 | (defcustom gnus-after-getting-new-news-hook |
| 423 | '(gnus-display-time-event-handler | 429 | '(gnus-display-time-event-handler) |
| 424 | gnus-fixup-nnimap-unread-after-getting-new-news) | ||
| 425 | "*A hook run after Gnus checks for new news when Gnus is already running." | 430 | "*A hook run after Gnus checks for new news when Gnus is already running." |
| 426 | :group 'gnus-group-new | 431 | :group 'gnus-group-new |
| 427 | :type 'hook) | 432 | :type 'hook) |
| @@ -1580,6 +1585,13 @@ If SCAN, request a scan of that group as well." | |||
| 1580 | (gnus-info-group info))))) | 1585 | (gnus-info-group info))))) |
| 1581 | (gnus-activate-group (gnus-info-group info) nil t)) | 1586 | (gnus-activate-group (gnus-info-group info) nil t)) |
| 1582 | 1587 | ||
| 1588 | ;; Allow backends to update marks, | ||
| 1589 | (when gnus-use-backend-marks | ||
| 1590 | (let ((method (inline (gnus-find-method-for-group | ||
| 1591 | (gnus-info-group info))))) | ||
| 1592 | (when (gnus-check-backend-function 'request-marks (car method)) | ||
| 1593 | (gnus-request-marks info method)))) | ||
| 1594 | |||
| 1583 | (let* ((range (gnus-info-read info)) | 1595 | (let* ((range (gnus-info-read info)) |
| 1584 | (num 0)) | 1596 | (num 0)) |
| 1585 | 1597 | ||
| @@ -1765,11 +1777,14 @@ If SCAN, request a scan of that group as well." | |||
| 1765 | (dolist (elem type-cache) | 1777 | (dolist (elem type-cache) |
| 1766 | (destructuring-bind (method method-type infos early-data) elem | 1778 | (destructuring-bind (method method-type infos early-data) elem |
| 1767 | (when (and method infos) | 1779 | (when (and method infos) |
| 1768 | ;; See if any of the groups from this method require updating. | 1780 | (let ((updatep (gnus-check-backend-function |
| 1769 | (gnus-read-active-for-groups method infos early-data) | 1781 | 'request-update-info (car method)))) |
| 1770 | (dolist (info infos) | 1782 | ;; See if any of the groups from this method require updating. |
| 1771 | (inline (gnus-get-unread-articles-in-group | 1783 | (gnus-read-active-for-groups method infos early-data) |
| 1772 | info (gnus-active (gnus-info-group info)))))))) | 1784 | (dolist (info infos) |
| 1785 | (inline (gnus-get-unread-articles-in-group | ||
| 1786 | info (gnus-active (gnus-info-group info)) | ||
| 1787 | updatep))))))) | ||
| 1773 | (gnus-message 6 "Checking new news...done"))) | 1788 | (gnus-message 6 "Checking new news...done"))) |
| 1774 | 1789 | ||
| 1775 | (defun gnus-method-rank (type method) | 1790 | (defun gnus-method-rank (type method) |
| @@ -3145,20 +3160,6 @@ If this variable is nil, don't do anything." | |||
| 3145 | (gnus-boundp 'display-time-timer)) | 3160 | (gnus-boundp 'display-time-timer)) |
| 3146 | (display-time-event-handler))) | 3161 | (display-time-event-handler))) |
| 3147 | 3162 | ||
| 3148 | ;;;###autoload | ||
| 3149 | (defun gnus-fixup-nnimap-unread-after-getting-new-news () | ||
| 3150 | (let (server group info) | ||
| 3151 | (mapatoms | ||
| 3152 | (lambda (sym) | ||
| 3153 | (when (and (setq group (symbol-name sym)) | ||
| 3154 | (gnus-group-entry group) | ||
| 3155 | (setq info (symbol-value sym))) | ||
| 3156 | (gnus-sethash group (cons (nth 2 info) (cdr (gnus-group-entry group))) | ||
| 3157 | gnus-newsrc-hashtb))) | ||
| 3158 | (if (boundp 'nnimap-mailbox-info) | ||
| 3159 | (symbol-value 'nnimap-mailbox-info) | ||
| 3160 | (make-vector 1 0))))) | ||
| 3161 | |||
| 3162 | (defun gnus-check-reasonable-setup () | 3163 | (defun gnus-check-reasonable-setup () |
| 3163 | ;; Check whether nnml and nnfolder share a directory. | 3164 | ;; Check whether nnml and nnfolder share a directory. |
| 3164 | (let ((display-warn | 3165 | (let ((display-warn |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index c4a721691f9..622665d519e 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -1539,22 +1539,34 @@ This list will always be a subset of gnus-newsgroup-undownloaded.") | |||
| 1539 | 1539 | ||
| 1540 | (defvar gnus-summary-local-variables | 1540 | (defvar gnus-summary-local-variables |
| 1541 | '(gnus-newsgroup-name | 1541 | '(gnus-newsgroup-name |
| 1542 | |||
| 1543 | ;; Marks lists | ||
| 1544 | gnus-newsgroup-unreads | ||
| 1545 | gnus-newsgroup-unselected | ||
| 1546 | gnus-newsgroup-marked | ||
| 1547 | gnus-newsgroup-spam-marked | ||
| 1548 | gnus-newsgroup-reads | ||
| 1549 | gnus-newsgroup-saved | ||
| 1550 | gnus-newsgroup-replied | ||
| 1551 | gnus-newsgroup-forwarded | ||
| 1552 | gnus-newsgroup-recent | ||
| 1553 | gnus-newsgroup-expirable | ||
| 1554 | gnus-newsgroup-killed | ||
| 1555 | gnus-newsgroup-unseen | ||
| 1556 | gnus-newsgroup-seen | ||
| 1557 | gnus-newsgroup-cached | ||
| 1558 | gnus-newsgroup-downloadable | ||
| 1559 | gnus-newsgroup-undownloaded | ||
| 1560 | gnus-newsgroup-unsendable | ||
| 1561 | |||
| 1542 | gnus-newsgroup-begin gnus-newsgroup-end | 1562 | gnus-newsgroup-begin gnus-newsgroup-end |
| 1543 | gnus-newsgroup-last-rmail gnus-newsgroup-last-mail | 1563 | gnus-newsgroup-last-rmail gnus-newsgroup-last-mail |
| 1544 | gnus-newsgroup-last-folder gnus-newsgroup-last-file | 1564 | gnus-newsgroup-last-folder gnus-newsgroup-last-file |
| 1545 | gnus-newsgroup-last-directory | 1565 | gnus-newsgroup-last-directory |
| 1546 | gnus-newsgroup-auto-expire gnus-newsgroup-unreads | 1566 | gnus-newsgroup-auto-expire |
| 1547 | gnus-newsgroup-unselected gnus-newsgroup-marked | 1567 | gnus-newsgroup-processable |
| 1548 | gnus-newsgroup-spam-marked | ||
| 1549 | gnus-newsgroup-reads gnus-newsgroup-saved | ||
| 1550 | gnus-newsgroup-replied gnus-newsgroup-forwarded | ||
| 1551 | gnus-newsgroup-recent | ||
| 1552 | gnus-newsgroup-expirable | ||
| 1553 | gnus-newsgroup-processable gnus-newsgroup-killed | ||
| 1554 | gnus-newsgroup-downloadable gnus-newsgroup-undownloaded | ||
| 1555 | gnus-newsgroup-unfetched | 1568 | gnus-newsgroup-unfetched |
| 1556 | gnus-newsgroup-unsendable gnus-newsgroup-unseen | 1569 | gnus-newsgroup-articles |
| 1557 | gnus-newsgroup-seen gnus-newsgroup-articles | ||
| 1558 | gnus-newsgroup-bookmarks gnus-newsgroup-dormant | 1570 | gnus-newsgroup-bookmarks gnus-newsgroup-dormant |
| 1559 | gnus-newsgroup-headers gnus-newsgroup-threads | 1571 | gnus-newsgroup-headers gnus-newsgroup-threads |
| 1560 | gnus-newsgroup-prepared gnus-summary-highlight-line-function | 1572 | gnus-newsgroup-prepared gnus-summary-highlight-line-function |
| @@ -1573,7 +1585,7 @@ This list will always be a subset of gnus-newsgroup-undownloaded.") | |||
| 1573 | (gnus-newsgroup-adaptive . gnus-use-adaptive-scoring) | 1585 | (gnus-newsgroup-adaptive . gnus-use-adaptive-scoring) |
| 1574 | gnus-newsgroup-adaptive-score-file (gnus-reffed-article-number . -1) | 1586 | gnus-newsgroup-adaptive-score-file (gnus-reffed-article-number . -1) |
| 1575 | (gnus-newsgroup-expunged-tally . 0) | 1587 | (gnus-newsgroup-expunged-tally . 0) |
| 1576 | gnus-cache-removable-articles gnus-newsgroup-cached | 1588 | gnus-cache-removable-articles |
| 1577 | gnus-newsgroup-data gnus-newsgroup-data-reverse | 1589 | gnus-newsgroup-data gnus-newsgroup-data-reverse |
| 1578 | gnus-newsgroup-limit gnus-newsgroup-limits | 1590 | gnus-newsgroup-limit gnus-newsgroup-limits |
| 1579 | gnus-newsgroup-charset gnus-newsgroup-display | 1591 | gnus-newsgroup-charset gnus-newsgroup-display |
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index 1e0a950c40e..c3d0d1cdb91 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el | |||
| @@ -1202,7 +1202,7 @@ This command does not work if you use short group names." | |||
| 1202 | (nnfolder-save-marks group server)) | 1202 | (nnfolder-save-marks group server)) |
| 1203 | nil) | 1203 | nil) |
| 1204 | 1204 | ||
| 1205 | (deffoo nnfolder-request-update-info (group info &optional server) | 1205 | (deffoo nnfolder-request-marks (group info &optional server) |
| 1206 | ;; Change servers. | 1206 | ;; Change servers. |
| 1207 | (when (and server | 1207 | (when (and server |
| 1208 | (not (nnfolder-server-opened server))) | 1208 | (not (nnfolder-server-opened server))) |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index fcf501d8dd0..2d4f0de87cd 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -51,7 +51,7 @@ it will default to `imap'.") | |||
| 51 | 51 | ||
| 52 | (defvoo nnimap-stream 'ssl | 52 | (defvoo nnimap-stream 'ssl |
| 53 | "How nnimap will talk to the IMAP server. | 53 | "How nnimap will talk to the IMAP server. |
| 54 | Values are `ssl', `network' or `shell'.") | 54 | Values are `ssl', `network', `starttls' or `shell'.") |
| 55 | 55 | ||
| 56 | (defvoo nnimap-shell-program (if (boundp 'imap-shell-program) | 56 | (defvoo nnimap-shell-program (if (boundp 'imap-shell-program) |
| 57 | (if (listp imap-shell-program) | 57 | (if (listp imap-shell-program) |
| @@ -135,19 +135,26 @@ not done by default on servers that doesn't support that command.") | |||
| 135 | (nnimap-transform-headers)) | 135 | (nnimap-transform-headers)) |
| 136 | (insert-buffer-substring | 136 | (insert-buffer-substring |
| 137 | (nnimap-find-process-buffer (current-buffer)))) | 137 | (nnimap-find-process-buffer (current-buffer)))) |
| 138 | t)) | 138 | 'headers)) |
| 139 | 139 | ||
| 140 | (defun nnimap-transform-headers () | 140 | (defun nnimap-transform-headers () |
| 141 | (goto-char (point-min)) | 141 | (goto-char (point-min)) |
| 142 | (let (article bytes lines size) | 142 | (let (article bytes lines size string) |
| 143 | (block nil | 143 | (block nil |
| 144 | (while (not (eobp)) | 144 | (while (not (eobp)) |
| 145 | (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)")) | 145 | (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)")) |
| 146 | (delete-region (point) (progn (forward-line 1) (point))) | 146 | (delete-region (point) (progn (forward-line 1) (point))) |
| 147 | (when (eobp) | 147 | (when (eobp) |
| 148 | (return))) | 148 | (return))) |
| 149 | (setq article (match-string 1) | 149 | (setq article (match-string 1)) |
| 150 | bytes (nnimap-get-length) | 150 | ;; Unfold quoted {number} strings. |
| 151 | (while (re-search-forward "[^]] {\\([0-9]+\\)}\r\n" | ||
| 152 | (1+ (line-end-position)) t) | ||
| 153 | (setq size (string-to-number (match-string 1))) | ||
| 154 | (delete-region (+ (match-beginning 0) 2) (point)) | ||
| 155 | (setq string (delete-region (point) (+ (point) size))) | ||
| 156 | (insert (format "%S" string))) | ||
| 157 | (setq bytes (nnimap-get-length) | ||
| 151 | lines nil) | 158 | lines nil) |
| 152 | (beginning-of-line) | 159 | (beginning-of-line) |
| 153 | (setq size | 160 | (setq size |
| @@ -157,7 +164,8 @@ not done by default on servers that doesn't support that command.") | |||
| 157 | (match-string 1))) | 164 | (match-string 1))) |
| 158 | (beginning-of-line) | 165 | (beginning-of-line) |
| 159 | (when (search-forward "BODYSTRUCTURE" (line-end-position) t) | 166 | (when (search-forward "BODYSTRUCTURE" (line-end-position) t) |
| 160 | (let ((structure (ignore-errors (read (current-buffer))))) | 167 | (let ((structure (ignore-errors |
| 168 | (read (current-buffer))))) | ||
| 161 | (while (and (consp structure) | 169 | (while (and (consp structure) |
| 162 | (not (stringp (car structure)))) | 170 | (not (stringp (car structure)))) |
| 163 | (setq structure (car structure))) | 171 | (setq structure (car structure))) |
| @@ -257,6 +265,11 @@ not done by default on servers that doesn't support that command.") | |||
| 257 | "*nnimap*" (current-buffer) nnimap-address | 265 | "*nnimap*" (current-buffer) nnimap-address |
| 258 | (or nnimap-server-port "imap")) | 266 | (or nnimap-server-port "imap")) |
| 259 | '("imap")) | 267 | '("imap")) |
| 268 | ((eq nnimap-stream 'starttls) | ||
| 269 | (starttls-open-stream | ||
| 270 | "*nnimap*" (current-buffer) nnimap-address | ||
| 271 | (or nnimap-server-port "imap")) | ||
| 272 | '("imap")) | ||
| 260 | ((eq nnimap-stream 'ssl) | 273 | ((eq nnimap-stream 'ssl) |
| 261 | (open-tls-stream | 274 | (open-tls-stream |
| 262 | "*nnimap*" (current-buffer) nnimap-address | 275 | "*nnimap*" (current-buffer) nnimap-address |
| @@ -273,6 +286,9 @@ not done by default on servers that doesn't support that command.") | |||
| 273 | '(open run))) | 286 | '(open run))) |
| 274 | (gnus-set-process-query-on-exit-flag (nnimap-process nnimap-object) nil) | 287 | (gnus-set-process-query-on-exit-flag (nnimap-process nnimap-object) nil) |
| 275 | (when (setq connection-result (nnimap-wait-for-connection)) | 288 | (when (setq connection-result (nnimap-wait-for-connection)) |
| 289 | (when (eq nnimap-stream 'starttls) | ||
| 290 | (nnimap-send-command "STARTTLS") | ||
| 291 | (starttls-negotiate (nnimap-process nnimap-object))) | ||
| 276 | (unless (equal connection-result "PREAUTH") | 292 | (unless (equal connection-result "PREAUTH") |
| 277 | (if (not (setq credentials | 293 | (if (not (setq credentials |
| 278 | (if (eq nnimap-authenticator 'anonymous) | 294 | (if (eq nnimap-authenticator 'anonymous) |
| @@ -419,14 +435,11 @@ not done by default on servers that doesn't support that command.") | |||
| 419 | (when info | 435 | (when info |
| 420 | (nnimap-update-infos marks (list info))) | 436 | (nnimap-update-infos marks (list info))) |
| 421 | (goto-char (point-max)) | 437 | (goto-char (point-max)) |
| 422 | (cond | 438 | (let ((uidnext (nth 5 (car marks)))) |
| 423 | (marks | 439 | (setq high (if uidnext |
| 424 | (let ((uidnext (nth 5 (car marks)))) | 440 | (1- uidnext) |
| 425 | (setq high (or (nth 3 (car marks)) (1- uidnext)) | 441 | (nth 3 (car marks))) |
| 426 | low (or (nth 4 (car marks)) uidnext)))) | 442 | low (or (nth 4 (car marks)) uidnext))))) |
| 427 | ((re-search-backward "UIDNEXT \\([0-9]+\\)" nil t) | ||
| 428 | (setq high (1- (string-to-number (match-string 1))) | ||
| 429 | low 1))))) | ||
| 430 | (erase-buffer) | 443 | (erase-buffer) |
| 431 | (insert | 444 | (insert |
| 432 | (format | 445 | (format |
| @@ -782,11 +795,13 @@ not done by default on servers that doesn't support that command.") | |||
| 782 | (let ((group (gnus-info-group info)) | 795 | (let ((group (gnus-info-group info)) |
| 783 | (completep (and start-article | 796 | (completep (and start-article |
| 784 | (= start-article 1)))) | 797 | (= start-article 1)))) |
| 798 | (when uidnext | ||
| 799 | (setq high (1- uidnext))) | ||
| 785 | ;; First set the active ranges based on high/low. | 800 | ;; First set the active ranges based on high/low. |
| 786 | (if (or completep | 801 | (if (or completep |
| 787 | (not (gnus-active group))) | 802 | (not (gnus-active group))) |
| 788 | (gnus-set-active group | 803 | (gnus-set-active group |
| 789 | (if high | 804 | (if (and low high) |
| 790 | (cons low high) | 805 | (cons low high) |
| 791 | ;; No articles in this group. | 806 | ;; No articles in this group. |
| 792 | (cons uidnext (1- uidnext)))) | 807 | (cons uidnext (1- uidnext)))) |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 954b4895da7..9fe37baf95e 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -967,23 +967,27 @@ details on the language and supported extensions" | |||
| 967 | (defs (caddr (gnus-server-to-method srv))) | 967 | (defs (caddr (gnus-server-to-method srv))) |
| 968 | (criteria (or (cdr (assq 'criteria query)) | 968 | (criteria (or (cdr (assq 'criteria query)) |
| 969 | nnir-imap-search-field)) | 969 | nnir-imap-search-field)) |
| 970 | artlist buf) | 970 | (gnus-inhibit-demon t) |
| 971 | artlist) | ||
| 971 | (message "Opening server %s" server) | 972 | (message "Opening server %s" server) |
| 972 | (condition-case () | 973 | (condition-case () |
| 973 | (when (nnimap-open-server server defs) ;; xxx | 974 | (when (nnimap-possibly-change-group (gnus-group-short-name group) server) |
| 974 | (setq buf nnimap-server-buffer) ;; xxx | 975 | (with-current-buffer (nnimap-buffer) |
| 975 | (message "Searching %s..." group) | 976 | (message "Searching %s..." group) |
| 976 | (let ((arts 0) | 977 | (let ((arts 0) |
| 977 | (mbx (gnus-group-real-name group))) | 978 | (result |
| 978 | (when (imap-mailbox-select mbx nil buf) | 979 | (nnimap-command "UID SEARCH %s" |
| 979 | (mapc | 980 | (nnir-imap-make-query criteria qstring)))) |
| 980 | (lambda (artnum) | 981 | (mapc |
| 981 | (push (vector group artnum 1) artlist) | 982 | (lambda (artnum) |
| 982 | (setq arts (1+ arts))) | 983 | (push (vector group artnum 1) artlist) |
| 983 | (imap-search (nnir-imap-make-query criteria qstring) buf)) | 984 | (setq arts (1+ arts))) |
| 984 | (message "Searching %s... %d matches" mbx arts))) | 985 | (and (car result) |
| 985 | (message "Searching %s...done" group)) | 986 | (delete 0 (mapcar #'string-to-number |
| 986 | (quit nil)) | 987 | (cdr (assoc "SEARCH" (cdr result))))))) |
| 988 | (message "Searching %s... %d matches" group arts))) | ||
| 989 | (message "Searching %s...done" group)) | ||
| 990 | (quit nil)) | ||
| 987 | (reverse artlist)))) | 991 | (reverse artlist)))) |
| 988 | 992 | ||
| 989 | (defun nnir-imap-make-query (criteria qstring) | 993 | (defun nnir-imap-make-query (criteria qstring) |
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 5b50ddb4b99..8a018dc6aca 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el | |||
| @@ -916,7 +916,7 @@ by nnmaildir-request-article.") | |||
| 916 | "\n"))))) | 916 | "\n"))))) |
| 917 | 'group) | 917 | 'group) |
| 918 | 918 | ||
| 919 | (defun nnmaildir-request-update-info (gname info &optional server) | 919 | (defun nnmaildir-request-marks (gname info &optional server) |
| 920 | (let ((group (nnmaildir--prepare server gname)) | 920 | (let ((group (nnmaildir--prepare server gname)) |
| 921 | pgname flist always-marks never-marks old-marks dotfile num dir | 921 | pgname flist always-marks never-marks old-marks dotfile num dir |
| 922 | markdirs marks mark ranges markdir article read end new-marks ls | 922 | markdirs marks mark ranges markdir article read end new-marks ls |
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el index 26d95b21eb3..f38ffd37e52 100644 --- a/lisp/gnus/nnmairix.el +++ b/lisp/gnus/nnmairix.el | |||
| @@ -705,7 +705,7 @@ Other back ends might or might not work.") | |||
| 705 | 705 | ||
| 706 | (autoload 'nnimap-request-update-info-internal "nnimap") | 706 | (autoload 'nnimap-request-update-info-internal "nnimap") |
| 707 | 707 | ||
| 708 | (deffoo nnmairix-request-update-info (group info &optional server) | 708 | (deffoo nnmairix-request-marks (group info &optional server) |
| 709 | ;; propagate info from underlying IMAP folder to nnmairix group | 709 | ;; propagate info from underlying IMAP folder to nnmairix group |
| 710 | ;; This is currently experimental and must be explicitly activated | 710 | ;; This is currently experimental and must be explicitly activated |
| 711 | ;; with nnmairix-propagate-marks-to-nnmairix-group | 711 | ;; with nnmairix-propagate-marks-to-nnmairix-group |
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index d05485b32f3..42b53216875 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el | |||
| @@ -1047,7 +1047,7 @@ Use the nov database for the current group if available." | |||
| 1047 | (nnml-save-marks group server)) | 1047 | (nnml-save-marks group server)) |
| 1048 | nil) | 1048 | nil) |
| 1049 | 1049 | ||
| 1050 | (deffoo nnml-request-update-info (group info &optional server) | 1050 | (deffoo nnml-request-marks (group info &optional server) |
| 1051 | (nnml-possibly-change-directory group server) | 1051 | (nnml-possibly-change-directory group server) |
| 1052 | (when (and (not nnml-marks-is-evil) (nnml-marks-changed-p group server)) | 1052 | (when (and (not nnml-marks-is-evil) (nnml-marks-changed-p group server)) |
| 1053 | (nnheader-message 8 "Updating marks for %s..." group) | 1053 | (nnheader-message 8 "Updating marks for %s..." group) |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 50f11ad24f7..1bf2ce1e368 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -1130,7 +1130,7 @@ command whose response triggered the error." | |||
| 1130 | (nntp-save-marks group server)) | 1130 | (nntp-save-marks group server)) |
| 1131 | nil) | 1131 | nil) |
| 1132 | 1132 | ||
| 1133 | (deffoo nntp-request-update-info (group info &optional server) | 1133 | (deffoo nntp-request-marks (group info &optional server) |
| 1134 | (when (and (not nntp-marks-is-evil) | 1134 | (when (and (not nntp-marks-is-evil) |
| 1135 | nntp-marks-file-name) | 1135 | nntp-marks-file-name) |
| 1136 | (nntp-possibly-create-directory group server) | 1136 | (nntp-possibly-create-directory group server) |
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el index fceb2a387aa..1cfa7a4cbc3 100644 --- a/lisp/gnus/nnweb.el +++ b/lisp/gnus/nnweb.el | |||
| @@ -193,8 +193,7 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 193 | (nnmail-generate-active (list (assoc server nnweb-group-alist))) | 193 | (nnmail-generate-active (list (assoc server nnweb-group-alist))) |
| 194 | t)) | 194 | t)) |
| 195 | 195 | ||
| 196 | (deffoo nnweb-request-update-info (group info &optional server) | 196 | (deffoo nnweb-request-update-info (group info &optional server)) |
| 197 | (nnweb-possibly-change-server group server)) | ||
| 198 | 197 | ||
| 199 | (deffoo nnweb-asynchronous-p () | 198 | (deffoo nnweb-asynchronous-p () |
| 200 | nil) | 199 | nil) |