diff options
| author | Gnus developers | 2010-12-16 22:22:28 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-12-16 22:22:28 +0000 |
| commit | 549c9aed8dc0590249df20560302756bfb48e84b (patch) | |
| tree | 1a922a61ad23d25af8391a3e7b525c8033994e2d | |
| parent | aa936e8e0a8ffcb6cf59e5fa57ce04f5524d03f4 (diff) | |
| download | emacs-549c9aed8dc0590249df20560302756bfb48e84b.tar.gz emacs-549c9aed8dc0590249df20560302756bfb48e84b.zip | |
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'.
| -rw-r--r-- | doc/misc/ChangeLog | 8 | ||||
| -rw-r--r-- | doc/misc/gnus.texi | 17 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 57 | ||||
| -rw-r--r-- | lisp/gnus/auth-source.el | 34 | ||||
| -rw-r--r-- | lisp/gnus/gnus-group.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-html.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-int.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/gnus-srvr.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-start.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnfolder.el | 31 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 31 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 24 | ||||
| -rw-r--r-- | lisp/gnus/nnmail.el | 2 |
14 files changed, 189 insertions, 43 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 1d46f385752..66cbb24fb18 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * gnus.texi (Archived Messages): Remove outdated text. | ||
| 4 | |||
| 5 | 2010-12-16 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 6 | |||
| 7 | * gnus.texi (Foreign Groups): Added clarification of foreign groups. | ||
| 8 | |||
| 1 | 2010-12-15 Andrew Cohen <cohen@andy.bu.edu> | 9 | 2010-12-15 Andrew Cohen <cohen@andy.bu.edu> |
| 2 | 10 | ||
| 3 | * gnus.texi (The hyrex Engine): Say that this engine as obsolete. | 11 | * gnus.texi (The hyrex Engine): Say that this engine as obsolete. |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 612f0296d90..356aa4b163a 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -2512,6 +2512,15 @@ the command to be executed. | |||
| 2512 | @section Foreign Groups | 2512 | @section Foreign Groups |
| 2513 | @cindex foreign groups | 2513 | @cindex foreign groups |
| 2514 | 2514 | ||
| 2515 | If you recall how to subscribe to servers (@pxref{Finding the News}) | ||
| 2516 | you will remember that @code{gnus-secondary-select-methods} and | ||
| 2517 | @code{gnus-select-method} let you write a definition in Emacs Lisp of | ||
| 2518 | what servers you want to see when you start up. The alternate | ||
| 2519 | approach is to use foreign servers and groups. ``Foreign'' here means | ||
| 2520 | they are not coming from the select methods. All foreign server | ||
| 2521 | configuration and subscriptions are stored only in the | ||
| 2522 | @file{~/.newsrc.eld} file. | ||
| 2523 | |||
| 2515 | Below are some group mode commands for making and editing general foreign | 2524 | Below are some group mode commands for making and editing general foreign |
| 2516 | groups, as well as commands to ease the creation of a few | 2525 | groups, as well as commands to ease the creation of a few |
| 2517 | special-purpose groups. All these commands insert the newly created | 2526 | special-purpose groups. All these commands insert the newly created |
| @@ -12611,9 +12620,6 @@ messages in one file per month: | |||
| 12611 | (concat "mail." (format-time-string "%Y-%m"))))) | 12620 | (concat "mail." (format-time-string "%Y-%m"))))) |
| 12612 | @end lisp | 12621 | @end lisp |
| 12613 | 12622 | ||
| 12614 | @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to | ||
| 12615 | @c use a different value for @code{gnus-message-archive-group} there.) | ||
| 12616 | |||
| 12617 | Now, when you send a message off, it will be stored in the appropriate | 12623 | Now, when you send a message off, it will be stored in the appropriate |
| 12618 | group. (If you want to disable storing for just one particular message, | 12624 | group. (If you want to disable storing for just one particular message, |
| 12619 | you can just remove the @code{Gcc} header that has been inserted.) The | 12625 | you can just remove the @code{Gcc} header that has been inserted.) The |
| @@ -12625,11 +12631,6 @@ if (using @kbd{G r} in the group buffer) to something | |||
| 12625 | nice---@samp{misc-mail-september-1995}, or whatever. New messages will | 12631 | nice---@samp{misc-mail-september-1995}, or whatever. New messages will |
| 12626 | continue to be stored in the old (now empty) group. | 12632 | continue to be stored in the old (now empty) group. |
| 12627 | 12633 | ||
| 12628 | That's the default method of archiving sent messages. Gnus offers a | ||
| 12629 | different way for the people who don't like the default method. In that | ||
| 12630 | case you should set @code{gnus-message-archive-group} to @code{nil}; | ||
| 12631 | this will disable archiving. | ||
| 12632 | |||
| 12633 | @table @code | 12634 | @table @code |
| 12634 | @item gnus-gcc-mark-as-read | 12635 | @item gnus-gcc-mark-as-read |
| 12635 | @vindex gnus-gcc-mark-as-read | 12636 | @vindex gnus-gcc-mark-as-read |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 76565b3f19f..26538731932 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,8 +1,65 @@ | |||
| 1 | 2010-12-16 Daiki Ueno <ueno@unixuser.org> | ||
| 2 | |||
| 3 | * auth-source.el (auth-source-gpg-encrypt-to): New variable to set the | ||
| 4 | list of recipient keys, or use symmetric encryption if not a list. | ||
| 5 | (auth-source-create): Use it to make `epa-file-encrypt-to' local for an | ||
| 6 | EPA override, replacing the call to `netrc-store-data'. | ||
| 7 | |||
| 8 | 2010-12-16 Dan Davison <dandavison7@gmail.com> (tiny change) | ||
| 9 | |||
| 10 | * gnus-srvr.el: Avoid passing nil regexp argument to | ||
| 11 | delete-matching-lines. | ||
| 12 | |||
| 13 | 2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 14 | |||
| 15 | * gnus-html.el (gnus-html-schedule-image-fetching): Make sure the HTML | ||
| 16 | fetching stops when Gnus exits. | ||
| 17 | |||
| 18 | * nnfolder.el (nnfolder-save-all-buffers): Refactor out into its own | ||
| 19 | function. | ||
| 20 | (nnfolder-request-expire-articles): Save all the buffers after doing | ||
| 21 | expiry. | ||
| 22 | |||
| 23 | * nnmail.el (nnmail-expiry-target-group): Revert the "all articles are | ||
| 24 | the last article", since that led to serious performance regressions | ||
| 25 | when expiring nnml groups. | ||
| 26 | |||
| 27 | 2010-12-16 Andrew Cohen <cohen@andy.bu.edu> | ||
| 28 | |||
| 29 | * nnir.el: Improve customizations. | ||
| 30 | |||
| 31 | 2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 32 | |||
| 33 | * gnus-start.el (gnus-subscribe-newsgroup): Notify the backend. | ||
| 34 | |||
| 35 | * gnus-group.el (gnus-group-kill-group): Notify the backend that the | ||
| 36 | group has been killed. | ||
| 37 | (gnus-group-yank-group): Ditto. | ||
| 38 | |||
| 39 | * gnus-srvr.el (gnus-browse-unsubscribe-group): Ditto. | ||
| 40 | |||
| 41 | * nnimap.el (nnimap-request-update-group-status): New function. | ||
| 42 | |||
| 43 | * gnus-int.el (gnus-request-update-group-status): New interface | ||
| 44 | function. | ||
| 45 | |||
| 46 | * gnus-sum.el (gnus-summary-push-marks-to-backend): Fix the logic for | ||
| 47 | copying read-ness to the backends. | ||
| 48 | |||
| 49 | * nnimap.el (nnimap-quirk): New function. | ||
| 50 | (nnimap-retrieve-group-data-early): Use it. | ||
| 51 | (nnimap-quirks): New alist. | ||
| 52 | |||
| 1 | 2010-12-16 Katsumi Yamaoka <yamaoka@jpl.org> | 53 | 2010-12-16 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 54 | ||
| 3 | * shr.el (shr-insert): Set shr-start after deleting trailing space; | 55 | * shr.el (shr-insert): Set shr-start after deleting trailing space; |
| 4 | don't delete it within indentation. | 56 | don't delete it within indentation. |
| 5 | 57 | ||
| 58 | 2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 59 | |||
| 60 | * nnimap.el (nnimap-wait-for-response): Always look (at least) at the | ||
| 61 | previous line. | ||
| 62 | |||
| 6 | 2010-12-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | 63 | 2010-12-15 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 7 | 64 | ||
| 8 | * nnimap.el (nnimap-retrieve-group-data-early): Fix the syntax of the | 65 | * nnimap.el (nnimap-retrieve-group-data-early): Fix the syntax of the |
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 20e4af189d9..5d386302903 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el | |||
| @@ -159,6 +159,15 @@ can get pretty complex." | |||
| 159 | (const :tag "Any" t) | 159 | (const :tag "Any" t) |
| 160 | (string :tag "Specific user name")))))))) | 160 | (string :tag "Specific user name")))))))) |
| 161 | 161 | ||
| 162 | (defcustom auth-source-gpg-encrypt-to t | ||
| 163 | "List of recipient keys that `authinfo.gpg' encrypted to. | ||
| 164 | If the value is not a list, symmetric encryption will be used." | ||
| 165 | :group 'auth-source | ||
| 166 | :version "23.2" ;; No Gnus | ||
| 167 | :type '(choice (const :tag "Symmetric encryption" t) | ||
| 168 | (repeat :tag "Recipient public keys" | ||
| 169 | (string :tag "Recipient public key")))) | ||
| 170 | |||
| 162 | ;; temp for debugging | 171 | ;; temp for debugging |
| 163 | ;; (unintern 'auth-source-protocols) | 172 | ;; (unintern 'auth-source-protocols) |
| 164 | ;; (unintern 'auth-sources) | 173 | ;; (unintern 'auth-sources) |
| @@ -352,9 +361,28 @@ Return structure as specified by MODE." | |||
| 352 | ;; netrc interface. | 361 | ;; netrc interface. |
| 353 | (when (y-or-n-p (format "Do you want to save this password in %s? " | 362 | (when (y-or-n-p (format "Do you want to save this password in %s? " |
| 354 | source)) | 363 | source)) |
| 355 | (netrc-store-data source host prot | 364 | ;; the code below is almost same as `netrc-store-data' except |
| 356 | (or user (cdr (assoc "login" result))) | 365 | ;; the `epa-file-encrypt-to' hack (see bug#7487). |
| 357 | (cdr (assoc "password" result)))))) | 366 | (with-temp-buffer |
| 367 | (when (file-exists-p source) | ||
| 368 | (insert-file-contents source)) | ||
| 369 | (when auth-source-gpg-encrypt-to | ||
| 370 | ;; making `epa-file-encrypt-to' local to this buffer lets | ||
| 371 | ;; epa-file skip the key selection query (see the | ||
| 372 | ;; `local-variable-p' check in `epa-file-write-region'). | ||
| 373 | (unless (local-variable-p 'epa-file-encrypt-to) | ||
| 374 | (make-local-variable 'epa-file-encrypt-to)) | ||
| 375 | (if (listp auth-source-gpg-encrypt-to) | ||
| 376 | (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) | ||
| 377 | (goto-char (point-max)) | ||
| 378 | (unless (bolp) | ||
| 379 | (insert "\n")) | ||
| 380 | (insert (format "machine %s login %s password %s port %s\n" | ||
| 381 | host | ||
| 382 | (or user (cdr (assoc "login" result))) | ||
| 383 | (cdr (assoc "password" result)) | ||
| 384 | prot)) | ||
| 385 | (write-region (point-min) (point-max) source nil 'silent))))) | ||
| 358 | (if (consp mode) | 386 | (if (consp mode) |
| 359 | (mapcar #'cdr result) | 387 | (mapcar #'cdr result) |
| 360 | (cdar result)))) | 388 | (cdar result)))) |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 5ece1457163..73eeb7104ca 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -3781,6 +3781,7 @@ of groups killed." | |||
| 3781 | gnus-list-of-killed-groups)) | 3781 | gnus-list-of-killed-groups)) |
| 3782 | (gnus-group-change-level | 3782 | (gnus-group-change-level |
| 3783 | (if entry entry group) gnus-level-killed (if entry nil level)) | 3783 | (if entry entry group) gnus-level-killed (if entry nil level)) |
| 3784 | (gnus-request-update-group-status group 'unsubscribe) | ||
| 3784 | (message "Killed group %s" (gnus-group-decoded-name group))) | 3785 | (message "Killed group %s" (gnus-group-decoded-name group))) |
| 3785 | ;; If there are lots and lots of groups to be killed, we use | 3786 | ;; If there are lots and lots of groups to be killed, we use |
| 3786 | ;; this thing instead. | 3787 | ;; this thing instead. |
| @@ -3803,7 +3804,8 @@ of groups killed." | |||
| 3803 | (setq gnus-zombie-list (delete group gnus-zombie-list)))) | 3804 | (setq gnus-zombie-list (delete group gnus-zombie-list)))) |
| 3804 | ;; There may be more than one instance displayed. | 3805 | ;; There may be more than one instance displayed. |
| 3805 | (while (gnus-group-goto-group group) | 3806 | (while (gnus-group-goto-group group) |
| 3806 | (gnus-delete-line))) | 3807 | (gnus-delete-line)) |
| 3808 | (gnus-request-update-group-status group 'unsubscribe)) | ||
| 3807 | (gnus-make-hashtable-from-newsrc-alist)) | 3809 | (gnus-make-hashtable-from-newsrc-alist)) |
| 3808 | 3810 | ||
| 3809 | (gnus-group-position-point) | 3811 | (gnus-group-position-point) |
| @@ -3831,6 +3833,7 @@ yanked) a list of yanked groups is returned." | |||
| 3831 | (and prev (gnus-group-entry prev)) | 3833 | (and prev (gnus-group-entry prev)) |
| 3832 | t) | 3834 | t) |
| 3833 | (gnus-group-insert-group-line-info group) | 3835 | (gnus-group-insert-group-line-info group) |
| 3836 | (gnus-request-update-group-status group 'subscribe) | ||
| 3834 | (gnus-undo-register | 3837 | (gnus-undo-register |
| 3835 | `(when (gnus-group-goto-group ,group) | 3838 | `(when (gnus-group-goto-group ,group) |
| 3836 | (gnus-group-kill-group 1)))) | 3839 | (gnus-group-kill-group 1)))) |
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 63a14b204fb..deeb3565bcf 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el | |||
| @@ -395,7 +395,7 @@ Use ALT-TEXT for the image string." | |||
| 395 | 4) | 395 | 4) |
| 396 | (setq args (nconc args (list t)))) | 396 | (setq args (nconc args (list t)))) |
| 397 | (ignore-errors | 397 | (ignore-errors |
| 398 | (apply #'url-retrieve args)))) | 398 | (push (apply #'url-retrieve args) gnus-buffers)))) |
| 399 | 399 | ||
| 400 | (defun gnus-html-image-fetched (status buffer image) | 400 | (defun gnus-html-image-fetched (status buffer image) |
| 401 | "Callback function called when image has been fetched." | 401 | "Callback function called when image has been fetched." |
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 43284540125..71a9aa9e618 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el | |||
| @@ -473,6 +473,18 @@ If FETCH-OLD, retrieve all headers (or some subset thereof) in the group." | |||
| 473 | (funcall (gnus-get-function gnus-command-method 'request-type) | 473 | (funcall (gnus-get-function gnus-command-method 'request-type) |
| 474 | (gnus-group-real-name group) article)))) | 474 | (gnus-group-real-name group) article)))) |
| 475 | 475 | ||
| 476 | (defun gnus-request-update-group-status (group status) | ||
| 477 | "Change the status of a group. | ||
| 478 | Valid statuses include `subscribe' and `unsubscribe'." | ||
| 479 | (let ((gnus-command-method (gnus-find-method-for-group group))) | ||
| 480 | (if (not (gnus-check-backend-function | ||
| 481 | 'request-update-group-status (car gnus-command-method))) | ||
| 482 | nil | ||
| 483 | (funcall | ||
| 484 | (gnus-get-function gnus-command-method 'request-update-group-status) | ||
| 485 | (gnus-group-real-name group) status | ||
| 486 | (nth 1 gnus-command-method))))) | ||
| 487 | |||
| 476 | (defun gnus-request-set-mark (group action) | 488 | (defun gnus-request-set-mark (group action) |
| 477 | "Set marks on articles in the back end." | 489 | "Set marks on articles in the back end." |
| 478 | (let ((gnus-command-method (gnus-find-method-for-group group))) | 490 | (let ((gnus-command-method (gnus-find-method-for-group group))) |
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 19fd5fe6636..acca5651e5e 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el | |||
| @@ -766,7 +766,8 @@ claim them." | |||
| 766 | (with-current-buffer nntp-server-buffer | 766 | (with-current-buffer nntp-server-buffer |
| 767 | (let ((cur (current-buffer))) | 767 | (let ((cur (current-buffer))) |
| 768 | (goto-char (point-min)) | 768 | (goto-char (point-min)) |
| 769 | (unless (string= gnus-ignored-newsgroups "") | 769 | (unless (or (null gnus-ignored-newsgroups) |
| 770 | (string= gnus-ignored-newsgroups "")) | ||
| 770 | (delete-matching-lines gnus-ignored-newsgroups)) | 771 | (delete-matching-lines gnus-ignored-newsgroups)) |
| 771 | ;; We treat NNTP as a special case to avoid problems with | 772 | ;; We treat NNTP as a special case to avoid problems with |
| 772 | ;; garbage group names like `"foo' that appear in some badly | 773 | ;; garbage group names like `"foo' that appear in some badly |
| @@ -992,7 +993,8 @@ how new groups will be entered into the group buffer." | |||
| 992 | ;; mechanism for new group subscription. | 993 | ;; mechanism for new group subscription. |
| 993 | (gnus-call-subscribe-functions | 994 | (gnus-call-subscribe-functions |
| 994 | gnus-browse-subscribe-newsgroup-method | 995 | gnus-browse-subscribe-newsgroup-method |
| 995 | group))) | 996 | group) |
| 997 | (gnus-request-update-group-status group 'subscribe))) | ||
| 996 | (delete-char 1) | 998 | (delete-char 1) |
| 997 | (insert (let ((lvl (gnus-group-level group))) | 999 | (insert (let ((lvl (gnus-group-level group))) |
| 998 | (cond | 1000 | (cond |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index d9e432736e2..322c7d191e1 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -645,6 +645,7 @@ the first newsgroup." | |||
| 645 | (gnus-group-change-level | 645 | (gnus-group-change-level |
| 646 | newsgroup gnus-level-default-subscribed | 646 | newsgroup gnus-level-default-subscribed |
| 647 | gnus-level-killed (gnus-group-entry (or next "dummy.group"))) | 647 | gnus-level-killed (gnus-group-entry (or next "dummy.group"))) |
| 648 | (gnus-request-update-group-status newsgroup 'subscribe) | ||
| 648 | (gnus-message 5 "Subscribe newsgroup: %s" newsgroup) | 649 | (gnus-message 5 "Subscribe newsgroup: %s" newsgroup) |
| 649 | (run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup) | 650 | (run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup) |
| 650 | t)) | 651 | t)) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index a0217283757..ceaa014363a 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -9958,7 +9958,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." | |||
| 9958 | (defun gnus-summary-push-marks-to-backend (article) | 9958 | (defun gnus-summary-push-marks-to-backend (article) |
| 9959 | (let ((set nil) | 9959 | (let ((set nil) |
| 9960 | (marks gnus-article-mark-lists)) | 9960 | (marks gnus-article-mark-lists)) |
| 9961 | (when (memq article gnus-newsgroup-unreads) | 9961 | (unless (memq article gnus-newsgroup-unreads) |
| 9962 | (push 'read set)) | 9962 | (push 'read set)) |
| 9963 | (while marks | 9963 | (while marks |
| 9964 | (when (and (eq (gnus-article-mark-to-type (cdar marks)) 'list) | 9964 | (when (and (eq (gnus-article-mark-to-type (cdar marks)) 'list) |
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index 5de8653948f..f0a21c5a3e1 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el | |||
| @@ -322,20 +322,20 @@ the group. Then the marks file will be regenerated properly by Gnus.") | |||
| 322 | (when nnfolder-get-new-mail | 322 | (when nnfolder-get-new-mail |
| 323 | (nnfolder-possibly-change-group group server) | 323 | (nnfolder-possibly-change-group group server) |
| 324 | (nnmail-get-new-mail | 324 | (nnmail-get-new-mail |
| 325 | 'nnfolder | 325 | 'nnfolder 'nnfolder-save-all-buffers |
| 326 | (lambda () | 326 | nnfolder-directory group))) |
| 327 | (let ((bufs nnfolder-buffer-alist)) | 327 | |
| 328 | (save-excursion | 328 | (defun nnfolder-save-all-buffers () |
| 329 | (while bufs | 329 | (let ((bufs nnfolder-buffer-alist)) |
| 330 | (if (not (gnus-buffer-live-p (nth 1 (car bufs)))) | 330 | (save-excursion |
| 331 | (setq nnfolder-buffer-alist | 331 | (while bufs |
| 332 | (delq (car bufs) nnfolder-buffer-alist)) | 332 | (if (not (gnus-buffer-live-p (nth 1 (car bufs)))) |
| 333 | (set-buffer (nth 1 (car bufs))) | 333 | (setq nnfolder-buffer-alist |
| 334 | (nnfolder-save-buffer) | 334 | (delq (car bufs) nnfolder-buffer-alist)) |
| 335 | (kill-buffer (current-buffer))) | 335 | (set-buffer (nth 1 (car bufs))) |
| 336 | (setq bufs (cdr bufs)))))) | 336 | (nnfolder-save-buffer) |
| 337 | nnfolder-directory | 337 | (kill-buffer (current-buffer))) |
| 338 | group))) | 338 | (setq bufs (cdr bufs)))))) |
| 339 | 339 | ||
| 340 | ;; Don't close the buffer if we're not shutting down the server. This way, | 340 | ;; Don't close the buffer if we're not shutting down the server. This way, |
| 341 | ;; we can keep the buffer in the group buffer cache, and not have to grovel | 341 | ;; we can keep the buffer in the group buffer cache, and not have to grovel |
| @@ -488,7 +488,8 @@ the group. Then the marks file will be regenerated properly by Gnus.") | |||
| 488 | (nnfolder-save-buffer) | 488 | (nnfolder-save-buffer) |
| 489 | (nnfolder-adjust-min-active newsgroup) | 489 | (nnfolder-adjust-min-active newsgroup) |
| 490 | (nnfolder-save-active nnfolder-group-alist nnfolder-active-file) | 490 | (nnfolder-save-active nnfolder-group-alist nnfolder-active-file) |
| 491 | (gnus-sorted-difference articles (nreverse deleted-articles))))) | 491 | (gnus-sorted-difference articles (nreverse deleted-articles))) |
| 492 | (nnfolder-save-all-buffers))) | ||
| 492 | 493 | ||
| 493 | (deffoo nnfolder-request-move-article (article group server accept-form | 494 | (deffoo nnfolder-request-move-article (article group server accept-form |
| 494 | &optional last move-is-internal) | 495 | &optional last move-is-internal) |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index ae1929d1bd5..d1d6d058421 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -139,6 +139,9 @@ textual parts.") | |||
| 139 | (download "gnus-download") | 139 | (download "gnus-download") |
| 140 | (forward "gnus-forward"))) | 140 | (forward "gnus-forward"))) |
| 141 | 141 | ||
| 142 | (defvar nnimap-quirks | ||
| 143 | '(("QRESYNC" "Zimbra" "QRESYNC "))) | ||
| 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 | ||
| @@ -897,6 +900,16 @@ textual parts.") | |||
| 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) |
| @@ -1080,8 +1093,9 @@ textual parts.") | |||
| 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) |
| @@ -1107,6 +1121,15 @@ textual parts.") | |||
| 1107 | sequences)))) | 1121 | sequences)))) |
| 1108 | sequences)))) | 1122 | sequences)))) |
| 1109 | 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)))) | ||
| 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)) |
| @@ -1541,7 +1564,11 @@ textual parts.") | |||
| 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 |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 0f07bb14062..f2348bf40ad 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -305,13 +305,6 @@ is `(valuefunc member)'." | |||
| 305 | "Search groups in Gnus with assorted seach engines." | 305 | "Search groups in Gnus with assorted seach engines." |
| 306 | :group 'gnus) | 306 | :group 'gnus) |
| 307 | 307 | ||
| 308 | (defcustom nnir-method-default-engines | ||
| 309 | '((nnimap . imap) | ||
| 310 | (nntp . gmane)) | ||
| 311 | "*Alist of default search engines keyed by server method." | ||
| 312 | :type '(alist) | ||
| 313 | :group 'nnir) | ||
| 314 | |||
| 315 | (defcustom nnir-ignored-newsgroups "" | 308 | (defcustom nnir-ignored-newsgroups "" |
| 316 | "*A regexp to match newsgroups in the active file that should | 309 | "*A regexp to match newsgroups in the active file that should |
| 317 | be skipped when searching." | 310 | be skipped when searching." |
| @@ -329,7 +322,7 @@ with three items unique to nnir summary buffers: | |||
| 329 | %g Article original short group name (string) | 322 | %g Article original short group name (string) |
| 330 | 323 | ||
| 331 | If nil this will use `gnus-summary-line-format'." | 324 | If nil this will use `gnus-summary-line-format'." |
| 332 | :type '(regexp) | 325 | :type '(string) |
| 333 | :group 'nnir) | 326 | :group 'nnir) |
| 334 | 327 | ||
| 335 | (defcustom nnir-retrieve-headers-override-function nil | 328 | (defcustom nnir-retrieve-headers-override-function nil |
| @@ -347,7 +340,8 @@ result, `gnus-retrieve-headers' will be called instead." | |||
| 347 | "*The default IMAP search key for an nnir search. Must be one of | 340 | "*The default IMAP search key for an nnir search. Must be one of |
| 348 | the keys in `nnir-imap-search-arguments'. To use raw imap queries | 341 | the keys in `nnir-imap-search-arguments'. To use raw imap queries |
| 349 | by default set this to \"Imap\"." | 342 | by default set this to \"Imap\"." |
| 350 | :type '(string) | 343 | :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem))) |
| 344 | nnir-imap-search-arguments)) | ||
| 351 | :group 'nnir) | 345 | :group 'nnir) |
| 352 | 346 | ||
| 353 | (defcustom nnir-swish++-configuration-file | 347 | (defcustom nnir-swish++-configuration-file |
| @@ -546,6 +540,18 @@ needs the variables `nnir-namazu-program', | |||
| 546 | 540 | ||
| 547 | Add an entry here when adding a new search engine.") | 541 | Add an entry here when adding a new search engine.") |
| 548 | 542 | ||
| 543 | (defcustom nnir-method-default-engines | ||
| 544 | '((nnimap . imap) | ||
| 545 | (nntp . gmane)) | ||
| 546 | "*Alist of default search engines keyed by server method." | ||
| 547 | :type `(repeat (cons (choice (const nnimap) (const nttp) (const nnspool) | ||
| 548 | (const nneething) (const nndir) (const nnmbox) | ||
| 549 | (const nnml) (const nnmh) (const nndraft) | ||
| 550 | (const nnfolder) (const nnmaildir)) | ||
| 551 | (choice | ||
| 552 | ,@(mapcar (lambda (elem) (list 'const (car elem))) | ||
| 553 | nnir-engines)))) | ||
| 554 | :group 'nnir) | ||
| 549 | 555 | ||
| 550 | ;; Gnus glue. | 556 | ;; Gnus glue. |
| 551 | 557 | ||
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 06b464c0b29..c86e96bd184 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el | |||
| @@ -1915,7 +1915,7 @@ If TIME is nil, then return the cutoff time for oldness instead." | |||
| 1915 | (unless (eq target 'delete) | 1915 | (unless (eq target 'delete) |
| 1916 | (when (or (gnus-request-group target) | 1916 | (when (or (gnus-request-group target) |
| 1917 | (gnus-request-create-group target)) | 1917 | (gnus-request-create-group target)) |
| 1918 | (let ((group-art (gnus-request-accept-article target nil t t))) | 1918 | (let ((group-art (gnus-request-accept-article target nil nil t))) |
| 1919 | (when (and (consp group-art) | 1919 | (when (and (consp group-art) |
| 1920 | (cdr group-art)) | 1920 | (cdr group-art)) |
| 1921 | (gnus-group-mark-article-read target (cdr group-art)))))))) | 1921 | (gnus-group-mark-article-read target (cdr group-art)))))))) |