1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-20 10:23:57 +00:00
emacs/lisp/gnus/nnimap.el

2170 lines
72 KiB
EmacsLisp
Raw Normal View History

Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
;;; nnimap.el --- IMAP interface for Gnus
2005-08-06 19:51:42 +00:00
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
2000-09-19 13:40:08 +00:00
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Simon Josefsson <simon@josefsson.org>
2000-09-19 13:40:08 +00:00
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
2000-09-19 13:40:08 +00:00
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
2000-09-19 13:40:08 +00:00
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2000-09-19 13:40:08 +00:00
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
2000-09-19 13:40:08 +00:00
;;; Commentary:
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
;; nnimap interfaces Gnus with IMAP servers.
2000-09-19 13:40:08 +00:00
;;; Code:
Stop message.el from loading about 40 libraries it doesn't always need. The general approach is to autoload rather than require, and to require in the specific functions rather than the file. (Bug#5642) * url/url.el: Move mailcap require earlier in the file. * gnus/gmm-utils.el: Don't require wid-edit. (widget-create-child-value, widget-convert, widget-default-get): Autoload. * gnus/gnus-util.el: Don't require time-date, netrc. (message-fetch-field, gnus-group-name-decode): Declare rather than autoloading. (gnus-fetch-field): Require message. (gnus-decode-newsgroups): Require gnus-group. * gnus/ietf-drums.el: Don't require time-date. * gnus/message.el: Don't require hashcash, canlock, ecomplete. Do require mail-utils. Require nnheader only when compiling. (smtpmail-default-smtp-server): Remove declaration. (message-send-mail-function): Check smtpmail-default-smtp-server is bound rather than requiring smtpmail. (message-auto-save-directory, message-insert-signature): Use expand-file-name rather than nnheader-concat. (nnheader-insert-file-contents): Autoload. (hashcash-wait-async): Declare. (message-send-mail): Only call gnus-setup-posting-charset if gnus-group-posting-charset-alist is bound. Require hashcash if needed. (message-send-mail-with-sendmail): Require sendmail. (canlock-password, canlock-password-for-verify): Declare. (message-canlock-password): Require canlock. (nnheader-get-report): Autoload. (gnus-setup-posting-charset): Declare. (message-send-news): Require gnus-msg. (message-make-references, message-make-in-reply-to): Use mail-header-id rather than the alias mail-header-message-id. (ecomplete-add-item, ecomplete-save): Declare. (message-put-addresses-in-ecomplete): Require ecomplete. (ecomplete-display-matches): Autoload. * gnus/mm-decode.el: Don't require mailcap, gnus-util. (gnus-map-function, gnus-replace-in-string, gnus-read-shell-command) (message-fetch-field, mailcap-parse-mailcaps, mailcap-mime-info): Autoload. (mailcap-mime-extensions): Declare. * gnus/mm-encode.el: Don't require mailcap. (mailcap-extension-to-mime): Autoload. * gnus/mml-sec.el: Don't require password-cache. * gnus/mml.el (gnus-setup-posting-charset): Declare rather than autoload. (mailcap-parse-mimetypes, mailcap-mime-types): Declare. (mml-minibuffer-read-type): Require mailcap. (mml-preview): Require gnus-msg. * gnus/mml1991.el: Require password-cache. (password-cache-expiry): Remove declaration. * gnus/mml2015.el: Require password-cache. (password-cache-expiry): Remove declaration. * gnus/nneething.el (mailcap): Require mailcap. * gnus/nnheader.el: (declare-function): Add compatibility stub. (message-remove-header): Declare rather than autoload. (nnheader-replace-header): Require message. * gnus/nnimap.el (declare-function): Add compatibility stub. (netrc-parse, netrc-machine-user-or-password): Declare. (nnimap-open-connection): Require netrc. * gnus/nntp.el (declare-function): Add compatibility stub. (netrc-parse, netrc-machine, netrc-get): Declare. (nntp-send-authinfo): Require netrc. * gnus/rfc2047.el: Don't require qp. (quoted-printable-encode-region, quoted-printable-decode-string): Autoload. * gnus/sieve-mode.el: Don't require easymenu. (easy-menu-add-item): Autoload it. * gnus/spam-stat.el (time-to-number-of-days): Autoload it. * password-cache.el (password-cache, password-cache-expiry): Autoload.
2010-03-19 02:55:37 +00:00
(eval-and-compile
(require 'nnheader)
;; In Emacs 24, `open-protocol-stream' is an autoloaded alias for
;; `make-network-stream'.
(unless (fboundp 'open-protocol-stream)
(require 'proto-stream)))
Stop message.el from loading about 40 libraries it doesn't always need. The general approach is to autoload rather than require, and to require in the specific functions rather than the file. (Bug#5642) * url/url.el: Move mailcap require earlier in the file. * gnus/gmm-utils.el: Don't require wid-edit. (widget-create-child-value, widget-convert, widget-default-get): Autoload. * gnus/gnus-util.el: Don't require time-date, netrc. (message-fetch-field, gnus-group-name-decode): Declare rather than autoloading. (gnus-fetch-field): Require message. (gnus-decode-newsgroups): Require gnus-group. * gnus/ietf-drums.el: Don't require time-date. * gnus/message.el: Don't require hashcash, canlock, ecomplete. Do require mail-utils. Require nnheader only when compiling. (smtpmail-default-smtp-server): Remove declaration. (message-send-mail-function): Check smtpmail-default-smtp-server is bound rather than requiring smtpmail. (message-auto-save-directory, message-insert-signature): Use expand-file-name rather than nnheader-concat. (nnheader-insert-file-contents): Autoload. (hashcash-wait-async): Declare. (message-send-mail): Only call gnus-setup-posting-charset if gnus-group-posting-charset-alist is bound. Require hashcash if needed. (message-send-mail-with-sendmail): Require sendmail. (canlock-password, canlock-password-for-verify): Declare. (message-canlock-password): Require canlock. (nnheader-get-report): Autoload. (gnus-setup-posting-charset): Declare. (message-send-news): Require gnus-msg. (message-make-references, message-make-in-reply-to): Use mail-header-id rather than the alias mail-header-message-id. (ecomplete-add-item, ecomplete-save): Declare. (message-put-addresses-in-ecomplete): Require ecomplete. (ecomplete-display-matches): Autoload. * gnus/mm-decode.el: Don't require mailcap, gnus-util. (gnus-map-function, gnus-replace-in-string, gnus-read-shell-command) (message-fetch-field, mailcap-parse-mailcaps, mailcap-mime-info): Autoload. (mailcap-mime-extensions): Declare. * gnus/mm-encode.el: Don't require mailcap. (mailcap-extension-to-mime): Autoload. * gnus/mml-sec.el: Don't require password-cache. * gnus/mml.el (gnus-setup-posting-charset): Declare rather than autoload. (mailcap-parse-mimetypes, mailcap-mime-types): Declare. (mml-minibuffer-read-type): Require mailcap. (mml-preview): Require gnus-msg. * gnus/mml1991.el: Require password-cache. (password-cache-expiry): Remove declaration. * gnus/mml2015.el: Require password-cache. (password-cache-expiry): Remove declaration. * gnus/nneething.el (mailcap): Require mailcap. * gnus/nnheader.el: (declare-function): Add compatibility stub. (message-remove-header): Declare rather than autoload. (nnheader-replace-header): Require message. * gnus/nnimap.el (declare-function): Add compatibility stub. (netrc-parse, netrc-machine-user-or-password): Declare. (nnimap-open-connection): Require netrc. * gnus/nntp.el (declare-function): Add compatibility stub. (netrc-parse, netrc-machine, netrc-get): Declare. (nntp-send-authinfo): Require netrc. * gnus/rfc2047.el: Don't require qp. (quoted-printable-encode-region, quoted-printable-decode-string): Autoload. * gnus/sieve-mode.el: Don't require easymenu. (easy-menu-add-item): Autoload it. * gnus/spam-stat.el (time-to-number-of-days): Autoload it. * password-cache.el (password-cache, password-cache-expiry): Autoload.
2010-03-19 02:55:37 +00:00
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(eval-when-compile
(require 'cl))
2000-09-19 13:40:08 +00:00
(require 'nnheader)
(require 'gnus-util)
(require 'gnus)
(require 'nnoo)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(require 'netrc)
2010-09-27 13:22:21 +00:00
(require 'utf7)
2010-10-01 00:25:50 +00:00
(require 'tls)
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(require 'parse-time)
(require 'nnmail)
Merge changes made in Gnus trunk. auth.texi (Overview, Help for users, Help for developers): Update docs. (Help for users): Talk about spaces. sieve-manage.el: Autoload `auth-source-search'. (sieve-sasl-auth): Use it. nnimap.el: Autoload `auth-source-forget+'. (nnimap-open-connection-1): Use it if the connection fails. auth-source.el: Require `password-cache'. (auth-source-hide-passwords, auth-source-cache): Remove and mark obsolete. (auth-source-magic): Marker for `password-cache' keys. (auth-source-do-cache): Update docstring. (auth-source-search): Use and check cache. (auth-source-forget-all-cached, auth-source-remember) (auth-source-recall, auth-source-forget, auth-source-forget+) (auth-source-specmatchp): Caching support functions. (auth-source-forget-user-or-password, auth-source-forget-all-cached): Remove and obsolete. (auth-source-user-or-password): Remove caching to further discourage using it. Always hide passwords. password-cache.el (password-cache-remove): Accept secrets that are not strings. mail-source.el: Autoload `auth-source-search'. (mail-source-keyword-map): Note order matters. (mail-source-set-1): Get all the mail-source source values and defaults and search auth-source on those if needed. This can all probably be simplified. nnimap.el: Autoload `auth-source-search'. (nnimap-credentials): Use it. (nnimap-open-connection-1): Ask for the virtual server and physical address in one shot. nntp.el: Autoload `auth-source-search'. (nntp-send-authinfo): Use it. Note TODO. auth-source.el (auth-source-secrets-search, auth-source-user-or-password): Use `append' instead of `nconc'. (auth-source-user-or-password): Build return list better and protect against nil :secret. auth-source.el (top): Require 'eieio unconditionally. Autoload `secrets-get-attributes' instead of `secrets-get-attribute'. (auth-source-secrets-search): Limit search when `max' is greater than number of results. auth-source.el (auth-source-secrets-search): Add examples. auth-source.el (auth-sources): Allow for simpler defaults for Secrets API with a string "secrets:collection-name" and with 'default. (auth-source-backend-parse): Parse "secrets:collection-name" and 'default. Recurse on parses instead of repeating code. Use the Secrets API is the source is not nil and 'ignore otherwise. Emit a message when ignoring a source. (auth-source-search): List ignored search keys at the top level. (auth-source-netrc-create): Use `case' instead of `cond'. (auth-source-secrets-search): Created with TODOs. (auth-source-secrets-create): Created with TODOs. (auth-source-retrieve, auth-source-create, auth-source-delete) (auth-source-protocol-defaults, auth-source-user-or-password-imap) (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh) (auth-source-user-or-password-sftp) (auth-source-user-or-password-smtp): Removed. (auth-source-user-or-password): Deprecated and modified to be a wrapper around `auth-source-search'. Not tested thoroughly. auth-source.el: Bring in assoc and eioeio libraries. (secrets-enabled): New variable to track the status of the Secrets API. (auth-source-backend): New EIOEIO class to represent a backend. (auth-source-creation-defaults): New variable to set prompt defaults during token creation (see the `auth-source-search' docstring for details). (auth-sources): Simplify to allow a simple string as a netrc backend spec. (auth-source-backend-parse): Parse a backend from an `auth-sources' spec. (auth-source-backend-parse-parameters): Fill in the backend parameters. (auth-source-search): Main auth-source API entry point. (auth-source-delete): Wrapper around `auth-source-search' for deletion. (auth-source-search-collection): Helper function for searching. (auth-source-netrc-parse, auth-source-netrc-normalize) (auth-source-netrc-search, auth-source-netrc-create): Netrc backend. Supports search, create, and delete. (auth-source-secrets-search, auth-source-secrets-create): Secrets API backend stubs. (auth-source-user-or-password): Call `auth-source-search' but it's not ready yet.
2011-02-13 00:25:29 +00:00
(autoload 'auth-source-forget+ "auth-source")
(autoload 'auth-source-search "auth-source")
2000-09-19 13:40:08 +00:00
(nnoo-declare nnimap)
(defvoo nnimap-address nil
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
"The address of the IMAP server.")
2000-09-19 13:40:08 +00:00
(defvoo nnimap-user nil
"Username to use for authentication to the IMAP server.")
2000-09-19 13:40:08 +00:00
(defvoo nnimap-server-port nil
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
"The IMAP port used.
If nnimap-stream is `ssl', this will default to `imaps'. If not,
it will default to `imap'.")
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
(defvoo nnimap-stream 'undecided
"How nnimap talks to the IMAP server.
The value should be either `undecided', `ssl' or `tls',
`network', `starttls', `plain', or `shell'.
If the value is `undecided', nnimap tries `ssl' first, then falls
back on `network'.")
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defvoo nnimap-shell-program (if (boundp 'imap-shell-program)
(if (listp imap-shell-program)
(car imap-shell-program)
imap-shell-program)
"ssh %s imapd"))
(defvoo nnimap-inbox nil
"The mail box where incoming mail arrives and should be split out of.
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
This can be a string or a list of strings
For example, \"INBOX\" or (\"INBOX\" \"SENT\").")
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(defvoo nnimap-split-methods nil
"How mail is split.
Uses the same syntax as `nnmail-split-methods'.")
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
2010-10-01 00:25:50 +00:00
(defvoo nnimap-split-fancy nil
"Uses the same syntax as `nnmail-split-fancy'.")
2010-10-01 00:25:50 +00:00
(defvoo nnimap-unsplittable-articles '(%Deleted %Seen)
"Articles with the flags in the list will not be considered when splitting.")
(make-obsolete-variable 'nnimap-split-rule "see `nnimap-split-methods'."
2010-10-01 00:25:50 +00:00
"Emacs 24.1")
Merge changes made in Gnus trunk. nndraft.el (nndraft-request-expire-articles): Use the group name instead if "nndraft". gnus.texi (Using IMAP): Remove the @acronyms from the headings. nnregistry.el: Added. nnimap.el (nnimap-insert-partial-structure): Be way more permissive when interpreting the structures. GNUS-NEWS: Minor error in GNUS-NEWS - password-cache.el. nnimap.el (nnimap-request-accept-article): Add \r\n to the lines to make this work with Cyrus. gnus-registry.el: Don't prompt on load, which makes it impossible to build Gnus. gnus-gravatar.el: Add gnus-gravatar-properties. gnus-agent.el, gnus-art.el, gnus-bookmark.el, gnus-dired.el, gnus-group.el,\ gnus-int.el, gnus-msg.el, gnus-registry.el, gnus-score.el, gnus-srvr.el,\ gnus-sum.el, gnus-topic.el, gnus-util.el, gnus.el, mm-decode.el, mm-util.el,\ mm-view.el, mml-smime.el, mml.el, nnmairix.el, nnrss.el, smime.el:\ Introduce gnus-completing-read. gnus-util.el: Make completing-read function configurable. gnus-util.el: Add requires and fix history for iswitchb. webmail.el: Remove netscape/my-deja, since they no longer exist. gnus.el (gnus-local-domain): Declare variable obsolete. nnimap.el (nnimap-insert-partial-structure): Get the type from the correct slot, too. pop3.el (pop3-send-streaming-command, pop3-stream-length): New variable. nnimap.el (nnimap-open-connection): Revert the auto-network->starttls code. nnimap.el (nnimap-request-set-mark): Erase the buffer before issuing commands. nnimap.el (nnimap-split-rule): Mark as obsolete. gnus-sum.el (gnus-valid-move-group-p): Make sure that `group' is a symbol. nnimap.el (nnimap-split-incoming-mail): Allow `default' as nnimap-split-methods value. nnimap.el (nnimap-request-article): Downcase the NILs so that they are nil. nndoc.el (nndoc-retrieve-groups): New function. gnus.texi: Fix Gravatar documentation.
2010-09-30 08:39:23 +00:00
Merge changes made in Gnus trunk. mail-parse.el (mail-header-encode-parameter): Define as rfc2045-encode-string. nnheader.el (nnheader-insert-nov): Protect against junk appearing in the extra mail headers. gnus-html.el: Prefetch and html washing additions. gnus-html.el (gnus-html-prefetch-images): Fix up the url-retrieve calling conventions so that prefetch doesn't bug out. Pass proper format strings to gnus-message. nnimap.el: Allow anonymous login. nnimap.el (nnimap-transform-headers): The chars header is called Chars not Bytes. nnimap.el (nnimap-wait-for-response): Don't infloop if the IMAP connection drops. gnus-start.el (gnus-get-unread-articles): Call `gnus-open-server' on each method before trying to scan them etc. gnus-sum.el (gnus-summary-update-mark): Replace subst-char-in-region by subst-char-in-region. gnus.el (gnus-similar-server-opened): Refactor a bit and add comments. gnus.el: Fix a speed regression based in methods that were similar weren't the same. gnus.el (gnus): When using the development version of Gnus, load the gnus-load file. nnimap.el (nnimap-open-connection): When looking for credentials, also use the nnimap-server-port. nnimap.el (nnimap-request-article): Return the group/article number, so that Gnus `^' works as expected. nnimap.el (nnimap-find-wanted-parts-1): Return the MIME parts as IMAP wants them. gnus-start.el (gnus-ignored-newsgroups): Remove [] from the list of bogus characters. gnus-html.el (gnus-html-image-fetched): Protect against the data not arriving. nnimap.el (nnimap-wait-for-connection): Avoid a race condition while waiting for the connection string. gnus.texi (Required Back End Functions): Document INFO.
2010-09-20 00:36:54 +00:00
(defvoo nnimap-authenticator nil
"How nnimap authenticate itself to the server.
Possible choices are nil (use default methods), `anonymous',
`login', `plain' and `cram-md5'.")
Merge changes made in Gnus trunk. mail-parse.el (mail-header-encode-parameter): Define as rfc2045-encode-string. nnheader.el (nnheader-insert-nov): Protect against junk appearing in the extra mail headers. gnus-html.el: Prefetch and html washing additions. gnus-html.el (gnus-html-prefetch-images): Fix up the url-retrieve calling conventions so that prefetch doesn't bug out. Pass proper format strings to gnus-message. nnimap.el: Allow anonymous login. nnimap.el (nnimap-transform-headers): The chars header is called Chars not Bytes. nnimap.el (nnimap-wait-for-response): Don't infloop if the IMAP connection drops. gnus-start.el (gnus-get-unread-articles): Call `gnus-open-server' on each method before trying to scan them etc. gnus-sum.el (gnus-summary-update-mark): Replace subst-char-in-region by subst-char-in-region. gnus.el (gnus-similar-server-opened): Refactor a bit and add comments. gnus.el: Fix a speed regression based in methods that were similar weren't the same. gnus.el (gnus): When using the development version of Gnus, load the gnus-load file. nnimap.el (nnimap-open-connection): When looking for credentials, also use the nnimap-server-port. nnimap.el (nnimap-request-article): Return the group/article number, so that Gnus `^' works as expected. nnimap.el (nnimap-find-wanted-parts-1): Return the MIME parts as IMAP wants them. gnus-start.el (gnus-ignored-newsgroups): Remove [] from the list of bogus characters. gnus-html.el (gnus-html-image-fetched): Protect against the data not arriving. nnimap.el (nnimap-wait-for-connection): Avoid a race condition while waiting for the connection string. gnus.texi (Required Back End Functions): Document INFO.
2010-09-20 00:36:54 +00:00
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(defvoo nnimap-expunge t
"If non-nil, expunge articles after deleting them.
This is always done if the server supports UID EXPUNGE, but it's
not done by default on servers that doesn't support that command.")
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(defvoo nnimap-streaming t
"If non-nil, try to use streaming commands with IMAP servers.
Switching this off will make nnimap slower, but it helps with
some servers.")
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defvoo nnimap-connection-alist nil)
(defvoo nnimap-current-infos nil)
(defvoo nnimap-fetch-partial-articles nil
"If non-nil, Gnus will fetch partial articles.
Merge changes made in Gnus master ever since feature freeze ::::::::::::::::: ::: doc/misc/ ::: ::::::::::::::::: 2012-06-11 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (POP before SMTP): POP-before-SMTP works with all sending methods, so don't mention smtpmail here. 2012-05-04 Wolfgang Jenkner <wjenkner@inode.at> * gnus.texi (Picons): Document gnus-picon-properties. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi: Remove mention of compilation, as that's no longer supported. 2012-03-14 Christopher Schmidt <christopher@ch.ristopher.com> * gnus.texi (Archived Messages): Mention gnus-gcc-pre-body-encode-hook and gnus-gcc-post-body-encode-hook. 2012-02-16 Lars Ingebrigtsen <larsi@gnus.org> * gnus.texi (Various Summary Stuff): Remove mention of `gnus-propagate-marks'. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus.texi: Remove mentions of nnml/nnfolder/nntp backend marks, which no longer exist. 2012-02-08 Katsumi Yamaoka <yamaoka@jpl.org> * gnus.texi (Archived Messages): Document gnus-gcc-self-resent-messages. 2012-02-06 Lars Ingebrigtsen <larsi@gnus.org> * message.texi (Mail Variables): Mention the optional user parameter for X-Message-SMTP-Method. 2012-02-02 Lars Ingebrigtsen <larsi@gnus.org> * gnus.texi (Posting Styles): Mention X-Message-SMTP-Method. * message.texi (Mail Variables): Document X-Message-SMTP-Method. 2012-01-31 Lars Ingebrigtsen <larsi@gnus.org> * gnus.texi (Key Index): Change encoding to utf-8. :::::::::::::::::: ::: lisp/gnus/ ::: :::::::::::::::::: 2012-06-26 Katsumi Yamaoka <yamaoka@jpl.org> * mm-decode.el: Add coding cookie for a soft hyphen that mm-shr uses. 2012-06-11 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-art.el (gnus-article-read-summary-keys): Protect against the key being bound to a lambda form. 2012-05-04 Wolfgang Jenkner <wjenkner@inode.at> * gnus-picon.el (gnus-picon-properties): New defcustom. (gnus-picon-create-glyph): Use it. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * shr.el: Add a iso-8859-1 cookie to make stuff work under other locales. * mm-decode.el (mm-display-part): Dissect archives when hitting `RET' on a handle. * gnus-sum.el (gnus-summary-limit-to-author): Use the current From address as the default. * nnfolder.el (nnfolder-save-buffer): Delete old versions silently. It makes no sense to query the user about internal files. * gnus-spec.el: Remove all the byte-compilation stuff, since benchmarking shows that it doesn't help when entering large summary buffers. * gnus-util.el (gnus-byte-code): Remove. * gnus-spec.el (gnus-update-format-specifications): Remove outdated grouplens stuff. 2012-06-07 Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk> * message.el (message-buffers): Return all buffers derived from Message to make `gnus-dired-attach' work with mu4e. 2012-05-28 Daiki Ueno <ueno@unixuser.org> * mm-decode.el (mm-inhibit-auto-detect-attachment): New variable. (mm-dissect-singlepart): Don't guess the MIME type of application/octet-stream parts if mm-inhibit-auto-detect-attachment is set. (mm-dissect-multipart): Bind mm-inhibit-auto-detect-attachment if the toplevel MIME type is multipart/encrypted. 2011-12-02 Wolfgang Jenkner <wjenkner@inode.at> * gnus-agent.el (gnus-agent-save-active): Deal with the "groups" format. In particular, add an optional argument and a docstring. * gnus-start.el (gnus-groups-to-gnus-format): Use it. * nntp.el (nntp-finish-retrieve-group-infos): Make `nntp-server-buffer' current before calling `gnus-groups-to-gnus-format'. Note that this was already the case for `gnus-active-to-gnus-format'. 2012-04-25 Katsumi Yamaoka <yamaoka@jpl.org> * pop3.el (pop3-wait-for-messages): Fix retrieved data size calculation. 2012-04-12 Lars Magne Ingebrigtsen <larsi@gnus.org> * mm-decode.el (mm-dissect-buffer): Doc fix. * gnus-sum.el (gnus-handle-ephemeral-exit): Avoid creating the group buffer if it doesn't exist. * gnus-group.el (gnus-group-read-ephemeral-group): If no quit-config is given, mark the group as ephemeral with the current window conf. * gnus-sum.el (gnus-set-global-variables): Don't assume that the group buffer exists, which it doesn't if we haven't started Gnus. (gnus-summary-exit): Allow quitting when we don't have a group buffer. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * mml.el (mml-generate-mime): Allow specifying what the top-level part type is. * gnus-sum.el (gnus-auto-center-summary): `scroll-margin' isn't defined on XEmacs. 2012-04-10 Philipp Haselwarter <philipp.haselwarter@gmx.de> (tiny change) * gnus-sum.el (gnus-auto-center-summary): Set default to respect `scroll-margin'. 2012-04-10 Elias Oltmanns <eo@nebensachen.de> (tiny change) * gnus-cite.el (gnus-dissect-cited-text): A single line without citation prefix within a block of cited text should be considered part of that block *only* if it is a blank line. 2012-04-02 Katsumi Yamaoka <yamaoka@jpl.org> * shr.el (shr-find-fill-point): Remove unused code; don't break a line before kinsoku-bol characters nor within kinsoku-eol characters. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-sync.el (gnus-topic-alist, gnus-group-topic) (gnus-topic-create-topic, gnus-topic-enter-dribble): Silence compiler. (gnus-sync-read): Use mapc instead of mapcar. * mm-archive.el: Require mm-decode for some macros. (gnus-recursive-directory-files, mailcap-extension-to-mime): Silence the byte compiler. (mm-archive-decoders): New function that returns the value of the mm-archive-decoders variable. * mm-decode.el: Don't require mm-archive; autoload mm-archive functions instead. (mm-dissect-singlepart): Use the function mm-archive-decoders. * nnmail.el (mail-send-and-exit): Silence the byte compiler. 2012-03-12 Peter Munster <pmrb@free.fr> * gnus-demon.el (gnus-demon-timers): Now a plist (function -> timer). (gnus-demon-cancel): Ditto. (gnus-demon-run-callback): When function cannot be called due to low idleness, call it when idleness reaches the expected value, instead of waiting another timer period. (gnus-demon-init): Add `time' to arguments of call-back. 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.el: Register gnus-registry functions. * gnus-registry.el (gnus-try-warping-via-registry): Moved here and indent. * gnus-int.el (gnus-warp-to-article): Check whether the registry is enabled before warping. 2012-03-22 Dave Abrahams <dave@boostpro.com> * gnus-sum.el (gnus-summary-insert-subject): Record information in the registry about each article retrieved. * gnus-int.el (gnus-select-group-with-message-id): New function. (gnus-try-warping-via-registry): Ditto. (gnus-warp-to-article): Fall back on the registry. 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * nnimap.el (nnimap-fetch-partial-articles): Minor doc string fixup. 2012-03-22 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-msg.el (gnus-summary-resend-message-insert-gcc): Assume that gnus-gcc-self-resent-messages may be a group parameter. (gnus-summary-resend-message): Don't encode encoded words in header when Gcc'ing resent message. 2012-03-19 Lars Magne Ingebrigtsen <larsi@gnus.org> * shr.el (shr-insert): Treat non-breaking space just like normal space. This seems to produce more pleasing results. (shr-insert): Only insert a blank line if we're starting from an image. (shr-tag-br): Allow <br> to end lines or to make a single blank line. (shr-ensure-paragraph): Consider lines with white space to be blank. 2012-03-14 Christopher Schmidt <christopher@ch.ristopher.com> * gnus-msg.el (gnus-inews-do-gcc): Add gnus-gcc-pre-body-encode-hook and gnus-gcc-post-body-encode-hook. 2012-02-16 Lars Ingebrigtsen <larsi@gnus.org> * mm-decode.el (mm-dissect-singlepart): Guess what the type of application/octet-stream parts really is. * gnus-sum.el (gnus-propagate-marks): Remove. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * nntp.el (nntp-coding-system-for-read): Remove. (nntp-coding-system-for-write): Ditto. (nntp-open-connection): Just use `binary' directly. 2012-02-14 Teodor Zlatanov <tzz@lifelogs.com> * registry.el (registry-usage-test, registry-persistence-test): Move to tests/gnustest-registry.el. (registry-make-testable-db, registry-match-test) (registry-instantiation-test): Move to tests/gnustest-registry.el. * gnus-registry.el (gnus-registry-misc-test) (gnus-registry-usage-test): Move to tests/gnustest-registry.el. * tests/gnustest-registry.el: New file with the registry and gnus-registry ERT tests. 2012-02-13 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-msg.el (gnus-summary-resend-message): Make gnus-summary-resend-message-insert-gcc be last item in message-header-setup-hook. 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org> * nnfolder.el (nnfolder-marks-directory, nnfolder-marks-is-evil) (nnfolder-marks, nnfolder-marks-file-suffix) (nnfolder-marks-modtime): Remove. (nnfolder-open-server): Don't use marks. (nnfolder-request-delete-group): Ditto. (nnfolder-request-rename-group): Ditto. (nnfolder-request-set-mark, nnfolder-request-marks) (nnfolder-group-marks-pathname, nnfolder-marks-changed-p) (nnfolder-save-marks, nnfolder-open-marks): Remove. * nnml.el (nnml-marks-is-evil, nnml-marks-file-name, nnml-marks) (nnml-marks-modtime): Remove. (nnml-request-delete-group): Don't use marks. (nnml-request-rename-group): Ditto. (nnml-request-set-mark, nnml-request-marks, nnml-marks-changed-p) (nnml-save-marks, nnml-open-marks): Remove. * nntp.el (nntp-marks-is-evil, nntp-marks-file-name, nntp-marks) (nntp-marks-modtime, nntp-marks-directory, nntp-request-set-mark) (nntp-request-marks, nntp-marks-directory, nntp-marks-changed-p) (nntp-save-marks, nntp-open-marks, nntp-possibly-create-directory) (nntp-server-to-method-cache): Remove. * shr.el (shr-rescale-image): Fix wrong merge. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * shr.el (shr-remove-trailing-whitespace): Really delete the padding on too-wide lines. 2012-02-09 Lars Ingebrigtsen <larsi@gnus.org> * mm-archive.el (mm-archive-dissect-and-inline): New function. (mm-archive-dissect-and-inline): Fix up the undisplayer. * mm-decode.el (mm-display-external): Output the text from the command in the buffer after the command finished. This makes text-based commands behave better. 2012-02-07 Lars Ingebrigtsen <larsi@gnus.org> * message.el (smtpmail-smtp-user): Silence compiler warning. 2012-02-06 Lars Ingebrigtsen <larsi@gnus.org> * message.el (message-multi-smtp-send-mail): Also allow specifying the SMTP user name. 2012-02-06 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-sum.el (gnus-summary-article-map): Fix typo. 2012-02-02 Lars Ingebrigtsen <larsi@gnus.org> * message.el (message-multi-smtp-send-mail): New function. (message-multi-smtp-send-mail): Respect the X-Message-SMTP-Method header to implement multi-SMTP functionality. * gnus-agent.el (gnus-agent-send-mail-function): Removed. (gnus-agentize): Don't set it. (gnus-agent-send-mail): Don't use it. * gnus-sum.el (gnus-summary-widget-backward): New function and keystroke. * shr.el (shr-put-image): Remove underlines from sliced images. (shr-zoom-image): Compute the region to be replaced more correctly. 2012-02-02 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-msg.el (gnus-gcc-self-resent-messages): New user option. (gnus-summary-resend-message-insert-gcc): New function. (gnus-summary-resend-message): Modify message-header-setup-hook and message-sent-hook to make it work for Gcc. (gnus-inews-do-gcc): Update the number of unread articles of groups that messages are Gcc'd to. * message.el (message-resend): Run message-sent-hook to do Gcc. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-registry.el (gnus-registry-fixup-registry): Move the message to a higher level to silence compilation. * gnus-art.el (gnus-shr-put-image): Take and pass on a `flags' parameter to allow controlling the scaling. * shr.el (shr-zoom-image): New command and keystroke. (shr-put-image): Take a `size' flag to say how to scale the image. * mm-archive.el (mm-dissect-archive): Use it to get all file names. Use recursive deletion. (mm-dissect-archive): Add support for zip files. * gnus-util.el (gnus-recursive-directory-files): New function. * mm-archive.el (mm-archive-list-files): Inline text and image parts. (mm-archive-decoders): Add tgz support. * mm-decode.el (mm-shr): Make sure that the HTML ends with a newline. Otherwise inserting text into the Gnus buffer can look odd. * gnus-art.el (gnus-mime-inline-part): Slight clean-up. * mm-archive.el (mm-archive-decoders): Add support for tar. * gnus.el (gnus-logo-color-alist): Change the colours for Ma Gnus. * nnmail.el (nnmail-extra-headers): Add Cc to the default. 2012-01-31 Lars Ingebrigtsen <larsi@gnus.org> * mm-decode.el (mm-dissect-singlepart): Check that the decoder exists. * mm-archive.el: New file. * mm-decode.el (mm-dissect-singlepart): Use it to decode ms-tnef files. * mm-util.el (mm-find-buffer-file-coding-system): Comment fix. * message.el (message-goto-*): Make all the `message-goto-*' commands push the mark before moving point. This makes it easier to go back to where you came from after editing whatever you jumped to. 2012-01-07 Teodor Zlatanov <tzz@lifelogs.com> * gnus-sync.el (gnus-sync-newsrc-groups): Quote normally. (gnus-sync-lesync-pre-save-group-entry): Remove invalid invlists. (gnus-sync-lesync-normalize-group-entry): Ignore a few more keys. 2011-11-09 Teodor Zlatanov <tzz@lifelogs.com> * spam.el: Move BBDB autoloads. (spam-exists-in-BBDB-p): New function to do the BBDB search directly in BBDB 2 and 3. (spam-check-BBDB): Use it. (spam-enter-ham-BBDB): Use it. 2011-10-31 Peter Munster <pmrb@free.fr> (tiny change) * gnus-group.el (gnus-group-get-new-news): New parameter `one-level' for scanning exactly one level. * gnus-start.el (gnus-get-unread-articles): Ditto. 2011-11-03 Teodor Zlatanov <tzz@lifelogs.com> * gnus-sync.el: More commentary about setup. 2011-11-02 Teodor Zlatanov <tzz@lifelogs.com> * gnus-sync.el: More commentary about `gnus-sync-read' issues. 2011-10-31 Teodor Zlatanov <tzz@lifelogs.com> * gnus-sync.el: Improve docs about CouchDB admins. 2011-10-29 Teodor Zlatanov <tzz@lifelogs.com> * gnus-sync.el (gnus-sync-lesync-setup): Fix salt when user setup is not needed. Provide xmlplistread list function to produce XML plist output for non-Gnus LeSync clients. 2011-10-27 Teodor Zlatanov <tzz@lifelogs.com> * gnus-sync.el: Add LeSync synchronization backend and logic to read and save against it. Group subscriptions, read marks, other marks, subscription levels, topic names, and topic offsets (the group's position within the topic) are saved. This is an experimental backend and may change significantly. Load json.el from the gnus-fallback-lib if it's not available otherwise. (gnus-sync-save): Don't use `apply-partially' because of XEmacs. 2011-04-20 David Engster <dengste@eml.cc> * tests/gnustest-nntp.el: New file for simple NNTP testing.
2012-06-26 22:52:31 +00:00
If t, Gnus will fetch only the first part. If a string, it
will fetch all parts that have types that match that string. A
likely value would be \"text/\" to automatically fetch all
textual parts.")
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(defgroup nnimap nil
"IMAP for Gnus."
:group 'gnus)
(defcustom nnimap-request-articles-find-limit nil
"Limit the number of articles to look for after moving an article."
:type '(choice (const nil) integer)
:version "24.4"
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
:group 'nnimap)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defvar nnimap-process nil)
(defvar nnimap-status-string "")
(defvar nnimap-split-download-body-default nil
"Internal variable with default value for `nnimap-split-download-body'.")
(defvar nnimap-keepalive-timer nil)
(defvar nnimap-process-buffers nil)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defstruct nnimap
group process commands capabilities select-result newlinep server
last-command-time greeting examined stream-type initial-resync)
2000-09-19 13:40:08 +00:00
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defvar nnimap-object nil)
(defvar nnimap-mark-alist
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
'((read "\\Seen" %Seen)
(tick "\\Flagged" %Flagged)
(reply "\\Answered" %Answered)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(expire "gnus-expire")
(dormant "gnus-dormant")
(score "gnus-score")
(save "gnus-save")
(download "gnus-download")
(forward "gnus-forward")))
(defvar nnimap-quirks
'(("QRESYNC" "Zimbra" "QRESYNC ")))
(defvar nnimap-inhibit-logging nil)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-buffer ()
(nnimap-find-process-buffer nntp-server-buffer))
(defun nnimap-header-parameters ()
(format "(UID RFC822.SIZE BODYSTRUCTURE %s)"
(format
(if (nnimap-ver4-p)
"BODY.PEEK[HEADER.FIELDS %s]"
"RFC822.HEADER.LINES %s")
(append '(Subject From Date Message-Id
References In-Reply-To Xref)
nnmail-extra-headers))))
(deffoo nnimap-retrieve-headers (articles &optional group server fetch-old)
(when group
(setq group (nnimap-decode-gnus-group group)))
2000-09-19 13:40:08 +00:00
(with-current-buffer nntp-server-buffer
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(erase-buffer)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group group server)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(with-current-buffer (nnimap-buffer)
(erase-buffer)
(nnimap-wait-for-response
(nnimap-send-command
"UID FETCH %s %s"
(nnimap-article-ranges (gnus-compress-sequence articles))
(nnimap-header-parameters))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
t)
(nnimap-transform-headers)
(nnheader-remove-cr-followed-by-lf))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(insert-buffer-substring
(nnimap-find-process-buffer (current-buffer))))
'headers))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-transform-headers ()
(goto-char (point-min))
(let (article lines size string)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(block nil
(while (not (eobp))
(while (not (looking-at "\\* [0-9]+ FETCH"))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(delete-region (point) (progn (forward-line 1) (point)))
(when (eobp)
(return)))
(goto-char (match-end 0))
;; Unfold quoted {number} strings.
(while (re-search-forward
"[^]][ (]{\\([0-9]+\\)}\r?\n"
(save-excursion
;; Start of the header section.
(or (re-search-forward "] {[0-9]+}\r?\n" nil t)
;; Start of the next FETCH.
(re-search-forward "\\* [0-9]+ FETCH" nil t)
(point-max)))
t)
(setq size (string-to-number (match-string 1)))
(delete-region (+ (match-beginning 0) 2) (point))
(setq string (buffer-substring (point) (+ (point) size)))
(delete-region (point) (+ (point) size))
(insert (format "%S" (mm-subst-char-in-string ?\n ?\s string))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(beginning-of-line)
(setq article
(and (re-search-forward "UID \\([0-9]+\\)" (line-end-position)
t)
(match-string 1)))
(setq lines nil)
(setq size
(and (re-search-forward "RFC822.SIZE \\([0-9]+\\)"
(line-end-position)
t)
(match-string 1)))
(beginning-of-line)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(when (search-forward "BODYSTRUCTURE" (line-end-position) t)
(let ((structure (ignore-errors
(read (current-buffer)))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(while (and (consp structure)
(not (atom (car structure))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(setq structure (car structure)))
(setq lines (if (and
(stringp (car structure))
(equal (upcase (nth 0 structure)) "MESSAGE")
(equal (upcase (nth 1 structure)) "RFC822"))
(nth 9 structure)
(nth 7 structure)))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(delete-region (line-beginning-position) (line-end-position))
(insert (format "211 %s Article retrieved." article))
(forward-line 1)
(when size
(insert (format "Chars: %s\n" size)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(when lines
(insert (format "Lines: %s\n" lines)))
;; Most servers have a blank line after the headers, but
;; Davmail doesn't.
(unless (re-search-forward "^\r$\\|^)\r?$" nil t)
(goto-char (point-max)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(delete-region (line-beginning-position) (line-end-position))
(insert ".")
(forward-line 1)))))
(defun nnimap-unfold-quoted-lines ()
;; Unfold quoted {number} strings.
(let (size string)
(while (re-search-forward " {\\([0-9]+\\)}\r?\n" nil t)
(setq size (string-to-number (match-string 1)))
(delete-region (1+ (match-beginning 0)) (point))
(setq string (buffer-substring (point) (+ (point) size)))
(delete-region (point) (+ (point) size))
(insert (format "%S" string)))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-get-length ()
(and (re-search-forward "{\\([0-9]+\\)}" (line-end-position) t)
(string-to-number (match-string 1))))
(defun nnimap-article-ranges (ranges)
(let (result)
(cond
((numberp ranges)
(number-to-string ranges))
((numberp (cdr ranges))
(format "%d:%d" (car ranges) (cdr ranges)))
(t
(dolist (elem ranges)
(push
(if (consp elem)
(format "%d:%d" (car elem) (cdr elem))
(number-to-string elem))
result))
(mapconcat #'identity (nreverse result) ",")))))
(deffoo nnimap-open-server (server &optional defs no-reconnect)
2000-09-19 13:40:08 +00:00
(if (nnimap-server-opened server)
t
(unless (assq 'nnimap-address defs)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(setq defs (append defs (list (list 'nnimap-address server)))))
2000-09-19 13:40:08 +00:00
(nnoo-change-server 'nnimap server defs)
(if no-reconnect
(nnimap-find-connection nntp-server-buffer)
(or (nnimap-find-connection nntp-server-buffer)
(nnimap-open-connection nntp-server-buffer)))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-make-process-buffer (buffer)
(with-current-buffer
(generate-new-buffer (format " *nnimap %s %s %s*"
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
nnimap-address nnimap-server-port
(gnus-buffer-exists-p buffer)))
(mm-disable-multibyte)
(buffer-disable-undo)
(gnus-add-buffer)
(set (make-local-variable 'after-change-functions) nil)
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(set (make-local-variable 'nnimap-object)
(make-nnimap :server (nnoo-current-server 'nnimap)
:initial-resync 0))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(push (list buffer (current-buffer)) nnimap-connection-alist)
(push (current-buffer) nnimap-process-buffers)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(current-buffer)))
(defun nnimap-credentials (address ports user)
(let* ((auth-source-creation-prompts
'((user . "IMAP user at %h: ")
(secret . "IMAP password for %u@%h: ")))
(found (nth 0 (auth-source-search :max 1
:host address
:port ports
:user user
:require '(:user :secret)
:create t))))
Merge changes made in Gnus trunk. auth.texi (Overview, Help for users, Help for developers): Update docs. (Help for users): Talk about spaces. sieve-manage.el: Autoload `auth-source-search'. (sieve-sasl-auth): Use it. nnimap.el: Autoload `auth-source-forget+'. (nnimap-open-connection-1): Use it if the connection fails. auth-source.el: Require `password-cache'. (auth-source-hide-passwords, auth-source-cache): Remove and mark obsolete. (auth-source-magic): Marker for `password-cache' keys. (auth-source-do-cache): Update docstring. (auth-source-search): Use and check cache. (auth-source-forget-all-cached, auth-source-remember) (auth-source-recall, auth-source-forget, auth-source-forget+) (auth-source-specmatchp): Caching support functions. (auth-source-forget-user-or-password, auth-source-forget-all-cached): Remove and obsolete. (auth-source-user-or-password): Remove caching to further discourage using it. Always hide passwords. password-cache.el (password-cache-remove): Accept secrets that are not strings. mail-source.el: Autoload `auth-source-search'. (mail-source-keyword-map): Note order matters. (mail-source-set-1): Get all the mail-source source values and defaults and search auth-source on those if needed. This can all probably be simplified. nnimap.el: Autoload `auth-source-search'. (nnimap-credentials): Use it. (nnimap-open-connection-1): Ask for the virtual server and physical address in one shot. nntp.el: Autoload `auth-source-search'. (nntp-send-authinfo): Use it. Note TODO. auth-source.el (auth-source-secrets-search, auth-source-user-or-password): Use `append' instead of `nconc'. (auth-source-user-or-password): Build return list better and protect against nil :secret. auth-source.el (top): Require 'eieio unconditionally. Autoload `secrets-get-attributes' instead of `secrets-get-attribute'. (auth-source-secrets-search): Limit search when `max' is greater than number of results. auth-source.el (auth-source-secrets-search): Add examples. auth-source.el (auth-sources): Allow for simpler defaults for Secrets API with a string "secrets:collection-name" and with 'default. (auth-source-backend-parse): Parse "secrets:collection-name" and 'default. Recurse on parses instead of repeating code. Use the Secrets API is the source is not nil and 'ignore otherwise. Emit a message when ignoring a source. (auth-source-search): List ignored search keys at the top level. (auth-source-netrc-create): Use `case' instead of `cond'. (auth-source-secrets-search): Created with TODOs. (auth-source-secrets-create): Created with TODOs. (auth-source-retrieve, auth-source-create, auth-source-delete) (auth-source-protocol-defaults, auth-source-user-or-password-imap) (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh) (auth-source-user-or-password-sftp) (auth-source-user-or-password-smtp): Removed. (auth-source-user-or-password): Deprecated and modified to be a wrapper around `auth-source-search'. Not tested thoroughly. auth-source.el: Bring in assoc and eioeio libraries. (secrets-enabled): New variable to track the status of the Secrets API. (auth-source-backend): New EIOEIO class to represent a backend. (auth-source-creation-defaults): New variable to set prompt defaults during token creation (see the `auth-source-search' docstring for details). (auth-sources): Simplify to allow a simple string as a netrc backend spec. (auth-source-backend-parse): Parse a backend from an `auth-sources' spec. (auth-source-backend-parse-parameters): Fill in the backend parameters. (auth-source-search): Main auth-source API entry point. (auth-source-delete): Wrapper around `auth-source-search' for deletion. (auth-source-search-collection): Helper function for searching. (auth-source-netrc-parse, auth-source-netrc-normalize) (auth-source-netrc-search, auth-source-netrc-create): Netrc backend. Supports search, create, and delete. (auth-source-secrets-search, auth-source-secrets-create): Secrets API backend stubs. (auth-source-user-or-password): Call `auth-source-search' but it's not ready yet.
2011-02-13 00:25:29 +00:00
(if found
(list (plist-get found :user)
(let ((secret (plist-get found :secret)))
(if (functionp secret)
(funcall secret)
secret))
(plist-get found :save-function))
Merge changes made in Gnus trunk. auth.texi (Overview, Help for users, Help for developers): Update docs. (Help for users): Talk about spaces. sieve-manage.el: Autoload `auth-source-search'. (sieve-sasl-auth): Use it. nnimap.el: Autoload `auth-source-forget+'. (nnimap-open-connection-1): Use it if the connection fails. auth-source.el: Require `password-cache'. (auth-source-hide-passwords, auth-source-cache): Remove and mark obsolete. (auth-source-magic): Marker for `password-cache' keys. (auth-source-do-cache): Update docstring. (auth-source-search): Use and check cache. (auth-source-forget-all-cached, auth-source-remember) (auth-source-recall, auth-source-forget, auth-source-forget+) (auth-source-specmatchp): Caching support functions. (auth-source-forget-user-or-password, auth-source-forget-all-cached): Remove and obsolete. (auth-source-user-or-password): Remove caching to further discourage using it. Always hide passwords. password-cache.el (password-cache-remove): Accept secrets that are not strings. mail-source.el: Autoload `auth-source-search'. (mail-source-keyword-map): Note order matters. (mail-source-set-1): Get all the mail-source source values and defaults and search auth-source on those if needed. This can all probably be simplified. nnimap.el: Autoload `auth-source-search'. (nnimap-credentials): Use it. (nnimap-open-connection-1): Ask for the virtual server and physical address in one shot. nntp.el: Autoload `auth-source-search'. (nntp-send-authinfo): Use it. Note TODO. auth-source.el (auth-source-secrets-search, auth-source-user-or-password): Use `append' instead of `nconc'. (auth-source-user-or-password): Build return list better and protect against nil :secret. auth-source.el (top): Require 'eieio unconditionally. Autoload `secrets-get-attributes' instead of `secrets-get-attribute'. (auth-source-secrets-search): Limit search when `max' is greater than number of results. auth-source.el (auth-source-secrets-search): Add examples. auth-source.el (auth-sources): Allow for simpler defaults for Secrets API with a string "secrets:collection-name" and with 'default. (auth-source-backend-parse): Parse "secrets:collection-name" and 'default. Recurse on parses instead of repeating code. Use the Secrets API is the source is not nil and 'ignore otherwise. Emit a message when ignoring a source. (auth-source-search): List ignored search keys at the top level. (auth-source-netrc-create): Use `case' instead of `cond'. (auth-source-secrets-search): Created with TODOs. (auth-source-secrets-create): Created with TODOs. (auth-source-retrieve, auth-source-create, auth-source-delete) (auth-source-protocol-defaults, auth-source-user-or-password-imap) (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh) (auth-source-user-or-password-sftp) (auth-source-user-or-password-smtp): Removed. (auth-source-user-or-password): Deprecated and modified to be a wrapper around `auth-source-search'. Not tested thoroughly. auth-source.el: Bring in assoc and eioeio libraries. (secrets-enabled): New variable to track the status of the Secrets API. (auth-source-backend): New EIOEIO class to represent a backend. (auth-source-creation-defaults): New variable to set prompt defaults during token creation (see the `auth-source-search' docstring for details). (auth-sources): Simplify to allow a simple string as a netrc backend spec. (auth-source-backend-parse): Parse a backend from an `auth-sources' spec. (auth-source-backend-parse-parameters): Fill in the backend parameters. (auth-source-search): Main auth-source API entry point. (auth-source-delete): Wrapper around `auth-source-search' for deletion. (auth-source-search-collection): Helper function for searching. (auth-source-netrc-parse, auth-source-netrc-normalize) (auth-source-netrc-search, auth-source-netrc-create): Netrc backend. Supports search, create, and delete. (auth-source-secrets-search, auth-source-secrets-create): Secrets API backend stubs. (auth-source-user-or-password): Call `auth-source-search' but it's not ready yet.
2011-02-13 00:25:29 +00:00
nil)))
(defun nnimap-keepalive ()
(let ((now (current-time)))
(dolist (buffer nnimap-process-buffers)
(when (buffer-name buffer)
(with-current-buffer buffer
(when (and nnimap-object
(nnimap-last-command-time nnimap-object)
(> (gnus-float-time
(time-subtract
now
(nnimap-last-command-time nnimap-object)))
;; More than five minutes since the last command.
(* 5 60)))
(ignore-errors ;E.g. "buffer foo has no process".
(nnimap-send-command "NOOP"))))))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-open-connection (buffer)
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
;; Be backwards-compatible -- the earlier value of nnimap-stream was
;; `ssl' when nnimap-server-port was nil. Sort of.
(when (and nnimap-server-port
(eq nnimap-stream 'undecided))
(setq nnimap-stream 'ssl))
(let ((stream
(if (eq nnimap-stream 'undecided)
(loop for type in '(ssl network)
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
for stream = (let ((nnimap-stream type))
(nnimap-open-connection-1 buffer))
while (eq stream 'no-connect)
finally (return stream))
(nnimap-open-connection-1 buffer))))
(if (eq stream 'no-connect)
nil
stream)))
(defun nnimap-map-port (port)
(if (equal port "imaps")
"993"
port))
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
(defun nnimap-open-connection-1 (buffer)
(unless nnimap-keepalive-timer
(setq nnimap-keepalive-timer (run-at-time (* 60 15) (* 60 15)
#'nnimap-keepalive)))
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
(with-current-buffer (nnimap-make-process-buffer buffer)
(let* ((coding-system-for-read 'binary)
(coding-system-for-write 'binary)
(ports
(cond
((memq nnimap-stream '(network plain starttls))
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
(nnheader-message 7 "Opening connection to %s..."
nnimap-address)
'("imap" "143"))
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
((eq nnimap-stream 'shell)
(nnheader-message 7 "Opening connection to %s via shell..."
nnimap-address)
'("imap"))
((memq nnimap-stream '(ssl tls))
(nnheader-message 7 "Opening connection to %s via tls..."
nnimap-address)
'("imaps" "imap" "993" "143"))
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
(t
(error "Unknown stream type: %s" nnimap-stream))))
login-result credentials)
(when nnimap-server-port
(push nnimap-server-port ports))
Changes to open-protocol-stream, preparing for merging it with open-network-stream. * lisp/gnus/proto-stream.el: Changes preparatory to merging open-protocol-stream with open-network-stream. (proto-stream-always-use-starttls): Option removed. (open-protocol-stream): Return a process object by default. Provide a new parameter :return-list specifying a list-type return value, which now has the form (PROP . PLIST) instead of a fixed-length list. Change :type `network' to `try-starttls', and `network-only' to `default'. Make `default' the default, for compatibility with open-network-stream. Handle the no-parameter case exactly as open-network-stream, with no additional stream processing. Search plists using plist-get. Explicitly add :end-of-commend parameter if it is missing. (proto-stream-open-default): Renamed from proto-stream-open-network-only. Return 'default as the type. (proto-stream-open-starttls): Rename from proto-stream-open-network. Use plist-get. Don't return `tls' as the type if STARTTLS negotiation failed. Always return a list with a (possibly dead) process as the first element, for compatibility with open-network-stream. (proto-stream-open-tls): Use plist-get. Always return a list. (proto-stream-open-shell): Return `default' as connection type. (proto-stream-capability-open): Use plist-get. (proto-stream-eoc): Function deleted. * lisp/gnus/nnimap.el (nnimap-stream, nnimap-open-connection) (nnimap-open-connection-1): Handle renaming of :type parameter for open-protocol-stream. (nnimap-open-connection-1): Pass a :return-list parameter open-protocol-stream to obtain a list return value. Parse this list using plist-get. * lisp/gnus/nntp.el (nntp-open-connection): Handle renaming of :type parameter for open-protocol-stream. Accept open-protocol-stream return value that is a subprocess object instead of a list. Handle the case of a dead returned process.
2011-03-26 23:18:42 +00:00
(let* ((stream-list
(open-protocol-stream
"*nnimap*" (current-buffer) nnimap-address
(nnimap-map-port (car ports))
Changes to open-protocol-stream, preparing for merging it with open-network-stream. * lisp/gnus/proto-stream.el: Changes preparatory to merging open-protocol-stream with open-network-stream. (proto-stream-always-use-starttls): Option removed. (open-protocol-stream): Return a process object by default. Provide a new parameter :return-list specifying a list-type return value, which now has the form (PROP . PLIST) instead of a fixed-length list. Change :type `network' to `try-starttls', and `network-only' to `default'. Make `default' the default, for compatibility with open-network-stream. Handle the no-parameter case exactly as open-network-stream, with no additional stream processing. Search plists using plist-get. Explicitly add :end-of-commend parameter if it is missing. (proto-stream-open-default): Renamed from proto-stream-open-network-only. Return 'default as the type. (proto-stream-open-starttls): Rename from proto-stream-open-network. Use plist-get. Don't return `tls' as the type if STARTTLS negotiation failed. Always return a list with a (possibly dead) process as the first element, for compatibility with open-network-stream. (proto-stream-open-tls): Use plist-get. Always return a list. (proto-stream-open-shell): Return `default' as connection type. (proto-stream-capability-open): Use plist-get. (proto-stream-eoc): Function deleted. * lisp/gnus/nnimap.el (nnimap-stream, nnimap-open-connection) (nnimap-open-connection-1): Handle renaming of :type parameter for open-protocol-stream. (nnimap-open-connection-1): Pass a :return-list parameter open-protocol-stream to obtain a list return value. Parse this list using plist-get. * lisp/gnus/nntp.el (nntp-open-connection): Handle renaming of :type parameter for open-protocol-stream. Accept open-protocol-stream return value that is a subprocess object instead of a list. Handle the case of a dead returned process.
2011-03-26 23:18:42 +00:00
:type nnimap-stream
:warn-unless-encrypted t
Changes to open-protocol-stream, preparing for merging it with open-network-stream. * lisp/gnus/proto-stream.el: Changes preparatory to merging open-protocol-stream with open-network-stream. (proto-stream-always-use-starttls): Option removed. (open-protocol-stream): Return a process object by default. Provide a new parameter :return-list specifying a list-type return value, which now has the form (PROP . PLIST) instead of a fixed-length list. Change :type `network' to `try-starttls', and `network-only' to `default'. Make `default' the default, for compatibility with open-network-stream. Handle the no-parameter case exactly as open-network-stream, with no additional stream processing. Search plists using plist-get. Explicitly add :end-of-commend parameter if it is missing. (proto-stream-open-default): Renamed from proto-stream-open-network-only. Return 'default as the type. (proto-stream-open-starttls): Rename from proto-stream-open-network. Use plist-get. Don't return `tls' as the type if STARTTLS negotiation failed. Always return a list with a (possibly dead) process as the first element, for compatibility with open-network-stream. (proto-stream-open-tls): Use plist-get. Always return a list. (proto-stream-open-shell): Return `default' as connection type. (proto-stream-capability-open): Use plist-get. (proto-stream-eoc): Function deleted. * lisp/gnus/nnimap.el (nnimap-stream, nnimap-open-connection) (nnimap-open-connection-1): Handle renaming of :type parameter for open-protocol-stream. (nnimap-open-connection-1): Pass a :return-list parameter open-protocol-stream to obtain a list return value. Parse this list using plist-get. * lisp/gnus/nntp.el (nntp-open-connection): Handle renaming of :type parameter for open-protocol-stream. Accept open-protocol-stream return value that is a subprocess object instead of a list. Handle the case of a dead returned process.
2011-03-26 23:18:42 +00:00
:return-list t
:shell-command nnimap-shell-program
:capability-command "1 CAPABILITY\r\n"
:end-of-command "\r\n"
Changes to open-protocol-stream, preparing for merging it with open-network-stream. * lisp/gnus/proto-stream.el: Changes preparatory to merging open-protocol-stream with open-network-stream. (proto-stream-always-use-starttls): Option removed. (open-protocol-stream): Return a process object by default. Provide a new parameter :return-list specifying a list-type return value, which now has the form (PROP . PLIST) instead of a fixed-length list. Change :type `network' to `try-starttls', and `network-only' to `default'. Make `default' the default, for compatibility with open-network-stream. Handle the no-parameter case exactly as open-network-stream, with no additional stream processing. Search plists using plist-get. Explicitly add :end-of-commend parameter if it is missing. (proto-stream-open-default): Renamed from proto-stream-open-network-only. Return 'default as the type. (proto-stream-open-starttls): Rename from proto-stream-open-network. Use plist-get. Don't return `tls' as the type if STARTTLS negotiation failed. Always return a list with a (possibly dead) process as the first element, for compatibility with open-network-stream. (proto-stream-open-tls): Use plist-get. Always return a list. (proto-stream-open-shell): Return `default' as connection type. (proto-stream-capability-open): Use plist-get. (proto-stream-eoc): Function deleted. * lisp/gnus/nnimap.el (nnimap-stream, nnimap-open-connection) (nnimap-open-connection-1): Handle renaming of :type parameter for open-protocol-stream. (nnimap-open-connection-1): Pass a :return-list parameter open-protocol-stream to obtain a list return value. Parse this list using plist-get. * lisp/gnus/nntp.el (nntp-open-connection): Handle renaming of :type parameter for open-protocol-stream. Accept open-protocol-stream return value that is a subprocess object instead of a list. Handle the case of a dead returned process.
2011-03-26 23:18:42 +00:00
:success " OK "
:starttls-function
(lambda (capabilities)
(when (gnus-string-match-p "STARTTLS" capabilities)
"1 STARTTLS\r\n"))))
(stream (car stream-list))
(props (cdr stream-list))
(greeting (plist-get props :greeting))
(capabilities (plist-get props :capabilities))
(stream-type (plist-get props :type)))
(when (and stream (not (memq (process-status stream) '(open run))))
(setq stream nil))
(when (and (fboundp 'set-network-process-option) ;; Not in XEmacs.
(fboundp 'process-type) ;; Emacs 22 doesn't provide it.
(eq (process-type stream) 'network))
;; Use TCP-keepalive so that connections that pass through a NAT
;; router don't hang when left idle.
(set-network-process-option stream :keepalive t))
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
(setf (nnimap-process nnimap-object) stream)
(setf (nnimap-stream-type nnimap-object) stream-type)
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
(if (not stream)
(progn
(nnheader-report 'nnimap "Unable to contact %s:%s via %s"
nnimap-address (car ports) nnimap-stream)
Merge changes made in Gnus trunk. nnir.el: Batch header retrieval. proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols. nnimap.el (nnimap-open-connection): Use it. proto-stream.el (open-proto-stream): Complete the documentation. nnimap.el (nnimap-open-connection): Check for "OK" from the greeting. nntp.el: Use proto-streams for the relevant connections types. nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers. proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is. proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el. proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection. color.el (color-lab->srgb): Fix function call name. proto-stream.el: Fix the syntax in the comment. nntp.el (nntp-open-connection): Fix the STARTTLS command syntax. proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS. proto-stream.el (proto-stream-always-use-starttls): New variable. proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code. proto-stream.el (proto-stream-open-starttls): Folded back into the main function. proto-stream.el (proto-stream-command): Refactor out. nnimap.el (nnimap-stream): Change default to `undecided'. nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network. nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port. nnimap.el (nnimap-open-connection): Be more backwards-compatible. proto-stream.el (open-protocol-stream): Renamed from open-proto-stream. proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer. gnus.texi (Customizing the IMAP Connection): Note the new defaults. gnus.texi (Direct Functions): Note the STARTTLS upgrade. proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for. proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists. proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection. proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS. nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility). nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port. nntp.el (nntp-open-connection): Provide a :success condition. nnimap.el (nnimap-open-connection-1): Ditto. proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is. proto-stream.el (proto-stream-open-network): Add some comments. proto-stream.el: Fix example. proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade. nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching. nnir.el (nnir-ignore-newsgroups): Fix default value. nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4. mm-util.el (mm-delete-duplicates): Add comment. gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry. nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers. color.el: fix docstring to use English rather than math notation for intervals. shr.el (shr-find-fill-point): Don't break before apostrophes. nnir.el (nnir-request-move-article): Bail out if no move support in group. color.el (color-rgb->hsv): Fix docstring. nnir.el (nnir-get-active): Improve active list retrieval. shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes. gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil. nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p. nnimap.el (nnimap-open-connection-1): Fix PREAUTH. proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler. gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers. gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses. shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters. gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names. nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall. gnus-msg.el: Remove nastygram thing. message.el (message-from-style): Fix comment. message.el (message-user-organization): Do not use gnus-local-organization. gnus.el: Remove gnus-local-organization. rtree.el: New file to handle range trees. nnir.el, gnus-sum.el: Redo the way nnir handles registry updates. rtree.el (rtree-extract): Simplify. gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support. gnus-msg.el: Mark gnus-outgoing-message-group as obsolete. gnus.texi (Archived Messages): Remove gnus-outgoing-message-group. gnus-win.el (gnus-configure-frame): Remove old compatibility code. rtree.el (rtree-memq): Rewrite it as a non-recursive function. rtree.el (rtree-add, rtree-delq, rtree-length): Implement. rtree.el (rtree-add): Make code slightly faster. nnir.el: Allow modified summary-line-format in nnir summary buffers.
2010-12-02 22:21:31 +00:00
'no-connect)
(gnus-set-process-query-on-exit-flag stream nil)
(if (not (gnus-string-match-p "[*.] \\(OK\\|PREAUTH\\)" greeting))
(nnheader-report 'nnimap "%s" greeting)
;; Store the greeting (for debugging purposes).
(setf (nnimap-greeting nnimap-object) greeting)
(setf (nnimap-capabilities nnimap-object)
(mapcar #'upcase
(split-string capabilities)))
(unless (gnus-string-match-p "[*.] PREAUTH" greeting)
(if (not (setq credentials
(if (eq nnimap-authenticator 'anonymous)
(list "anonymous"
(message-make-address))
Merge changes made in Gnus trunk. auth.texi (Overview, Help for users, Help for developers): Update docs. (Help for users): Talk about spaces. sieve-manage.el: Autoload `auth-source-search'. (sieve-sasl-auth): Use it. nnimap.el: Autoload `auth-source-forget+'. (nnimap-open-connection-1): Use it if the connection fails. auth-source.el: Require `password-cache'. (auth-source-hide-passwords, auth-source-cache): Remove and mark obsolete. (auth-source-magic): Marker for `password-cache' keys. (auth-source-do-cache): Update docstring. (auth-source-search): Use and check cache. (auth-source-forget-all-cached, auth-source-remember) (auth-source-recall, auth-source-forget, auth-source-forget+) (auth-source-specmatchp): Caching support functions. (auth-source-forget-user-or-password, auth-source-forget-all-cached): Remove and obsolete. (auth-source-user-or-password): Remove caching to further discourage using it. Always hide passwords. password-cache.el (password-cache-remove): Accept secrets that are not strings. mail-source.el: Autoload `auth-source-search'. (mail-source-keyword-map): Note order matters. (mail-source-set-1): Get all the mail-source source values and defaults and search auth-source on those if needed. This can all probably be simplified. nnimap.el: Autoload `auth-source-search'. (nnimap-credentials): Use it. (nnimap-open-connection-1): Ask for the virtual server and physical address in one shot. nntp.el: Autoload `auth-source-search'. (nntp-send-authinfo): Use it. Note TODO. auth-source.el (auth-source-secrets-search, auth-source-user-or-password): Use `append' instead of `nconc'. (auth-source-user-or-password): Build return list better and protect against nil :secret. auth-source.el (top): Require 'eieio unconditionally. Autoload `secrets-get-attributes' instead of `secrets-get-attribute'. (auth-source-secrets-search): Limit search when `max' is greater than number of results. auth-source.el (auth-source-secrets-search): Add examples. auth-source.el (auth-sources): Allow for simpler defaults for Secrets API with a string "secrets:collection-name" and with 'default. (auth-source-backend-parse): Parse "secrets:collection-name" and 'default. Recurse on parses instead of repeating code. Use the Secrets API is the source is not nil and 'ignore otherwise. Emit a message when ignoring a source. (auth-source-search): List ignored search keys at the top level. (auth-source-netrc-create): Use `case' instead of `cond'. (auth-source-secrets-search): Created with TODOs. (auth-source-secrets-create): Created with TODOs. (auth-source-retrieve, auth-source-create, auth-source-delete) (auth-source-protocol-defaults, auth-source-user-or-password-imap) (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh) (auth-source-user-or-password-sftp) (auth-source-user-or-password-smtp): Removed. (auth-source-user-or-password): Deprecated and modified to be a wrapper around `auth-source-search'. Not tested thoroughly. auth-source.el: Bring in assoc and eioeio libraries. (secrets-enabled): New variable to track the status of the Secrets API. (auth-source-backend): New EIOEIO class to represent a backend. (auth-source-creation-defaults): New variable to set prompt defaults during token creation (see the `auth-source-search' docstring for details). (auth-sources): Simplify to allow a simple string as a netrc backend spec. (auth-source-backend-parse): Parse a backend from an `auth-sources' spec. (auth-source-backend-parse-parameters): Fill in the backend parameters. (auth-source-search): Main auth-source API entry point. (auth-source-delete): Wrapper around `auth-source-search' for deletion. (auth-source-search-collection): Helper function for searching. (auth-source-netrc-parse, auth-source-netrc-normalize) (auth-source-netrc-search, auth-source-netrc-create): Netrc backend. Supports search, create, and delete. (auth-source-secrets-search, auth-source-secrets-create): Secrets API backend stubs. (auth-source-user-or-password): Call `auth-source-search' but it's not ready yet.
2011-02-13 00:25:29 +00:00
;; Look for the credentials based on
;; the virtual server name and the address
(nnimap-credentials
(gnus-delete-duplicates
(list
(nnoo-current-server 'nnimap)
nnimap-address))
ports
nnimap-user))))
(setq nnimap-object nil)
(let ((nnimap-inhibit-logging t))
(setq login-result
(nnimap-login (car credentials) (cadr credentials))))
(if (car login-result)
Merge Gnus' changes. gnus.texi (Listing Groups): Document gnus-group-list-ticked. gssapi.el (open-gssapi-stream): Remove the last mentions of the IMAP stuff. gnus-score.el (gnus-score-string): Fix calling convention of `gnus-simplify-buffer-fuzzy' after last patches. gnus-sum.el (gnus-update-marks): Don't send any marks updates to the server for articles we didn't get any headers for. This is a sanity check. nnimap.el (nnimap-open-connection-1): Is the login responds with a new CAPABILITY, use it. gnus-agent.el (gnus-agent-fetch-headers): Don't message if we're not downloading anything. gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'. gnus.el (gnus-group-startup-message): Prefer svg file and replace colors. (gnus-splash-svg-color-symbols): New function. gnus-sum.el (gnus-simplify-buffer-fuzzy): Take the regexp explicitly instead of using the global gnus-simplify-subject-fuzzy-regexp. (gnus-simplify-subject-fuzzy): Use the local gnus-simplify-subject-fuzzy-regex instead of the global one. This makes using this variable in group parameters work. gnus-registry.el (gnus-registry-unfollowed-groups): Add "archive:sent" to the unfollowed group regex (for the recent Gnus archive:sent-YYYY-MM-DD groups). (gnus-registry-split-fancy-with-parent): Bail out early in sender tracking if there are more than `gnus-registry-max-track-groups' matches. message.el (message--yank-original-internal): New function to do the insertion cleanly inside eval in `message-yank-original'. (message-yank-original): Use it.
2011-03-30 14:59:42 +00:00
(progn
;; Save the credentials if a save function exists
;; (such a function will only be passed if a new
;; token was created).
Merge Gnus' changes. gnus.texi (Listing Groups): Document gnus-group-list-ticked. gssapi.el (open-gssapi-stream): Remove the last mentions of the IMAP stuff. gnus-score.el (gnus-score-string): Fix calling convention of `gnus-simplify-buffer-fuzzy' after last patches. gnus-sum.el (gnus-update-marks): Don't send any marks updates to the server for articles we didn't get any headers for. This is a sanity check. nnimap.el (nnimap-open-connection-1): Is the login responds with a new CAPABILITY, use it. gnus-agent.el (gnus-agent-fetch-headers): Don't message if we're not downloading anything. gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'. gnus.el (gnus-group-startup-message): Prefer svg file and replace colors. (gnus-splash-svg-color-symbols): New function. gnus-sum.el (gnus-simplify-buffer-fuzzy): Take the regexp explicitly instead of using the global gnus-simplify-subject-fuzzy-regexp. (gnus-simplify-subject-fuzzy): Use the local gnus-simplify-subject-fuzzy-regex instead of the global one. This makes using this variable in group parameters work. gnus-registry.el (gnus-registry-unfollowed-groups): Add "archive:sent" to the unfollowed group regex (for the recent Gnus archive:sent-YYYY-MM-DD groups). (gnus-registry-split-fancy-with-parent): Bail out early in sender tracking if there are more than `gnus-registry-max-track-groups' matches. message.el (message--yank-original-internal): New function to do the insertion cleanly inside eval in `message-yank-original'. (message-yank-original): Use it.
2011-03-30 14:59:42 +00:00
(when (functionp (nth 2 credentials))
(funcall (nth 2 credentials)))
;; See if CAPABILITY is set as part of login
;; response.
(dolist (response (cddr login-result))
(when (string= "CAPABILITY" (upcase (car response)))
(setf (nnimap-capabilities nnimap-object)
(mapcar #'upcase (cdr response))))))
;; If the login failed, then forget the credentials
;; that are now possibly cached.
(dolist (host (list (nnoo-current-server 'nnimap)
nnimap-address))
(dolist (port ports)
(auth-source-forget+ :host host :port port)))
(delete-process (nnimap-process nnimap-object))
(setq nnimap-object nil))))
(when nnimap-object
Merge changes made in Gnus trunk. nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set. gnus.el (gnus-group-startup-message): Move point to the start of the buffer. nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest. gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive. shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We"). gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter. gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections. gnus.el: Autoload gnus-article-fill-cited-long-lines. gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. gnus.texi (Paging the Article): Document C-u g/C-u C-u g. gnus-cite.el (gnus-article-foldable-buffer): Refactor out. gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge. gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness. gnus-srvr.el, nnir.el: Allow nnir searching for an entire server. gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles. gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place. nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging. nnimap.el (nnimap-wait-for-connection): Take a regexp. nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
2010-10-31 22:31:24 +00:00
(when (nnimap-capability "QRESYNC")
(nnimap-command "ENABLE QRESYNC"))
(nnheader-message 7 "Opening connection to %s...done"
nnimap-address)
2010-10-01 00:25:50 +00:00
(nnimap-process nnimap-object))))))))
(autoload 'rfc2104-hash "rfc2104")
(defun nnimap-login (user password)
(cond
;; Prefer plain LOGIN if it's enabled (since it requires fewer
;; round trips than CRAM-MD5, and it's less likely to be buggy),
;; and we're using an encrypted connection.
((and (not (nnimap-capability "LOGINDISABLED"))
(eq (nnimap-stream-type nnimap-object) 'tls)
(or (null nnimap-authenticator)
(eq nnimap-authenticator 'login)))
(nnimap-command "LOGIN %S %S" user password))
((and (nnimap-capability "AUTH=CRAM-MD5")
(or (null nnimap-authenticator)
(eq nnimap-authenticator 'cram-md5)))
(erase-buffer)
(let ((sequence (nnimap-send-command "AUTHENTICATE CRAM-MD5"))
(challenge (nnimap-wait-for-line "^\\+\\(.*\\)\n")))
(process-send-string
(get-buffer-process (current-buffer))
(concat
(base64-encode-string
(concat user " "
(rfc2104-hash 'md5 64 16 password
(base64-decode-string challenge))))
"\r\n"))
(nnimap-wait-for-response sequence)))
((and (not (nnimap-capability "LOGINDISABLED"))
(or (null nnimap-authenticator)
(eq nnimap-authenticator 'login)))
(nnimap-command "LOGIN %S %S" user password))
((and (nnimap-capability "AUTH=PLAIN")
(or (null nnimap-authenticator)
(eq nnimap-authenticator 'plain)))
(nnimap-command
"AUTHENTICATE PLAIN %s"
(base64-encode-string
(format "\000%s\000%s"
(nnimap-quote-specials user)
(nnimap-quote-specials password)))))))
(defun nnimap-quote-specials (string)
(with-temp-buffer
(insert string)
(goto-char (point-min))
(while (re-search-forward "[\\\"]" nil t)
(forward-char -1)
(insert "\\")
(forward-char 1))
(buffer-string)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-find-parameter (parameter elems)
(let (result)
(dolist (elem elems)
(cond
((equal (car elem) parameter)
(setq result (cdr elem)))
((and (equal (car elem) "OK")
(consp (cadr elem))
(equal (caadr elem) parameter))
(setq result (cdr (cadr elem))))))
result))
(deffoo nnimap-close-server (&optional server)
(when (nnoo-change-server 'nnimap server nil)
(ignore-errors
(delete-process (get-buffer-process (nnimap-buffer))))
(nnoo-close-server 'nnimap server)
t))
2000-09-19 13:40:08 +00:00
(deffoo nnimap-request-close ()
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
t)
(deffoo nnimap-server-opened (&optional server)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(and (nnoo-current-server-p 'nnimap server)
nntp-server-buffer
(gnus-buffer-live-p nntp-server-buffer)
(nnimap-find-connection nntp-server-buffer)))
2000-09-19 13:40:08 +00:00
(deffoo nnimap-status-message (&optional server)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
nnimap-status-string)
2000-09-19 13:40:08 +00:00
(deffoo nnimap-request-article (article &optional group server to-buffer)
(when group
(setq group (nnimap-decode-gnus-group group)))
2000-09-19 13:40:08 +00:00
(with-current-buffer nntp-server-buffer
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(let ((result (nnimap-change-group group server))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
parts structure)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(when (stringp article)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(setq article (nnimap-find-article-by-message-id group server article)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(when (and result
article)
(erase-buffer)
(with-current-buffer (nnimap-buffer)
(erase-buffer)
(when nnimap-fetch-partial-articles
(nnimap-command "UID FETCH %d (BODYSTRUCTURE)" article)
(goto-char (point-min))
(when (re-search-forward "FETCH.*BODYSTRUCTURE" nil t)
Merge changes made in Gnus trunk. nndraft.el (nndraft-request-expire-articles): Use the group name instead if "nndraft". gnus.texi (Using IMAP): Remove the @acronyms from the headings. nnregistry.el: Added. nnimap.el (nnimap-insert-partial-structure): Be way more permissive when interpreting the structures. GNUS-NEWS: Minor error in GNUS-NEWS - password-cache.el. nnimap.el (nnimap-request-accept-article): Add \r\n to the lines to make this work with Cyrus. gnus-registry.el: Don't prompt on load, which makes it impossible to build Gnus. gnus-gravatar.el: Add gnus-gravatar-properties. gnus-agent.el, gnus-art.el, gnus-bookmark.el, gnus-dired.el, gnus-group.el,\ gnus-int.el, gnus-msg.el, gnus-registry.el, gnus-score.el, gnus-srvr.el,\ gnus-sum.el, gnus-topic.el, gnus-util.el, gnus.el, mm-decode.el, mm-util.el,\ mm-view.el, mml-smime.el, mml.el, nnmairix.el, nnrss.el, smime.el:\ Introduce gnus-completing-read. gnus-util.el: Make completing-read function configurable. gnus-util.el: Add requires and fix history for iswitchb. webmail.el: Remove netscape/my-deja, since they no longer exist. gnus.el (gnus-local-domain): Declare variable obsolete. nnimap.el (nnimap-insert-partial-structure): Get the type from the correct slot, too. pop3.el (pop3-send-streaming-command, pop3-stream-length): New variable. nnimap.el (nnimap-open-connection): Revert the auto-network->starttls code. nnimap.el (nnimap-request-set-mark): Erase the buffer before issuing commands. nnimap.el (nnimap-split-rule): Mark as obsolete. gnus-sum.el (gnus-valid-move-group-p): Make sure that `group' is a symbol. nnimap.el (nnimap-split-incoming-mail): Allow `default' as nnimap-split-methods value. nnimap.el (nnimap-request-article): Downcase the NILs so that they are nil. nndoc.el (nndoc-retrieve-groups): New function. gnus.texi: Fix Gravatar documentation.
2010-09-30 08:39:23 +00:00
(setq structure (ignore-errors
(let ((start (point)))
(forward-sexp 1)
(downcase-region start (point))
(goto-char start)
Merge changes made in Gnus trunk. nndraft.el (nndraft-request-expire-articles): Use the group name instead if "nndraft". gnus.texi (Using IMAP): Remove the @acronyms from the headings. nnregistry.el: Added. nnimap.el (nnimap-insert-partial-structure): Be way more permissive when interpreting the structures. GNUS-NEWS: Minor error in GNUS-NEWS - password-cache.el. nnimap.el (nnimap-request-accept-article): Add \r\n to the lines to make this work with Cyrus. gnus-registry.el: Don't prompt on load, which makes it impossible to build Gnus. gnus-gravatar.el: Add gnus-gravatar-properties. gnus-agent.el, gnus-art.el, gnus-bookmark.el, gnus-dired.el, gnus-group.el,\ gnus-int.el, gnus-msg.el, gnus-registry.el, gnus-score.el, gnus-srvr.el,\ gnus-sum.el, gnus-topic.el, gnus-util.el, gnus.el, mm-decode.el, mm-util.el,\ mm-view.el, mml-smime.el, mml.el, nnmairix.el, nnrss.el, smime.el:\ Introduce gnus-completing-read. gnus-util.el: Make completing-read function configurable. gnus-util.el: Add requires and fix history for iswitchb. webmail.el: Remove netscape/my-deja, since they no longer exist. gnus.el (gnus-local-domain): Declare variable obsolete. nnimap.el (nnimap-insert-partial-structure): Get the type from the correct slot, too. pop3.el (pop3-send-streaming-command, pop3-stream-length): New variable. nnimap.el (nnimap-open-connection): Revert the auto-network->starttls code. nnimap.el (nnimap-request-set-mark): Erase the buffer before issuing commands. nnimap.el (nnimap-split-rule): Mark as obsolete. gnus-sum.el (gnus-valid-move-group-p): Make sure that `group' is a symbol. nnimap.el (nnimap-split-incoming-mail): Allow `default' as nnimap-split-methods value. nnimap.el (nnimap-request-article): Downcase the NILs so that they are nil. nndoc.el (nndoc-retrieve-groups): New function. gnus.texi: Fix Gravatar documentation.
2010-09-30 08:39:23 +00:00
(read (current-buffer))))
parts (nnimap-find-wanted-parts structure))))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(when (if parts
(nnimap-get-partial-article article parts structure)
(nnimap-get-whole-article article))
(let ((buffer (current-buffer)))
(with-current-buffer (or to-buffer nntp-server-buffer)
(nnheader-insert-buffer-substring buffer)
(nnheader-ms-strip-cr)))
(cons group article)))))))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(deffoo nnimap-request-head (article &optional group server to-buffer)
(when group
(setq group (nnimap-decode-gnus-group group)))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group group server)
(with-current-buffer (nnimap-buffer)
(when (stringp article)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(setq article (nnimap-find-article-by-message-id group server article)))
(if (null article)
nil
(nnimap-get-whole-article
article (format "UID FETCH %%d %s"
(nnimap-header-parameters)))
(let ((buffer (current-buffer)))
(with-current-buffer (or to-buffer nntp-server-buffer)
(erase-buffer)
(insert-buffer-substring buffer)
(nnheader-ms-strip-cr)
(cons group article)))))))
Merge from Gnus git master 2014-03-14 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-sum.el (gnus-summary-toggle-header): Display header attachment buttons when toggling the header off. 2014-03-07 Daiki Ueno <ueno@gnu.org> * mml2015.el (mml2015-use): Don't check the availability of GnuPG commands here; instead, only check if epg-config.el is available. 2014-03-06 Lars Ingebrigtsen <larsi@gnus.org> * mml.el (mml-expand-html-into-multipart-related): Allow sending HTML messages with embedded images. (mml-generate-mime): Don't bug out if you don't have libxml. 2014-03-06 Lars Ingebrigtsen <larsi@gnus.org> * message.el (message-make-html-message-with-image-files): New command. 2014-03-05 Lars Ingebrigtsen <larsi@gnus.org> * mml.el (mml-insert-mime-headers): Allow `recipient-filename'. 2014-02-23 David Engster <deng@randomsample.de> * auth-source.el (auth-source-netrc-saver): Do not depend on `cl-lib' to stay compatible with older Emacsen, so replace `cl-loop' with `loop'. 2014-02-17 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-art.el (gnus-article-prepare, gnus-article-prepare-display): Display header attachment buttons by gnus-article-prepare-display rather than gnus-article-prepare so as to view in mml-preview as well. 2014-02-10 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-art.el (gnus-article-goto-part): Find a button in the body first. (gnus-mime-buttonize-attachments-in-header): Number hidden buttons. 2014-02-07 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-art.el (gnus-mime-buttonize-attachments-in-header): Display buttons that are hidden in unselected alternative part as well. (gnus-mime-display-alternative): Redraw attachment buttons in header. * gmm-utils.el (gmm-labels): Add edebug spec. 2014-02-07 Lars Ingebrigtsen <larsi@gnus.org> * gnus-srvr.el (gnus-server-toggle-cloud-server): New command and keystroke. (gnus-server-toggle-cloud-server): Only allow clouding applicable types. 2014-02-05 Katsumi Yamaoka <yamaoka@jpl.org> * gnus.el (gnus-copy-overlay, gnus-overlays-at): New functions. * gnus-art.el (gnus-mime-display-attachment-buttons-in-header): New user option. (gnus-mime-buttonize-attachments-in-header): New function. (gnus-article-prepare): Use it. (gnus-mime-inline-part): Suppress extra newline. (gnus-mm-display-part): Save excursion; remove useless deleting and adding of buttons. (gnus-insert-mime-button): Allow insertion in the middle of a line. * gnus-sum.el (gnus-summary-wash-mime-map, gnus-summary-article-menu): Add gnus-mime-buttonize-attachments-in-header. 2014-02-05 Lars Ingebrigtsen <larsi@gnus.org> * nnimap.el (nnimap-request-articles): New command to download several articles at once. * gnus.el (gnus-variable-list): Save Cloud variables. 2014-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-cloud.el: New file to provide the Emacs Cloud. * gravatar.el (gravatar-retrieve-synchronously): XEmacs also has `url-retrieve-synchronously', apparently. * gnus-notifications.el (gravatar-retrieve-synchronously): Declare for XEmacs. * nnrss.el (libxml-parse-html-region): Silence compilation error. 2014-02-01 Daniel Dehennin <daniel.dehennin@baby-gnu.org> * gnus-mlspl.el (gnus-group-split-fancy): Use `gnus-parameters' in `gnus-group-split-fancy'. 2014-02-01 Lars Ingebrigtsen <larsi@gnus.org> * message.el (message-remove-header): Doc fix. (message-forward-included-headers): New variable. (message-remove-ignored-headers): Use it. 2014-01-31 Dave Abrahams <dave@boostpro.com> * gnus-sum.el (gnus-summary-open-group-with-article): New command. 2013-09-04 Rasmus Pank Roulund <emacs@pank.eu> * gnus-fun.el (gnus-x-face-omit-files): Regexp to omit matched results from random face commands. (gnus-face-directory): Like `gnus-x-face-directory` for png files and Face. (gnus-face-omit-files): Like `gnus-x-face-omit-files` for Face. (gnus--random-face-with-type): Generic function returning a face-type as a string. (gnus--insert-random-face-with-type): Generic function inserting a face in a message buffer header. (gnus-random-x-face): Rewritten to use `gnus--random-face-with-type`. (gnus-insert-random-x-face-header): Rewritten to use `gnus--insert-random-face-with-type`. (gnus-random-face): Return random (png) Face as string. (nus-insert-random-face-header): Insert random (png) Face in a message buffer. 2014-01-31 Lars Ingebrigtsen <larsi@gnus.org> * mm-url.el: Remove all usage of w3. * nnrss.el: Ditto. * mm-decode.el: Ditto. * mm-view.el: Ditto. * gnus-setup.el: Remove outdated file.
2014-03-23 23:13:36 +00:00
(deffoo nnimap-request-articles (articles &optional group server)
(when group
(setq group (nnimap-decode-gnus-group group)))
(with-current-buffer nntp-server-buffer
(let ((result (nnimap-change-group group server)))
(when result
(erase-buffer)
(with-current-buffer (nnimap-buffer)
(erase-buffer)
(when (nnimap-command
(if (nnimap-ver4-p)
"UID FETCH %s BODY.PEEK[]"
"UID FETCH %s RFC822.PEEK")
(nnimap-article-ranges (gnus-compress-sequence articles)))
(let ((buffer (current-buffer)))
(with-current-buffer nntp-server-buffer
(nnheader-insert-buffer-substring buffer)
(nnheader-ms-strip-cr)))
t))))))
(defun nnimap-get-whole-article (article &optional command)
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(let ((result
(nnimap-command
(or command
(if (nnimap-ver4-p)
"UID FETCH %d BODY.PEEK[]"
"UID FETCH %d RFC822.PEEK"))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
article)))
;; Check that we really got an article.
(goto-char (point-min))
(unless (re-search-forward "\\* [0-9]+ FETCH" nil t)
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(setq result nil))
(when result
;; Remove any data that may have arrived before the FETCH data.
(beginning-of-line)
(unless (bobp)
(delete-region (point-min) (point)))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(let ((bytes (nnimap-get-length)))
(delete-region (line-beginning-position)
(progn (forward-line 1) (point)))
(goto-char (+ (point) bytes))
(delete-region (point) (point-max)))
t)))
Merge changes made in Gnus trunk. nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set. gnus.el (gnus-group-startup-message): Move point to the start of the buffer. nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest. gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive. shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We"). gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter. gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections. gnus.el: Autoload gnus-article-fill-cited-long-lines. gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. gnus.texi (Paging the Article): Document C-u g/C-u C-u g. gnus-cite.el (gnus-article-foldable-buffer): Refactor out. gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge. gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness. gnus-srvr.el, nnir.el: Allow nnir searching for an entire server. gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles. gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place. nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging. nnimap.el (nnimap-wait-for-connection): Take a regexp. nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
2010-10-31 22:31:24 +00:00
(defun nnimap-capability (capability)
(member capability (nnimap-capabilities nnimap-object)))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(defun nnimap-ver4-p ()
Merge changes made in Gnus trunk. nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set. gnus.el (gnus-group-startup-message): Move point to the start of the buffer. nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest. gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive. shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We"). gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter. gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections. gnus.el: Autoload gnus-article-fill-cited-long-lines. gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. gnus.texi (Paging the Article): Document C-u g/C-u C-u g. gnus-cite.el (gnus-article-foldable-buffer): Refactor out. gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge. gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness. gnus-srvr.el, nnir.el: Allow nnir searching for an entire server. gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles. gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place. nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging. nnimap.el (nnimap-wait-for-connection): Take a regexp. nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
2010-10-31 22:31:24 +00:00
(nnimap-capability "IMAP4REV1"))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(defun nnimap-get-partial-article (article parts structure)
(let ((result
(nnimap-command
"UID FETCH %d (%s %s)"
article
(if (nnimap-ver4-p)
"BODY.PEEK[HEADER]"
"RFC822.HEADER")
(if (nnimap-ver4-p)
(mapconcat (lambda (part)
(format "BODY.PEEK[%s]" part))
parts " ")
(mapconcat (lambda (part)
(format "RFC822.PEEK[%s]" part))
parts " ")))))
(when result
(nnimap-convert-partial-article structure))))
(defun nnimap-convert-partial-article (structure)
;; First just skip past the headers.
(goto-char (point-min))
(let ((bytes (nnimap-get-length))
id parts)
;; Delete "FETCH" line.
(delete-region (line-beginning-position)
(progn (forward-line 1) (point)))
(goto-char (+ (point) bytes))
;; Collect all the body parts.
(while (looking-at ".*BODY\\[\\([.0-9]+\\)\\]")
(setq id (match-string 1)
bytes (or (nnimap-get-length) 0))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(beginning-of-line)
(delete-region (point) (progn (forward-line 1) (point)))
(push (list id (buffer-substring (point) (+ (point) bytes)))
parts)
(delete-region (point) (+ (point) bytes)))
;; Delete trailing junk.
(delete-region (point) (point-max))
;; Now insert all the parts again where they fit in the structure.
(nnimap-insert-partial-structure structure parts)
t))
(defun nnimap-insert-partial-structure (structure parts &optional subp)
Merge changes made in Gnus trunk. nndraft.el (nndraft-request-expire-articles): Use the group name instead if "nndraft". gnus.texi (Using IMAP): Remove the @acronyms from the headings. nnregistry.el: Added. nnimap.el (nnimap-insert-partial-structure): Be way more permissive when interpreting the structures. GNUS-NEWS: Minor error in GNUS-NEWS - password-cache.el. nnimap.el (nnimap-request-accept-article): Add \r\n to the lines to make this work with Cyrus. gnus-registry.el: Don't prompt on load, which makes it impossible to build Gnus. gnus-gravatar.el: Add gnus-gravatar-properties. gnus-agent.el, gnus-art.el, gnus-bookmark.el, gnus-dired.el, gnus-group.el,\ gnus-int.el, gnus-msg.el, gnus-registry.el, gnus-score.el, gnus-srvr.el,\ gnus-sum.el, gnus-topic.el, gnus-util.el, gnus.el, mm-decode.el, mm-util.el,\ mm-view.el, mml-smime.el, mml.el, nnmairix.el, nnrss.el, smime.el:\ Introduce gnus-completing-read. gnus-util.el: Make completing-read function configurable. gnus-util.el: Add requires and fix history for iswitchb. webmail.el: Remove netscape/my-deja, since they no longer exist. gnus.el (gnus-local-domain): Declare variable obsolete. nnimap.el (nnimap-insert-partial-structure): Get the type from the correct slot, too. pop3.el (pop3-send-streaming-command, pop3-stream-length): New variable. nnimap.el (nnimap-open-connection): Revert the auto-network->starttls code. nnimap.el (nnimap-request-set-mark): Erase the buffer before issuing commands. nnimap.el (nnimap-split-rule): Mark as obsolete. gnus-sum.el (gnus-valid-move-group-p): Make sure that `group' is a symbol. nnimap.el (nnimap-split-incoming-mail): Allow `default' as nnimap-split-methods value. nnimap.el (nnimap-request-article): Downcase the NILs so that they are nil. nndoc.el (nndoc-retrieve-groups): New function. gnus.texi: Fix Gravatar documentation.
2010-09-30 08:39:23 +00:00
(let (type boundary)
(let ((bstruc structure))
(while (consp (car bstruc))
(pop bstruc))
(setq type (car bstruc))
(setq bstruc (car (cdr bstruc)))
(let ((has-boundary (member "boundary" bstruc)))
(when has-boundary
(setq boundary (cadr has-boundary)))))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(when subp
(insert (format "Content-type: multipart/%s; boundary=%S\n\n"
(downcase type) boundary)))
(while (not (stringp (car structure)))
(insert "\n--" boundary "\n")
(if (consp (caar structure))
(nnimap-insert-partial-structure (pop structure) parts t)
(let ((bit (pop structure)))
(insert (format "Content-type: %s/%s"
(downcase (nth 0 bit))
(downcase (nth 1 bit))))
(if (member-ignore-case "CHARSET" (nth 2 bit))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(insert (format
"; charset=%S\n"
(cadr (member-ignore-case "CHARSET" (nth 2 bit)))))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(insert "\n"))
(insert (format "Content-transfer-encoding: %s\n"
(nth 5 bit)))
(insert "\n")
(when (assoc (nth 9 bit) parts)
(insert (cadr (assoc (nth 9 bit) parts)))))))
(insert "\n--" boundary "--\n")))
Merge changes made in Gnus trunk. mail-parse.el (mail-header-encode-parameter): Define as rfc2045-encode-string. nnheader.el (nnheader-insert-nov): Protect against junk appearing in the extra mail headers. gnus-html.el: Prefetch and html washing additions. gnus-html.el (gnus-html-prefetch-images): Fix up the url-retrieve calling conventions so that prefetch doesn't bug out. Pass proper format strings to gnus-message. nnimap.el: Allow anonymous login. nnimap.el (nnimap-transform-headers): The chars header is called Chars not Bytes. nnimap.el (nnimap-wait-for-response): Don't infloop if the IMAP connection drops. gnus-start.el (gnus-get-unread-articles): Call `gnus-open-server' on each method before trying to scan them etc. gnus-sum.el (gnus-summary-update-mark): Replace subst-char-in-region by subst-char-in-region. gnus.el (gnus-similar-server-opened): Refactor a bit and add comments. gnus.el: Fix a speed regression based in methods that were similar weren't the same. gnus.el (gnus): When using the development version of Gnus, load the gnus-load file. nnimap.el (nnimap-open-connection): When looking for credentials, also use the nnimap-server-port. nnimap.el (nnimap-request-article): Return the group/article number, so that Gnus `^' works as expected. nnimap.el (nnimap-find-wanted-parts-1): Return the MIME parts as IMAP wants them. gnus-start.el (gnus-ignored-newsgroups): Remove [] from the list of bogus characters. gnus-html.el (gnus-html-image-fetched): Protect against the data not arriving. nnimap.el (nnimap-wait-for-connection): Avoid a race condition while waiting for the connection string. gnus.texi (Required Back End Functions): Document INFO.
2010-09-20 00:36:54 +00:00
(defun nnimap-find-wanted-parts (structure)
(message-flatten-list (nnimap-find-wanted-parts-1 structure "")))
(defun nnimap-find-wanted-parts-1 (structure prefix)
(let ((num 1)
parts)
(while (consp (car structure))
(let ((sub (pop structure)))
(if (consp (car sub))
(push (nnimap-find-wanted-parts-1
sub (if (string= prefix "")
(number-to-string num)
(format "%s.%s" prefix num)))
parts)
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(let ((type (format "%s/%s" (nth 0 sub) (nth 1 sub)))
(id (if (string= prefix "")
Merge changes made in Gnus trunk. mail-parse.el (mail-header-encode-parameter): Define as rfc2045-encode-string. nnheader.el (nnheader-insert-nov): Protect against junk appearing in the extra mail headers. gnus-html.el: Prefetch and html washing additions. gnus-html.el (gnus-html-prefetch-images): Fix up the url-retrieve calling conventions so that prefetch doesn't bug out. Pass proper format strings to gnus-message. nnimap.el: Allow anonymous login. nnimap.el (nnimap-transform-headers): The chars header is called Chars not Bytes. nnimap.el (nnimap-wait-for-response): Don't infloop if the IMAP connection drops. gnus-start.el (gnus-get-unread-articles): Call `gnus-open-server' on each method before trying to scan them etc. gnus-sum.el (gnus-summary-update-mark): Replace subst-char-in-region by subst-char-in-region. gnus.el (gnus-similar-server-opened): Refactor a bit and add comments. gnus.el: Fix a speed regression based in methods that were similar weren't the same. gnus.el (gnus): When using the development version of Gnus, load the gnus-load file. nnimap.el (nnimap-open-connection): When looking for credentials, also use the nnimap-server-port. nnimap.el (nnimap-request-article): Return the group/article number, so that Gnus `^' works as expected. nnimap.el (nnimap-find-wanted-parts-1): Return the MIME parts as IMAP wants them. gnus-start.el (gnus-ignored-newsgroups): Remove [] from the list of bogus characters. gnus-html.el (gnus-html-image-fetched): Protect against the data not arriving. nnimap.el (nnimap-wait-for-connection): Avoid a race condition while waiting for the connection string. gnus.texi (Required Back End Functions): Document INFO.
2010-09-20 00:36:54 +00:00
(number-to-string num)
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(format "%s.%s" prefix num))))
(setcar (nthcdr 9 sub) id)
(when (if (eq nnimap-fetch-partial-articles t)
(equal id "1")
(string-match nnimap-fetch-partial-articles type))
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(push id parts))))
(incf num)))
Merge changes made in Gnus trunk. mail-parse.el (mail-header-encode-parameter): Define as rfc2045-encode-string. nnheader.el (nnheader-insert-nov): Protect against junk appearing in the extra mail headers. gnus-html.el: Prefetch and html washing additions. gnus-html.el (gnus-html-prefetch-images): Fix up the url-retrieve calling conventions so that prefetch doesn't bug out. Pass proper format strings to gnus-message. nnimap.el: Allow anonymous login. nnimap.el (nnimap-transform-headers): The chars header is called Chars not Bytes. nnimap.el (nnimap-wait-for-response): Don't infloop if the IMAP connection drops. gnus-start.el (gnus-get-unread-articles): Call `gnus-open-server' on each method before trying to scan them etc. gnus-sum.el (gnus-summary-update-mark): Replace subst-char-in-region by subst-char-in-region. gnus.el (gnus-similar-server-opened): Refactor a bit and add comments. gnus.el: Fix a speed regression based in methods that were similar weren't the same. gnus.el (gnus): When using the development version of Gnus, load the gnus-load file. nnimap.el (nnimap-open-connection): When looking for credentials, also use the nnimap-server-port. nnimap.el (nnimap-request-article): Return the group/article number, so that Gnus `^' works as expected. nnimap.el (nnimap-find-wanted-parts-1): Return the MIME parts as IMAP wants them. gnus-start.el (gnus-ignored-newsgroups): Remove [] from the list of bogus characters. gnus-html.el (gnus-html-image-fetched): Protect against the data not arriving. nnimap.el (nnimap-wait-for-connection): Avoid a race condition while waiting for the connection string. gnus.texi (Required Back End Functions): Document INFO.
2010-09-20 00:36:54 +00:00
(nreverse parts)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-decode-gnus-group (group)
(decode-coding-string group 'utf-8))
(deffoo nnimap-request-group (group &optional server dont-check info)
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(let ((result (nnimap-change-group
;; Don't SELECT the group if we're going to select it
;; later, anyway.
(if (and (not dont-check)
(assoc group nnimap-current-infos))
nil
group)
server))
articles active marks high low)
(with-current-buffer nntp-server-buffer
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(when result
(if (and dont-check
(setq active (nth 2 (assoc group nnimap-current-infos))))
(insert (format "211 %d %d %d %S\n"
(- (cdr active) (car active))
(car active)
(cdr active)
group))
(with-current-buffer (nnimap-buffer)
(erase-buffer)
(let ((group-sequence
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(nnimap-send-command "SELECT %S" (utf7-encode group t)))
(flag-sequence
(nnimap-send-command "UID FETCH 1:* FLAGS")))
(setf (nnimap-group nnimap-object) group)
(nnimap-wait-for-response flag-sequence)
(setq marks
(nnimap-flags-to-marks
(nnimap-parse-flags
(list (list group-sequence flag-sequence
1 group "SELECT")))))
(when (and info
marks)
(nnimap-update-infos marks (list info))
(nnimap-store-info info (gnus-active (gnus-info-group info))))
(goto-char (point-max))
(let ((uidnext (nth 5 (car marks))))
Merge changes made in Gnus trunk. gnus-registry.el: Fix and extend header docs. Move the nnregistry feature check. nnimap.el (nnimap-update-info): Ignore groups that have no UIDNEXT values. nnimap.el: Implement nnimap-request-newgroups. gnus-group.el (gnus-group-completing-read): Return the symbol name, not the value from the collection. nnimap.el: Don't error out on empty non-UIDNEXT groups. nnmail.el (nnmail-article-group): Allow using the fancy split method directly. gnus.el (gnus-continuum-version): Make inactive, since it doesn't really message anything to the user. gnus-msg.el (gnus-summary-resend-message): When resending, don't externalize attachments. gnus.el (gnus-large-newsgroup): Mention gnus-large-ephemeral-newsgroup. gnus-sum.el (gnus-summary-scroll-up): Add more documentation. message.el (message-shorten-references): Comment on the number "21". mm-encode.el (mm-content-transfer-encoding-defaults): Try to make the documentation clearer. ChangeLog: jidanni -> Dan Jacobson. nnmbox.el (nnmbox-read-mbox): Mark buffer for deletion on Gnus exit. gnus-sum.el, gnus-win.el: Change the `h' command to only show the article buffer. gnus-art.el (gnus-summary-save-in-file, gnus-summary-save-in-rmail): Use with-current-buffer instead of gnus-eval-in-buffer-window to avoid popping up frames. gnus-sum.el (gnus-summary-clear-local-variables): Removed. gnus-async.el (gnus-async-delete-prefetched-entry): Remove from hash table, too. gnus-async.el: Try to keep the async hash table size reasonable. nndoc.el (nndoc-type-alist): Do babyl before mime-parts. gnus-start.el (gnus-check-bogus-newsgroups): Say how many groups we're being queried about.
2010-10-01 23:08:25 +00:00
(setq high (or (if uidnext
(1- uidnext)
(nth 3 (car marks)))
0)
low (or (nth 4 (car marks)) uidnext 1)))))
(erase-buffer)
(insert
(format
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
"211 %d %d %d %S\n" (1+ (- high low)) low high group)))
t))))
(deffoo nnimap-request-create-group (group &optional server args)
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group nil server)
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(with-current-buffer (nnimap-buffer)
(car (nnimap-command "CREATE %S" (utf7-encode group t))))))
2000-09-19 13:40:08 +00:00
(deffoo nnimap-request-delete-group (group &optional force server)
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group nil server)
(with-current-buffer (nnimap-buffer)
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(car (nnimap-command "DELETE %S" (utf7-encode group t))))))
(deffoo nnimap-request-rename-group (group new-name &optional server)
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group nil server)
(with-current-buffer (nnimap-buffer)
(nnimap-unselect-group)
(car (nnimap-command "RENAME %S %S"
(utf7-encode group t) (utf7-encode new-name t))))))
(defun nnimap-unselect-group ()
;; Make sure we don't have this group open read/write by asking
;; to examine a mailbox that doesn't exist. This seems to be
;; the only way that allows us to reliably go back to unselected
;; state on Courier.
(nnimap-command "EXAMINE DOES.NOT.EXIST"))
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(deffoo nnimap-request-expunge-group (group &optional server)
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group group server)
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(with-current-buffer (nnimap-buffer)
(car (nnimap-command "EXPUNGE")))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-get-flags (spec)
(let ((articles nil)
elems end)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(with-current-buffer (nnimap-buffer)
2000-09-19 13:40:08 +00:00
(erase-buffer)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(nnimap-wait-for-response (nnimap-send-command
"UID FETCH %s FLAGS" spec))
(setq end (point))
(subst-char-in-region (point-min) (point-max)
?\\ ?% t)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(goto-char (point-min))
(while (search-forward " FETCH " end t)
(setq elems (read (current-buffer)))
(push (cons (cadr (memq 'UID elems))
(cadr (memq 'FLAGS elems)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
articles)))
(nreverse articles)))
2003-02-04 13:24:35 +00:00
(deffoo nnimap-close-group (group &optional server)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
t)
2000-09-19 13:40:08 +00:00
(deffoo nnimap-request-move-article (article group server accept-form
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
&optional last internal-move-group)
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when internal-move-group
(setq internal-move-group (nnimap-decode-gnus-group internal-move-group)))
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(with-temp-buffer
(mm-disable-multibyte)
(when (funcall (if internal-move-group
'nnimap-request-head
'nnimap-request-article)
article group server (current-buffer))
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
;; If the move is internal (on the same server), just do it the easy
;; way.
(let ((message-id (message-field-value "message-id")))
(if internal-move-group
(let ((result
(with-current-buffer (nnimap-buffer)
(nnimap-command "UID COPY %d %S"
article
(utf7-encode internal-move-group t)))))
(when (car result)
(nnimap-delete-article article)
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(cons internal-move-group
(or (nnimap-find-uid-response "COPYUID" (cadr result))
(nnimap-find-article-by-message-id
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
internal-move-group server message-id
nnimap-request-articles-find-limit)))))
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
;; Move the article to a different method.
(let ((result (eval accept-form)))
(when result
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(nnimap-change-group group server)
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(nnimap-delete-article article)
result)))))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(deffoo nnimap-request-expire-articles (articles group &optional server force)
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(cond
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
((null articles)
nil)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
((not (nnimap-change-group group server))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
articles)
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
((and force
(eq nnmail-expiry-target 'delete))
(unless (nnimap-delete-article (gnus-compress-sequence articles))
(nnheader-message 7 "Article marked for deletion, but not expunged."))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
nil)
(t
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(let ((deletable-articles
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(if (or force
(eq nnmail-expiry-wait 'immediate))
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
articles
(gnus-sorted-intersection
articles
(nnimap-find-expired-articles group)))))
(if (null deletable-articles)
articles
(if (eq nnmail-expiry-target 'delete)
(nnimap-delete-article (gnus-compress-sequence deletable-articles))
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(setq deletable-articles
(nnimap-process-expiry-targets
deletable-articles group server)))
;; Return the articles we didn't delete.
(gnus-sorted-complement articles deletable-articles))))))
(defun nnimap-process-expiry-targets (articles group server)
(let ((deleted-articles nil))
Merge changes made in Gnus trunk. nnir.el (nnir-categorize): Replace mapcar with mapc. shr.el (shr-urlify): Display the title in <a> tags. shr.el (shr-urlify): Show the URL before the title to avoid misleading URLs. gnus-sum.el (gnus-summary-show-article): Reverse the meanings of `C-u C-u g' and `C-u g' so that `C-u g' does what it traditionally did. gnus.texi (Paging the Article): Note the reverse meanings of `C-u C-u g'. gnus-html.el (gnus-html-put-image): Use widget instead of local maps so that TAB works. nnir.el (nnir-run-gmane): Use more careful test for gmane nntp server. nnimap.el (nnimap-process-expiry-targets): Avoid downloading articles unless necessary. gnus-util.el (gnus-output-to-mail): Require nnmail before using nnmail variables. shr.el (shr-stylesheet): New dynamic variable for cascading the styles. (shr-colorize-region): New function. (shr-insert-background-overlay): Remove. (shr-render-td): Background setting should be taken care of on a higher level. (shr-tag-body): Use post-hoc colorizations. (shr-descend): Only render color/background when they change. (shr-tag-body): Set up a style sheet based on bgcolor/fgcolor. (shr-put-color-1): Don't overwrite old colors. (shr-colorize-region): When the background color isn't explicit, use a fixed background. gnus.el (gnus-valid-select-methods): Allow nnimap to respool. nntp.el (nntp-snarf-error-message): nnheader-report takes a format string as the parameter. gnus-sum.el (gnus-summary-respool-article): The completion function expects a list instead of an alist.
2010-12-05 22:17:34 +00:00
(cond
;; shortcut further processing if we're going to delete the articles
((eq nnmail-expiry-target 'delete)
(setq deleted-articles articles)
t)
;; or just move them to another folder on the same IMAP server
((and (not (functionp nnmail-expiry-target))
(gnus-server-equal (gnus-group-method nnmail-expiry-target)
(gnus-server-to-method
(format "nnimap:%s" server))))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(and (nnimap-change-group group server)
Merge changes made in Gnus trunk. nnir.el (nnir-categorize): Replace mapcar with mapc. shr.el (shr-urlify): Display the title in <a> tags. shr.el (shr-urlify): Show the URL before the title to avoid misleading URLs. gnus-sum.el (gnus-summary-show-article): Reverse the meanings of `C-u C-u g' and `C-u g' so that `C-u g' does what it traditionally did. gnus.texi (Paging the Article): Note the reverse meanings of `C-u C-u g'. gnus-html.el (gnus-html-put-image): Use widget instead of local maps so that TAB works. nnir.el (nnir-run-gmane): Use more careful test for gmane nntp server. nnimap.el (nnimap-process-expiry-targets): Avoid downloading articles unless necessary. gnus-util.el (gnus-output-to-mail): Require nnmail before using nnmail variables. shr.el (shr-stylesheet): New dynamic variable for cascading the styles. (shr-colorize-region): New function. (shr-insert-background-overlay): Remove. (shr-render-td): Background setting should be taken care of on a higher level. (shr-tag-body): Use post-hoc colorizations. (shr-descend): Only render color/background when they change. (shr-tag-body): Set up a style sheet based on bgcolor/fgcolor. (shr-put-color-1): Don't overwrite old colors. (shr-colorize-region): When the background color isn't explicit, use a fixed background. gnus.el (gnus-valid-select-methods): Allow nnimap to respool. nntp.el (nntp-snarf-error-message): nnheader-report takes a format string as the parameter. gnus-sum.el (gnus-summary-respool-article): The completion function expects a list instead of an alist.
2010-12-05 22:17:34 +00:00
(with-current-buffer (nnimap-buffer)
(nnheader-message 7 "Expiring articles from %s: %s" group articles)
(nnimap-command
"UID COPY %s %S"
(nnimap-article-ranges (gnus-compress-sequence articles))
(utf7-encode (gnus-group-real-name nnmail-expiry-target) t))
(setq deleted-articles articles)))
t)
(t
(dolist (article articles)
(let ((target nnmail-expiry-target))
(with-temp-buffer
(mm-disable-multibyte)
(when (nnimap-request-article article group server (current-buffer))
(when (functionp target)
(setq target (funcall target group)))
(if (and target
(not (eq target 'delete)))
(if (or (gnus-request-group target t)
(gnus-request-create-group target))
(progn
(nnmail-expiry-target-group target group)
(nnheader-message 7 "Expiring article %s:%d to %s"
group article target))
(setq target nil))
(nnheader-message 7 "Expiring article %s:%d" group article))
Merge changes made in Gnus trunk. nnir.el (nnir-categorize): Replace mapcar with mapc. shr.el (shr-urlify): Display the title in <a> tags. shr.el (shr-urlify): Show the URL before the title to avoid misleading URLs. gnus-sum.el (gnus-summary-show-article): Reverse the meanings of `C-u C-u g' and `C-u g' so that `C-u g' does what it traditionally did. gnus.texi (Paging the Article): Note the reverse meanings of `C-u C-u g'. gnus-html.el (gnus-html-put-image): Use widget instead of local maps so that TAB works. nnir.el (nnir-run-gmane): Use more careful test for gmane nntp server. nnimap.el (nnimap-process-expiry-targets): Avoid downloading articles unless necessary. gnus-util.el (gnus-output-to-mail): Require nnmail before using nnmail variables. shr.el (shr-stylesheet): New dynamic variable for cascading the styles. (shr-colorize-region): New function. (shr-insert-background-overlay): Remove. (shr-render-td): Background setting should be taken care of on a higher level. (shr-tag-body): Use post-hoc colorizations. (shr-descend): Only render color/background when they change. (shr-tag-body): Set up a style sheet based on bgcolor/fgcolor. (shr-put-color-1): Don't overwrite old colors. (shr-colorize-region): When the background color isn't explicit, use a fixed background. gnus.el (gnus-valid-select-methods): Allow nnimap to respool. nntp.el (nntp-snarf-error-message): nnheader-report takes a format string as the parameter. gnus-sum.el (gnus-summary-respool-article): The completion function expects a list instead of an alist.
2010-12-05 22:17:34 +00:00
(when target
(push article deleted-articles))))))
(setq deleted-articles (nreverse deleted-articles))))
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
;; Change back to the current group again.
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(nnimap-change-group group server)
(nnimap-delete-article (gnus-compress-sequence deleted-articles))
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
deleted-articles))
(defun nnimap-find-expired-articles (group)
(let ((cutoff (nnmail-expired-article-p group nil nil)))
(with-current-buffer (nnimap-buffer)
(let ((result
(nnimap-command
"UID SEARCH SENTBEFORE %s"
(format-time-string
(format "%%d-%s-%%Y"
(upcase
(car (rassoc (nth 4 (decode-time cutoff))
parse-time-months))))
cutoff))))
(and (car result)
(delete 0 (mapcar #'string-to-number
(cdr (assoc "SEARCH" (cdr result))))))))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(defun nnimap-find-article-by-message-id (group server message-id
&optional limit)
"Search for message with MESSAGE-ID in GROUP from SERVER.
If LIMIT, first try to limit the search to the N last articles."
2010-10-01 00:25:50 +00:00
(with-current-buffer (nnimap-buffer)
(erase-buffer)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(let* ((change-group-result (nnimap-change-group group server nil t))
(number-of-article
(and (listp change-group-result)
(catch 'found
(dolist (result (cdr change-group-result))
(when (equal "EXISTS" (cadr result))
(throw 'found (car result)))))))
(sequence
(nnimap-send-command
"UID SEARCH%s HEADER Message-Id %S"
(if (and limit number-of-article)
;; The -1 is because IMAP message
;; numbers are one-based rather than
;; zero-based.
(format " %s:*" (- (string-to-number number-of-article)
limit -1))
"")
message-id)))
(when (nnimap-wait-for-response sequence)
(let ((article (car (last (cdr (assoc "SEARCH"
(nnimap-parse-response)))))))
(if article
(string-to-number article)
(when (and limit number-of-article)
(nnimap-find-article-by-message-id group server message-id))))))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-delete-article (articles)
(with-current-buffer (nnimap-buffer)
(nnimap-command "UID STORE %s +FLAGS.SILENT (\\Deleted)"
(nnimap-article-ranges articles))
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(cond
Merge changes made in Gnus trunk. nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set. gnus.el (gnus-group-startup-message): Move point to the start of the buffer. nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest. gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive. shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We"). gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter. gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections. gnus.el: Autoload gnus-article-fill-cited-long-lines. gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. gnus.texi (Paging the Article): Document C-u g/C-u C-u g. gnus-cite.el (gnus-article-foldable-buffer): Refactor out. gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge. gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness. gnus-srvr.el, nnir.el: Allow nnir searching for an entire server. gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles. gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place. nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging. nnimap.el (nnimap-wait-for-connection): Take a regexp. nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
2010-10-31 22:31:24 +00:00
((nnimap-capability "UIDPLUS")
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(nnimap-command "UID EXPUNGE %s"
(nnimap-article-ranges articles))
t)
(nnimap-expunge
(nnimap-command "EXPUNGE")
t)
(t (gnus-message 7 (concat "nnimap: nnimap-expunge is not set and the "
"server doesn't support UIDPLUS, so we won't "
"delete this article now"))))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(deffoo nnimap-request-scan (&optional group server)
(when group
(setq group (nnimap-decode-gnus-group group)))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (and (nnimap-change-group nil server)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
nnimap-inbox
nnimap-split-methods)
(nnheader-message 7 "nnimap %s splitting mail..." server)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(if (listp nnimap-inbox)
(dolist (nnimap-inbox nnimap-inbox)
(nnimap-split-incoming-mail))
(nnimap-split-incoming-mail))
(nnheader-message 7 "nnimap %s splitting mail...done" server)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-marks-to-flags (marks)
(let (flags flag)
(dolist (mark marks)
(when (setq flag (cadr (assq mark nnimap-mark-alist)))
(push flag flags)))
flags))
(deffoo nnimap-request-update-group-status (group status &optional server)
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group nil server)
(let ((command (assoc
status
'((subscribe "SUBSCRIBE")
(unsubscribe "UNSUBSCRIBE")))))
(when command
(with-current-buffer (nnimap-buffer)
(nnimap-command "%s %S" (cadr command) (utf7-encode group t)))))))
(deffoo nnimap-request-set-mark (group actions &optional server)
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group group server)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(let (sequence)
(with-current-buffer (nnimap-buffer)
Merge changes made in Gnus trunk. nndraft.el (nndraft-request-expire-articles): Use the group name instead if "nndraft". gnus.texi (Using IMAP): Remove the @acronyms from the headings. nnregistry.el: Added. nnimap.el (nnimap-insert-partial-structure): Be way more permissive when interpreting the structures. GNUS-NEWS: Minor error in GNUS-NEWS - password-cache.el. nnimap.el (nnimap-request-accept-article): Add \r\n to the lines to make this work with Cyrus. gnus-registry.el: Don't prompt on load, which makes it impossible to build Gnus. gnus-gravatar.el: Add gnus-gravatar-properties. gnus-agent.el, gnus-art.el, gnus-bookmark.el, gnus-dired.el, gnus-group.el,\ gnus-int.el, gnus-msg.el, gnus-registry.el, gnus-score.el, gnus-srvr.el,\ gnus-sum.el, gnus-topic.el, gnus-util.el, gnus.el, mm-decode.el, mm-util.el,\ mm-view.el, mml-smime.el, mml.el, nnmairix.el, nnrss.el, smime.el:\ Introduce gnus-completing-read. gnus-util.el: Make completing-read function configurable. gnus-util.el: Add requires and fix history for iswitchb. webmail.el: Remove netscape/my-deja, since they no longer exist. gnus.el (gnus-local-domain): Declare variable obsolete. nnimap.el (nnimap-insert-partial-structure): Get the type from the correct slot, too. pop3.el (pop3-send-streaming-command, pop3-stream-length): New variable. nnimap.el (nnimap-open-connection): Revert the auto-network->starttls code. nnimap.el (nnimap-request-set-mark): Erase the buffer before issuing commands. nnimap.el (nnimap-split-rule): Mark as obsolete. gnus-sum.el (gnus-valid-move-group-p): Make sure that `group' is a symbol. nnimap.el (nnimap-split-incoming-mail): Allow `default' as nnimap-split-methods value. nnimap.el (nnimap-request-article): Downcase the NILs so that they are nil. nndoc.el (nndoc-retrieve-groups): New function. gnus.texi: Fix Gravatar documentation.
2010-09-30 08:39:23 +00:00
(erase-buffer)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
;; Just send all the STORE commands without waiting for
;; response. If they're successful, they're successful.
(dolist (action actions)
(destructuring-bind (range action marks) action
(let ((flags (nnimap-marks-to-flags marks)))
(when flags
(setq sequence (nnimap-send-command
"UID STORE %s %sFLAGS.SILENT (%s)"
(nnimap-article-ranges range)
(cond
((eq action 'del) "-")
((eq action 'add) "+")
((eq action 'set) ""))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(mapconcat #'identity flags " ")))))))
;; Wait for the last command to complete to avoid later
2011-11-20 02:29:42 +00:00
;; synchronization problems with the stream.
(when sequence
(nnimap-wait-for-response sequence))))))
2003-02-04 13:24:35 +00:00
2000-09-19 13:40:08 +00:00
(deffoo nnimap-request-accept-article (group &optional server last)
(unless group
;; We're respooling. Find out where mail splitting would place
;; this article.
(setq group
(caar
(nnmail-article-group
`(lambda (group)
(nnml-active-number group ,server))))))
(setq group (nnimap-decode-gnus-group group))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group nil server)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(nnmail-check-syntax)
2010-10-01 00:25:50 +00:00
(let ((message-id (message-field-value "message-id"))
sequence message)
(nnimap-add-cr)
(setq message (buffer-substring-no-properties (point-min) (point-max)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(with-current-buffer (nnimap-buffer)
(when (setq message (or (nnimap-process-quirk "OK Gimap " 'append message)
message))
;; If we have this group open read-only, then unselect it
;; before appending to it.
(when (equal (nnimap-examined nnimap-object) group)
(nnimap-unselect-group))
(erase-buffer)
(setq sequence (nnimap-send-command
"APPEND %S {%d}" (utf7-encode group t)
(length message)))
(unless nnimap-streaming
(nnimap-wait-for-connection "^[+]"))
(process-send-string (get-buffer-process (current-buffer)) message)
(process-send-string (get-buffer-process (current-buffer))
(if (nnimap-newlinep nnimap-object)
"\n"
"\r\n"))
(let ((result (nnimap-get-response sequence)))
(if (not (nnimap-ok-p result))
(progn
(nnheader-report 'nnimap "%s" result)
nil)
(cons group
(or (nnimap-find-uid-response "APPENDUID" (car result))
(nnimap-find-article-by-message-id
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
group server message-id
nnimap-request-articles-find-limit))))))))))
(defun nnimap-process-quirk (greeting-match type data)
(when (and (nnimap-greeting nnimap-object)
(string-match greeting-match (nnimap-greeting nnimap-object))
(eq type 'append)
(string-match "\000" data))
(let ((choice (gnus-multiple-choice
"Message contains NUL characters. Delete, continue, abort? "
'((?d "Delete NUL characters")
(?c "Try to APPEND the message as is")
(?a "Abort")))))
(cond
((eq choice ?a)
(nnheader-report 'nnimap "Aborted APPEND due to NUL characters"))
((eq choice ?c)
data)
(t
(with-temp-buffer
(insert data)
(goto-char (point-min))
(while (search-forward "\000" nil t)
(replace-match "" t t))
(buffer-string)))))))
(defun nnimap-ok-p (value)
(and (consp value)
(consp (car value))
(equal (caar value) "OK")))
(defun nnimap-find-uid-response (name list)
(let ((result (car (last (nnimap-find-response-element name list)))))
(and result
(string-to-number result))))
(defun nnimap-find-response-element (name list)
(let (result)
(dolist (elem list)
(when (and (consp elem)
(equal name (car elem)))
(setq result elem)))
result))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(deffoo nnimap-request-replace-article (article group buffer)
(setq group (nnimap-decode-gnus-group group))
(let (group-art)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (and (nnimap-change-group group)
;; Put the article into the group.
(with-current-buffer buffer
(setq group-art
(nnimap-request-accept-article group nil t))))
(nnimap-delete-article (list article))
;; Return the new article number.
(cdr group-art))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-add-cr ()
(goto-char (point-min))
(while (re-search-forward "\r?\n" nil t)
(replace-match "\r\n" t t)))
(defun nnimap-get-groups ()
(erase-buffer)
(let ((sequence (nnimap-send-command "LIST \"\" \"*\""))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
groups)
(nnimap-wait-for-response sequence)
(subst-char-in-region (point-min) (point-max)
?\\ ?% t)
(goto-char (point-min))
(nnimap-unfold-quoted-lines)
(goto-char (point-min))
(while (search-forward "* LIST " nil t)
(let ((flags (read (current-buffer)))
(separator (read (current-buffer)))
(group (read (current-buffer))))
(unless (member '%NoSelect flags)
(push (utf7-decode (if (stringp group)
group
(format "%s" group)) t)
groups))))
(nreverse groups)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(defun nnimap-get-responses (sequences)
(let (responses)
(dolist (sequence sequences)
(goto-char (point-min))
(when (re-search-forward (format "^%d " sequence) nil t)
(push (list sequence (nnimap-parse-response))
responses)))
responses))
(deffoo nnimap-request-list (&optional server)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group nil server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(let ((groups
(with-current-buffer (nnimap-buffer)
(nnimap-get-groups)))
sequences responses)
(when groups
(with-current-buffer (nnimap-buffer)
(setf (nnimap-group nnimap-object) nil)
(dolist (group groups)
(setf (nnimap-examined nnimap-object) group)
(push (list (nnimap-send-command "EXAMINE %S"
(utf7-encode group t))
group)
sequences))
(nnimap-wait-for-response (caar sequences))
(setq responses
(nnimap-get-responses (mapcar #'car sequences))))
(dolist (response responses)
(let* ((sequence (car response))
(response (cadr response))
(group (cadr (assoc sequence sequences)))
(egroup (encode-coding-string group 'utf-8)))
(when (and group
(equal (caar response) "OK"))
(let ((uidnext (nnimap-find-parameter "UIDNEXT" response))
highest exists)
(dolist (elem response)
(when (equal (cadr elem) "EXISTS")
(setq exists (string-to-number (car elem)))))
(when uidnext
(setq highest (1- (string-to-number (car uidnext)))))
(cond
((null highest)
(insert (format "%S 0 1 y\n" egroup)))
((zerop exists)
;; Empty group.
(insert (format "%S %d %d y\n" egroup
highest (1+ highest))))
(t
;; Return the widest possible range.
(insert (format "%S %d 1 y\n" egroup
(or highest exists)))))))))
t)))))
2000-09-19 13:40:08 +00:00
Merge changes made in Gnus trunk. gnus-registry.el: Fix and extend header docs. Move the nnregistry feature check. nnimap.el (nnimap-update-info): Ignore groups that have no UIDNEXT values. nnimap.el: Implement nnimap-request-newgroups. gnus-group.el (gnus-group-completing-read): Return the symbol name, not the value from the collection. nnimap.el: Don't error out on empty non-UIDNEXT groups. nnmail.el (nnmail-article-group): Allow using the fancy split method directly. gnus.el (gnus-continuum-version): Make inactive, since it doesn't really message anything to the user. gnus-msg.el (gnus-summary-resend-message): When resending, don't externalize attachments. gnus.el (gnus-large-newsgroup): Mention gnus-large-ephemeral-newsgroup. gnus-sum.el (gnus-summary-scroll-up): Add more documentation. message.el (message-shorten-references): Comment on the number "21". mm-encode.el (mm-content-transfer-encoding-defaults): Try to make the documentation clearer. ChangeLog: jidanni -> Dan Jacobson. nnmbox.el (nnmbox-read-mbox): Mark buffer for deletion on Gnus exit. gnus-sum.el, gnus-win.el: Change the `h' command to only show the article buffer. gnus-art.el (gnus-summary-save-in-file, gnus-summary-save-in-rmail): Use with-current-buffer instead of gnus-eval-in-buffer-window to avoid popping up frames. gnus-sum.el (gnus-summary-clear-local-variables): Removed. gnus-async.el (gnus-async-delete-prefetched-entry): Remove from hash table, too. gnus-async.el: Try to keep the async hash table size reasonable. nndoc.el (nndoc-type-alist): Do babyl before mime-parts. gnus-start.el (gnus-check-bogus-newsgroups): Say how many groups we're being queried about.
2010-10-01 23:08:25 +00:00
(deffoo nnimap-request-newgroups (date &optional server)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group nil server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(dolist (group (with-current-buffer (nnimap-buffer)
(nnimap-get-groups)))
(unless (assoc group nnimap-current-infos)
;; Insert dummy numbers here -- they don't matter.
(insert (format "%S 0 1 y\n" (encode-coding-string group 'utf-8)))))
t)))
Merge changes made in Gnus trunk. gnus-registry.el: Fix and extend header docs. Move the nnregistry feature check. nnimap.el (nnimap-update-info): Ignore groups that have no UIDNEXT values. nnimap.el: Implement nnimap-request-newgroups. gnus-group.el (gnus-group-completing-read): Return the symbol name, not the value from the collection. nnimap.el: Don't error out on empty non-UIDNEXT groups. nnmail.el (nnmail-article-group): Allow using the fancy split method directly. gnus.el (gnus-continuum-version): Make inactive, since it doesn't really message anything to the user. gnus-msg.el (gnus-summary-resend-message): When resending, don't externalize attachments. gnus.el (gnus-large-newsgroup): Mention gnus-large-ephemeral-newsgroup. gnus-sum.el (gnus-summary-scroll-up): Add more documentation. message.el (message-shorten-references): Comment on the number "21". mm-encode.el (mm-content-transfer-encoding-defaults): Try to make the documentation clearer. ChangeLog: jidanni -> Dan Jacobson. nnmbox.el (nnmbox-read-mbox): Mark buffer for deletion on Gnus exit. gnus-sum.el, gnus-win.el: Change the `h' command to only show the article buffer. gnus-art.el (gnus-summary-save-in-file, gnus-summary-save-in-rmail): Use with-current-buffer instead of gnus-eval-in-buffer-window to avoid popping up frames. gnus-sum.el (gnus-summary-clear-local-variables): Removed. gnus-async.el (gnus-async-delete-prefetched-entry): Remove from hash table, too. gnus-async.el: Try to keep the async hash table size reasonable. nndoc.el (nndoc-type-alist): Do babyl before mime-parts. gnus-start.el (gnus-check-bogus-newsgroups): Say how many groups we're being queried about.
2010-10-01 23:08:25 +00:00
(deffoo nnimap-retrieve-group-data-early (server infos)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (and (nnimap-change-group nil server)
infos)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(with-current-buffer (nnimap-buffer)
(erase-buffer)
(setf (nnimap-group nnimap-object) nil)
(setf (nnimap-initial-resync nnimap-object) 0)
Merge changes made in Gnus trunk. nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set. gnus.el (gnus-group-startup-message): Move point to the start of the buffer. nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest. gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive. shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We"). gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter. gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections. gnus.el: Autoload gnus-article-fill-cited-long-lines. gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. gnus.texi (Paging the Article): Document C-u g/C-u C-u g. gnus-cite.el (gnus-article-foldable-buffer): Refactor out. gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge. gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness. gnus-srvr.el, nnir.el: Allow nnir searching for an entire server. gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles. gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place. nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging. nnimap.el (nnimap-wait-for-connection): Take a regexp. nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
2010-10-31 22:31:24 +00:00
(let ((qresyncp (nnimap-capability "QRESYNC"))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
params groups sequences active uidvalidity modseq group
unexist)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
;; Go through the infos and gather the data needed to know
;; what and how to request the data.
(dolist (info infos)
(setq params (gnus-info-params info)
group (nnimap-decode-gnus-group
(gnus-group-real-name (gnus-info-group info)))
active (cdr (assq 'active params))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
unexist (assq 'unexist (gnus-info-marks info))
uidvalidity (cdr (assq 'uidvalidity params))
modseq (cdr (assq 'modseq params)))
(setf (nnimap-examined nnimap-object) group)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(if (and qresyncp
uidvalidity
Merge changes made in Gnus trunk. auth.texi (Help for users): Mention ~/.netrc is also searched by default now. gnus-start.el (gnus-dribble-read-file): Set buffer-save-without-query, since we always want to save the dribble file, probably. nnmail.el (nnmail-article-group): Allow a final "" split to work on nnimap. gnus-sum.el (gnus-user-date-format-alist): Renamed back again from -summary- since it's a user-visible variable. nnimap.el (nnimap-retrieve-group-data-early): Don't do QRESYNC the first time you use the new Gnus. auth-source.el: Don't load netrc.el. (auth-sources): Search ~/.netrc as well by default. (auth-source-debug): Add 'trivia option for extra output. (auth-source-do-trivia): Use it. (auth-source-search): Simplify logic to use `auth-source-search-backends'. Use `auth-source-do-trivia' where appropriate. Don't keep a running count at this level. Layer :create and :delete options appropriately on the first and second passes. Don't track the backend with the search results. (auth-source-search-backends): New function to search a list of backends for a processed spec. (auth-source-netrc-parse): Cache all netrc files, making auth-source-netrc-cache an alist keyed by the file name and using the file mtime as the caching criterion. Keep the obfuscated data secret with a lexical bind. (auth-source-netrc-search): Don't calculate the length of the results unnecessarily. (auth-source-search-backends): Fix bug. (auth-source-netrc-create): Rework prompts. nnir.el (nnir-imap-search-arguments,nnir-imap-default-search-key): Lower case names of search constraints. (nnir-run-query): Cache and reuse search constraints for all imap servers. gnus-msg.el (gnus-setup-message): Define missing variable from last checkin.
2011-02-23 13:35:35 +00:00
active
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
modseq
unexist)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(push
(list (nnimap-send-command "EXAMINE %S (%s (%s %s))"
(utf7-encode group t)
(nnimap-quirk "QRESYNC")
uidvalidity modseq)
'qresync
nil group 'qresync)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
sequences)
(let ((command
(if uidvalidity
"EXAMINE"
;; If we don't have a UIDVALIDITY, then this is
;; the first time we've seen the group, so we
;; have to do a SELECT (which is slower than an
;; examine), but will tell us whether the group
;; is read-only or not.
"SELECT"))
start)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(if (and active uidvalidity unexist)
;; Fetch the last 100 flags.
(setq start (max 1 (- (cdr active) 100)))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(incf (nnimap-initial-resync nnimap-object))
(setq start 1))
(push (list (nnimap-send-command "%s %S" command
(utf7-encode group t))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(nnimap-send-command "UID FETCH %d:* FLAGS" start)
start group command)
sequences))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
sequences))))
(defun nnimap-quirk (command)
(let ((quirk (assoc command nnimap-quirks)))
;; If this server is of a type that matches a quirk, then return
;; the "quirked" command instead of the proper one.
(if (or (null quirk)
(not (string-match (nth 1 quirk) (nnimap-greeting nnimap-object))))
command
(nth 2 quirk))))
(deffoo nnimap-finish-retrieve-group-infos (server infos sequences)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(when (and sequences
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(nnimap-change-group nil server t)
;; Check that the process is still alive.
(get-buffer-process (nnimap-buffer))
(memq (process-status (get-buffer-process (nnimap-buffer)))
'(open run)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(with-current-buffer (nnimap-buffer)
;; Wait for the final data to trickle in.
(when (nnimap-wait-for-response (if (eq (cadar sequences) 'qresync)
(caar sequences)
(cadar sequences))
t)
;; Now we should have most of the data we need, no matter
;; whether we're QRESYNCING, fetching all the flags from
;; scratch, or just fetching the last 100 flags per group.
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(nnimap-update-infos (nnimap-flags-to-marks
(nnimap-parse-flags
(nreverse sequences)))
infos)
;; Finally, just return something resembling an active file in
;; the nntp buffer, so that the agent can save the info, too.
(with-current-buffer nntp-server-buffer
(erase-buffer)
(dolist (info infos)
(let* ((group (gnus-info-group info))
(active (gnus-active group)))
(when active
(insert (format "%S %d %d y\n"
(decode-coding-string
(gnus-group-real-name group) 'utf-8)
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(cdr active)
(car active)))))))))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-update-infos (flags infos)
(dolist (info infos)
(let* ((group (nnimap-decode-gnus-group
(gnus-group-real-name (gnus-info-group info))))
(marks (cdr (assoc group flags))))
(when marks
(nnimap-update-info info marks)))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-update-info (info marks)
(destructuring-bind (existing flags high low uidnext start-article
permanent-flags uidvalidity
vanished highestmodseq) marks
(cond
;; Ignore groups with no UIDNEXT/marks. This happens for
;; completely empty groups.
((and (not existing)
(not uidnext))
(let ((active (cdr (assq 'active (gnus-info-params info)))))
(when active
(gnus-set-active (gnus-info-group info) active))))
;; We have a mismatch between the old and new UIDVALIDITY
;; identifiers, so we have to re-request the group info (the next
;; time). This virtually never happens.
((let ((old-uidvalidity
(cdr (assq 'uidvalidity (gnus-info-params info)))))
(and old-uidvalidity
(not (equal old-uidvalidity uidvalidity))
(or (not start-article)
(> start-article 1))))
(gnus-group-remove-parameter info 'uidvalidity)
(gnus-group-remove-parameter info 'modseq))
;; We have the data needed to update.
(t
(let* ((group (gnus-info-group info))
(completep (and start-article
(= start-article 1)))
(active (or (gnus-active group)
(cdr (assq 'active (gnus-info-params info))))))
(when uidnext
(setq high (1- uidnext)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
;; First set the active ranges based on high/low.
(if (or completep
(not (gnus-active group)))
(gnus-set-active group
(cond
(active
(cons (min (or low (car active))
(car active))
(max (or high (cdr active))
(cdr active))))
((and low high)
(cons low high))
(uidnext
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
;; No articles in this group.
(cons uidnext (1- uidnext)))
(start-article
(cons start-article (1- start-article)))
(t
;; No articles and no uidnext.
nil)))
(gnus-set-active group
(cons (car active)
(or high (1- uidnext)))))
;; See whether this is a read-only group.
(unless (eq permanent-flags 'not-scanned)
(gnus-group-set-parameter
info 'permanent-flags
(and (or (memq '%* permanent-flags)
(memq '%Seen permanent-flags))
permanent-flags)))
;; Update marks and read articles if this isn't a
;; read-only IMAP group.
(when (setq permanent-flags
(cdr (assq 'permanent-flags (gnus-info-params info))))
(if (and highestmodseq
(not start-article))
;; We've gotten the data by QRESYNCing.
(nnimap-update-qresync-info
info existing (nnimap-imap-ranges-to-gnus-ranges vanished) flags)
;; Do normal non-QRESYNC flag updates.
;; Update the list of read articles.
(let* ((unread
(gnus-compress-sequence
(gnus-set-difference
(gnus-set-difference
existing
(gnus-sorted-union
(cdr (assoc '%Seen flags))
(cdr (assoc '%Deleted flags))))
(cdr (assoc '%Flagged flags)))))
(read (gnus-range-difference
(cons start-article high) unread)))
(when (> start-article 1)
(setq read
(gnus-range-nconcat
(if (> start-article 1)
(gnus-sorted-range-intersection
(cons 1 (1- start-article))
(gnus-info-read info))
(gnus-info-read info))
read)))
(when (or (not (listp permanent-flags))
(memq '%Seen permanent-flags))
(gnus-info-set-read info read))
;; Update the marks.
(setq marks (gnus-info-marks info))
(dolist (type (cdr nnimap-mark-alist))
(when (or (not (listp permanent-flags))
(memq (car (assoc (caddr type) flags))
permanent-flags)
(memq '%* permanent-flags))
(let ((old-marks (assoc (car type) marks))
(new-marks
(gnus-compress-sequence
(cdr (or (assoc (caddr type) flags) ; %Flagged
(assoc (intern (cadr type) obarray) flags)
(assoc (cadr type) flags)))))) ; "\Flagged"
(setq marks (delq old-marks marks))
(pop old-marks)
(when (and old-marks
(> start-article 1))
(setq old-marks (gnus-range-difference
old-marks
(cons start-article high)))
(setq new-marks (gnus-range-nconcat old-marks new-marks)))
(when new-marks
(push (cons (car type) new-marks) marks)))))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
;; Keep track of non-existing articles.
(let* ((old-unexists (assq 'unexist marks))
(active (gnus-active group))
(unexists
(if completep
(gnus-range-difference
active
(gnus-compress-sequence existing))
(gnus-add-to-range
(cdr old-unexists)
(gnus-list-range-difference
existing (gnus-active group))))))
(when (> (car active) 1)
(setq unexists (gnus-range-add
(cons 1 (1- (car active)))
unexists)))
(if old-unexists
(setcdr old-unexists unexists)
(push (cons 'unexist unexists) marks)))
(gnus-info-set-marks info marks t))))
;; Tell Gnus whether there are any \Recent messages in any of
;; the groups.
(let ((recent (cdr (assoc '%Recent flags))))
(when (and active
recent
(> (car (last recent)) (cdr active)))
(push (list (cons (gnus-group-real-name group) 0))
nnmail-split-history)))
;; Note the active level for the next run-through.
(gnus-group-set-parameter info 'active (gnus-active group))
(gnus-group-set-parameter info 'uidvalidity uidvalidity)
(gnus-group-set-parameter info 'modseq highestmodseq)
(nnimap-store-info info (gnus-active group)))))))
(defun nnimap-update-qresync-info (info existing vanished flags)
;; Add all the vanished articles to the list of read articles.
(gnus-info-set-read
info
(gnus-add-to-range
(gnus-add-to-range
(gnus-range-add (gnus-info-read info)
vanished)
(cdr (assq '%Flagged flags)))
(cdr (assq '%Seen flags))))
(let ((marks (gnus-info-marks info)))
(dolist (type (cdr nnimap-mark-alist))
(let ((ticks (assoc (car type) marks))
(new-marks
(cdr (or (assoc (caddr type) flags) ; %Flagged
(assoc (intern (cadr type) obarray) flags)
(assoc (cadr type) flags))))) ; "\Flagged"
(setq marks (delq ticks marks))
(pop ticks)
;; Add the new marks we got.
(setq ticks (gnus-add-to-range ticks new-marks))
;; Remove the marks from messages that don't have them.
(setq ticks (gnus-remove-from-range
ticks
(gnus-compress-sequence
(gnus-sorted-complement existing new-marks))))
(when ticks
(push (cons (car type) ticks) marks)))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(gnus-info-set-marks info marks t))
;; Add vanished to the list of unexisting articles.
(when vanished
(let* ((old-unexists (assq 'unexist marks))
(unexists (gnus-range-add (cdr old-unexists) vanished)))
(if old-unexists
(setcdr old-unexists unexists)
(push (cons 'unexist unexists) marks)))
(gnus-info-set-marks info marks t))))
(defun nnimap-imap-ranges-to-gnus-ranges (irange)
(if (zerop (length irange))
nil
(let ((result nil))
(dolist (elem (split-string irange ","))
(push
(if (string-match ":" elem)
(let ((numbers (split-string elem ":")))
(cons (string-to-number (car numbers))
(string-to-number (cadr numbers))))
(string-to-number elem))
result))
(nreverse result))))
(defun nnimap-store-info (info active)
(let* ((group (gnus-group-real-name (gnus-info-group info)))
(entry (assoc group nnimap-current-infos)))
(if entry
(setcdr entry (list info active))
(push (list group info active) nnimap-current-infos))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-flags-to-marks (groups)
(let (data group totalp uidnext articles start-article mark permanent-flags
uidvalidity vanished highestmodseq)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(dolist (elem groups)
(setq group (car elem)
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
uidnext (nth 1 elem)
start-article (nth 2 elem)
permanent-flags (nth 3 elem)
uidvalidity (nth 4 elem)
vanished (nth 5 elem)
highestmodseq (nth 6 elem)
articles (nthcdr 7 elem))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(let ((high (caar articles))
marks low existing)
(dolist (article articles)
(setq low (car article))
(push (car article) existing)
(dolist (flag (cdr article))
(setq mark (assoc flag marks))
(if (not mark)
(push (list flag (car article)) marks)
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(setcdr mark (cons (car article) (cdr mark))))))
(push (list group existing marks high low uidnext start-article
permanent-flags uidvalidity vanished highestmodseq)
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
data)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
data))
(defun nnimap-parse-flags (sequences)
(goto-char (point-min))
;; Change \Delete etc to %Delete, so that the Emacs Lisp reader can
;; read it.
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(subst-char-in-region (point-min) (point-max)
?\\ ?% t)
;; Remove any MODSEQ entries in the buffer, because they may contain
;; numbers that are too large for 32-bit Emacsen.
(while (re-search-forward " MODSEQ ([0-9]+)" nil t)
(replace-match "" t t))
(goto-char (point-min))
(let (start end articles groups uidnext elems permanent-flags
uidvalidity vanished highestmodseq)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(dolist (elem sequences)
(destructuring-bind (group-sequence flag-sequence totalp group command)
elem
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(setq start (point))
(when (and
;; The EXAMINE was successful.
(search-forward (format "\n%d OK " group-sequence) nil t)
(progn
(forward-line 1)
(setq end (point))
(goto-char start)
(setq permanent-flags
(if (equal command "SELECT")
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(and (search-forward "PERMANENTFLAGS "
(or end (point-min)) t)
(read (current-buffer)))
'not-scanned))
(goto-char start)
(setq uidnext
(and (search-forward "UIDNEXT "
(or end (point-min)) t)
(read (current-buffer))))
(goto-char start)
(setq uidvalidity
(and (re-search-forward "UIDVALIDITY \\([0-9]+\\)"
(or end (point-min)) t)
;; Store UIDVALIDITY as a string, as it's
;; too big for 32-bit Emacsen, usually.
(match-string 1)))
(goto-char start)
(setq vanished
(and (eq flag-sequence 'qresync)
(re-search-forward "^\\* VANISHED .*? \\([0-9:,]+\\)"
(or end (point-min)) t)
(match-string 1)))
(goto-char start)
(setq highestmodseq
(and (re-search-forward "HIGHESTMODSEQ \\([0-9]+\\)"
(or end (point-min)) t)
(match-string 1)))
(goto-char end)
(forward-line -1))
;; The UID FETCH FLAGS was successful.
(or (eq flag-sequence 'qresync)
(search-forward (format "\n%d OK " flag-sequence) nil t)))
(if (eq flag-sequence 'qresync)
(progn
(goto-char start)
(setq start end))
(setq start (point))
(goto-char end))
(while (re-search-forward "^\\* [0-9]+ FETCH " start t)
(let ((p (point)))
(setq elems (read (current-buffer)))
(push (cons (cadr (memq 'UID elems))
(cadr (memq 'FLAGS elems)))
articles)))
(push (nconc (list group uidnext totalp permanent-flags uidvalidity
vanished highestmodseq)
articles)
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
groups)
(if (eq flag-sequence 'qresync)
(goto-char end)
(setq end (point)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(setq articles nil))))
groups))
(defun nnimap-find-process-buffer (buffer)
(cadr (assoc buffer nnimap-connection-alist)))
(deffoo nnimap-request-post (&optional server)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(setq nnimap-status-string "Read-only server")
nil)
2000-09-19 13:40:08 +00:00
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(defvar gnus-refer-thread-use-nnir) ;; gnus-sum.el
(declare-function gnus-fetch-headers "gnus-sum"
(articles &optional limit force-new dependencies))
(autoload 'nnir-search-thread "nnir")
(deffoo nnimap-request-thread (header &optional group server)
(when group
(setq group (nnimap-decode-gnus-group group)))
(if gnus-refer-thread-use-nnir
(nnir-search-thread header)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(when (nnimap-change-group group server)
(let* ((cmd (nnimap-make-thread-query header))
(result (with-current-buffer (nnimap-buffer)
(nnimap-command "UID SEARCH %s" cmd))))
(when result
(gnus-fetch-headers
(and (car result)
(delete 0 (mapcar #'string-to-number
(cdr (assoc "SEARCH" (cdr result))))))
nil t))))))
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(defun nnimap-change-group (group &optional server no-reconnect read-only)
"Change group to GROUP if non-nil.
If SERVER is set, check that server is connected, otherwise retry
to reconnect, unless NO-RECONNECT is set to t. Return nil if
unsuccessful in connecting.
If GROUP is nil, return t.
If READ-ONLY is set, send EXAMINE rather than SELECT to the server.
Return the server's response to the SELECT or EXAMINE command."
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(let ((open-result t))
(when (and server
(not (nnimap-server-opened server)))
(setq open-result (nnimap-open-server server nil no-reconnect)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(cond
((not open-result)
nil)
((not group)
t)
(t
(with-current-buffer (nnimap-buffer)
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(let ((result (nnimap-command "%s %S"
(if read-only
"EXAMINE"
"SELECT")
(utf7-encode group t))))
(when (car result)
(setf (nnimap-group nnimap-object) group
(nnimap-select-result nnimap-object) result)
result)))))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-find-connection (buffer)
"Find the connection delivering to BUFFER."
(let ((entry (assoc buffer nnimap-connection-alist)))
(when entry
(if (and (buffer-name (cadr entry))
(get-buffer-process (cadr entry))
(memq (process-status (get-buffer-process (cadr entry)))
'(open run)))
(get-buffer-process (cadr entry))
(setq nnimap-connection-alist (delq entry nnimap-connection-alist))
nil))))
(defvar nnimap-sequence 0)
(defun nnimap-send-command (&rest args)
(setf (nnimap-last-command-time nnimap-object) (current-time))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(process-send-string
(get-buffer-process (current-buffer))
(nnimap-log-command
(format "%d %s%s\n"
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(incf nnimap-sequence)
(apply #'format args)
(if (nnimap-newlinep nnimap-object)
""
"\r"))))
;; Some servers apparently can't have many outstanding
;; commands, so throttle them.
(unless nnimap-streaming
(nnimap-wait-for-response nnimap-sequence))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
nnimap-sequence)
(defvar nnimap-record-commands nil
"If non-nil, log commands to the \"*imap log*\" buffer.")
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(defun nnimap-log-buffer ()
(let ((name "*imap log*"))
(or (get-buffer name)
(with-current-buffer (get-buffer-create name)
(when (boundp 'window-point-insertion-type)
(make-local-variable 'window-point-insertion-type)
(setq window-point-insertion-type t))
(current-buffer)))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-log-command (command)
(when nnimap-record-commands
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
(with-current-buffer (nnimap-log-buffer)
(goto-char (point-max))
(insert (format-time-string "%H:%M:%S")
Merge changes made in Gnus trunk 2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Client-Side IMAP Splitting): Note that `nnimap-inbox' now can be a list. 2013-06-05 David Engster <deng@randomsample.de> * gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist' ranges, since `nnimap-retrieve-group-data-early' also uses it as a flag to see whether the group was synced before. 2012-09-05 Martin Stjernholm <mast@lysator.liu.se> * nnimap.el (nnimap-request-move-article): Decode the group name when doing internal moves to avoid charset issues. 2012-09-05 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-list): Revert change that made listing synchronous. (nnimap-get-responses): Restore. 2012-08-31 Dave Abrahams <dave@boostpro.com> * nnimap.el (nnimap-change-group): Document result value. * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that nnimap-change-group can return t. 2012-08-06 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-head): Resture to-buffer parameter, used by `nnimap-request-move-article'. * nnimap.el (nnimap-request-head): Remove to-buffer argument. * gnus-int.el (gnus-request-head): Remove to-buffer argument, only supported by nnimap actually. Reverts previous change. * gnus-int.el (gnus-request-head): Add an optional to-buffer parameter to mimic `gnus-request-article' and enjoy backends the nn*-request-head to-buffer argument that is already supported. 2012-07-24 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-get-responses): Remove, unused. 2012-06-25 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-request-articles-find-limit): Rename from `nnimap-request-move-articles-find-limit' since we do not use it only for move operations. (nnimap-request-accept-article): Use `nnimap-request-articles-find-limit' to limit search by message-id. 2012-06-19 Julien Danjou <julien@danjou.info> * nnir.el (nnir-run-imap): Fix, use `nnimap-change-group'. * nnimap.el (nnimap-log-buffer): Check that `window-point-insertion-type' is boundp, since it's not available in XEmacs. 2012-06-19 Michael Welsh Duggan <md5i@md5i.com> * nnimap.el (nnimap-log-buffer): Add this, setting `window-point-insertion-type' in the buffer to t. (nnimap-log-command): Use nnimap-log-buffer. 2012-06-19 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Add an optional limit argument to be able to limit the search. (nnimap-request-move-article): Use `nnimap-request-move-articles-find-limit'. (nnimap-request-move-articles-find-limit): Add this to limit the search by Message-Id after a message move. (nnimap): Add defgroup. 2012-06-15 Julien Danjou <julien@danjou.info> * nnimap.el (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' rather than its own EXAMINE call. (nnimap-possibly-change-group): Add read-only argument. (nnimap-request-list): Use nnimap-possibly-change-group rather than issuing EXAMINE manually. (nnimap-find-article-by-message-id): Use `nnimap-possibly-change-group' with read-only argument. (nnimap-change-group): Rename from `nnimap-possibly-change-group'. We cannot possibly change because we need to be sure that it's either read-write or read-only. 2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-insert-old-articles): Don't include unexistent messages. 2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Remove totally bogus `unexists' entries. (gnus-clean-old-newsrc): Fix last checkin. * nnimap.el (nnimap-update-info): None of the articles below the active low-water mark exist. 2012-03-27 Katsumi Yamaoka <yamaoka@jpl.org> * nnimap.el (gnus-refer-thread-use-nnir): Silence the byte compiler. 2012-03-22 Sergio Martinez <samf0xb58@gmail.com> (tiny change) * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. 2012-03-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-group.el (gnus-group-expire-articles-1): Don't try to expire messages that don't exist. * gnus-sum.el (gnus-summary-expire-articles): Ditto. 2012-02-20 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Allow a FORCE parameter. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): Delete `unexist' from pre-Ma Gnus 0.3. 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-local-variables): Make `gnus-newsgroup-unexist' into a local variable. 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-adjust-marked-articles): Add to `gnus-newsgroup-unexist'. * gnus.el (gnus-article-mark-lists): Add `unexist' to the list of marks. (gnus-article-special-mark-lists): Put the `unexist' in the special marks list instead. * gnus-sum.el (gnus-articles-to-read): Don't include unexisting articles in the list of articles to be selected. * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting articles. (nnimap-update-info): Keep track of unexisting articles. (nnimap-update-qresync-info): Ditto. 2012-02-01 Lars Ingebrigtsen <larsi@gnus.org> * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it.
2013-07-02 10:38:58 +00:00
" [" nnimap-address "] "
(if nnimap-inhibit-logging
"(inhibited)\n"
command))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
command)
(defun nnimap-command (&rest args)
(erase-buffer)
(let* ((sequence (apply #'nnimap-send-command args))
(response (nnimap-get-response sequence)))
(if (equal (caar response) "OK")
(cons t response)
(nnheader-report 'nnimap "%s"
(mapconcat (lambda (a)
(format "%s" a))
(car response) " "))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
nil)))
(defun nnimap-get-response (sequence)
(nnimap-wait-for-response sequence)
(nnimap-parse-response))
Merge changes made in Gnus trunk. nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set. gnus.el (gnus-group-startup-message): Move point to the start of the buffer. nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest. gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive. shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We"). gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter. gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections. gnus.el: Autoload gnus-article-fill-cited-long-lines. gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. gnus.texi (Paging the Article): Document C-u g/C-u C-u g. gnus-cite.el (gnus-article-foldable-buffer): Refactor out. gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge. gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness. gnus-srvr.el, nnir.el: Allow nnir searching for an entire server. gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles. gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place. nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging. nnimap.el (nnimap-wait-for-connection): Take a regexp. nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
2010-10-31 22:31:24 +00:00
(defun nnimap-wait-for-connection (&optional regexp)
(nnimap-wait-for-line (or regexp "^[*.] .*\n") "[*.] \\([A-Z0-9]+\\)"))
(defun nnimap-wait-for-line (regexp &optional response-regexp)
(let ((process (get-buffer-process (current-buffer))))
(goto-char (point-min))
(while (and (memq (process-status process)
'(open run))
Merge changes made in Gnus trunk. nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set. gnus.el (gnus-group-startup-message): Move point to the start of the buffer. nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest. gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive. shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We"). gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter. gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections. gnus.el: Autoload gnus-article-fill-cited-long-lines. gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. gnus.texi (Paging the Article): Document C-u g/C-u C-u g. gnus-cite.el (gnus-article-foldable-buffer): Refactor out. gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge. gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness. gnus-srvr.el, nnir.el: Allow nnir searching for an entire server. gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles. gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place. nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging. nnimap.el (nnimap-wait-for-connection): Take a regexp. nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
2010-10-31 22:31:24 +00:00
(not (re-search-forward regexp nil t)))
(nnheader-accept-process-output process)
(goto-char (point-min)))
Merge changes made in Gnus trunk. mail-parse.el (mail-header-encode-parameter): Define as rfc2045-encode-string. nnheader.el (nnheader-insert-nov): Protect against junk appearing in the extra mail headers. gnus-html.el: Prefetch and html washing additions. gnus-html.el (gnus-html-prefetch-images): Fix up the url-retrieve calling conventions so that prefetch doesn't bug out. Pass proper format strings to gnus-message. nnimap.el: Allow anonymous login. nnimap.el (nnimap-transform-headers): The chars header is called Chars not Bytes. nnimap.el (nnimap-wait-for-response): Don't infloop if the IMAP connection drops. gnus-start.el (gnus-get-unread-articles): Call `gnus-open-server' on each method before trying to scan them etc. gnus-sum.el (gnus-summary-update-mark): Replace subst-char-in-region by subst-char-in-region. gnus.el (gnus-similar-server-opened): Refactor a bit and add comments. gnus.el: Fix a speed regression based in methods that were similar weren't the same. gnus.el (gnus): When using the development version of Gnus, load the gnus-load file. nnimap.el (nnimap-open-connection): When looking for credentials, also use the nnimap-server-port. nnimap.el (nnimap-request-article): Return the group/article number, so that Gnus `^' works as expected. nnimap.el (nnimap-find-wanted-parts-1): Return the MIME parts as IMAP wants them. gnus-start.el (gnus-ignored-newsgroups): Remove [] from the list of bogus characters. gnus-html.el (gnus-html-image-fetched): Protect against the data not arriving. nnimap.el (nnimap-wait-for-connection): Avoid a race condition while waiting for the connection string. gnus.texi (Required Back End Functions): Document INFO.
2010-09-20 00:36:54 +00:00
(forward-line -1)
(and (looking-at (or response-regexp regexp))
Merge changes made in Gnus trunk. mail-parse.el (mail-header-encode-parameter): Define as rfc2045-encode-string. nnheader.el (nnheader-insert-nov): Protect against junk appearing in the extra mail headers. gnus-html.el: Prefetch and html washing additions. gnus-html.el (gnus-html-prefetch-images): Fix up the url-retrieve calling conventions so that prefetch doesn't bug out. Pass proper format strings to gnus-message. nnimap.el: Allow anonymous login. nnimap.el (nnimap-transform-headers): The chars header is called Chars not Bytes. nnimap.el (nnimap-wait-for-response): Don't infloop if the IMAP connection drops. gnus-start.el (gnus-get-unread-articles): Call `gnus-open-server' on each method before trying to scan them etc. gnus-sum.el (gnus-summary-update-mark): Replace subst-char-in-region by subst-char-in-region. gnus.el (gnus-similar-server-opened): Refactor a bit and add comments. gnus.el: Fix a speed regression based in methods that were similar weren't the same. gnus.el (gnus): When using the development version of Gnus, load the gnus-load file. nnimap.el (nnimap-open-connection): When looking for credentials, also use the nnimap-server-port. nnimap.el (nnimap-request-article): Return the group/article number, so that Gnus `^' works as expected. nnimap.el (nnimap-find-wanted-parts-1): Return the MIME parts as IMAP wants them. gnus-start.el (gnus-ignored-newsgroups): Remove [] from the list of bogus characters. gnus-html.el (gnus-html-image-fetched): Protect against the data not arriving. nnimap.el (nnimap-wait-for-connection): Avoid a race condition while waiting for the connection string. gnus.texi (Required Back End Functions): Document INFO.
2010-09-20 00:36:54 +00:00
(match-string 1))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-wait-for-response (sequence &optional messagep)
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(let ((process (get-buffer-process (current-buffer)))
openp)
(condition-case nil
(progn
(goto-char (point-max))
(while (and (setq openp (memq (process-status process)
'(open run)))
(progn
;; Skip past any "*" lines that the server has
;; output.
(while (and (not (bobp))
(progn
(forward-line -1)
(looking-at "\\*\\|[0-9]+ OK NOOP"))))
(not (looking-at (format "%d .*\n" sequence)))))
(when messagep
(nnheader-message-maybe
7 "nnimap read %dk from %s%s" (/ (buffer-size) 1000)
nnimap-address
(if (not (zerop (nnimap-initial-resync nnimap-object)))
(format " (initial sync of %d group%s; please wait)"
(nnimap-initial-resync nnimap-object)
(if (= (nnimap-initial-resync nnimap-object) 1)
""
"s"))
"")))
(nnheader-accept-process-output process)
(goto-char (point-max)))
(setf (nnimap-initial-resync nnimap-object) 0)
openp)
(quit
(when debug-on-quit
(debug "Quit"))
;; The user hit C-g while we were waiting: kill the process, in case
;; it's a gnutls-cli process that's stuck (tends to happen a lot behind
;; NAT routers).
(delete-process process)
nil))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-parse-response ()
(let ((lines (split-string (nnimap-last-response-string) "\r\n" t))
result)
(dolist (line lines)
(push (cdr (nnimap-parse-line line)) result))
;; Return the OK/error code first, and then all the "continuation
;; lines" afterwards.
(cons (pop result)
(nreverse result))))
;; Parse an IMAP response line lightly. They look like
;; "* OK [UIDVALIDITY 1164213559] UIDs valid", typically, so parse
;; the lines into a list of strings and lists of string.
(defun nnimap-parse-line (line)
(let (char result)
(with-temp-buffer
(mm-disable-multibyte)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(insert line)
(goto-char (point-min))
(while (not (eobp))
(if (eql (setq char (following-char)) ? )
(forward-char 1)
(push
(cond
((eql char ?\[)
(split-string
(buffer-substring
(1+ (point))
(if (search-forward "]" (line-end-position) 'move)
(1- (point))
(point)))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
((eql char ?\()
(split-string
(buffer-substring
(1+ (point))
(if (search-forward ")" (line-end-position) 'move)
(1- (point))
(point)))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
((eql char ?\")
(forward-char 1)
(buffer-substring
(point)
(1- (or (search-forward "\"" (line-end-position) 'move)
(point)))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(t
(buffer-substring (point) (if (search-forward " " nil t)
(1- (point))
(goto-char (point-max))))))
result)))
(nreverse result))))
(defun nnimap-last-response-string ()
(save-excursion
(forward-line 1)
(let ((end (point)))
(forward-line -1)
(when (not (bobp))
(forward-line -1)
(while (and (not (bobp))
(eql (following-char) ?*))
(forward-line -1))
(unless (eql (following-char) ?*)
(forward-line 1)))
(buffer-substring (point) end))))
(defvar nnimap-incoming-split-list nil)
(defun nnimap-fetch-inbox (articles)
(erase-buffer)
(nnimap-wait-for-response
(nnimap-send-command
"UID FETCH %s %s"
(nnimap-article-ranges articles)
(format "(UID %s%s)"
(format
Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary.
2010-09-26 04:03:19 +00:00
(if (nnimap-ver4-p)
"BODY.PEEK"
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
"RFC822.PEEK"))
(cond
(nnimap-split-download-body-default
"[]")
((nnimap-ver4-p)
"[HEADER]")
(t
"[1]"))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
t))
(defun nnimap-split-incoming-mail ()
(with-current-buffer (nnimap-buffer)
(let ((nnimap-incoming-split-list nil)
(nnmail-split-methods
(cond
((eq nnimap-split-methods 'default)
nnmail-split-methods)
(nnimap-split-methods
nnimap-split-methods)
(nnimap-split-fancy
'nnmail-split-fancy)))
2010-10-01 00:25:50 +00:00
(nnmail-split-fancy (or nnimap-split-fancy
nnmail-split-fancy))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(nnmail-inhibit-default-split-group t)
(groups (nnimap-get-groups))
new-articles)
(erase-buffer)
(nnimap-command "SELECT %S" nnimap-inbox)
(setf (nnimap-group nnimap-object) nnimap-inbox)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(setq new-articles (nnimap-new-articles (nnimap-get-flags "1:*")))
(when new-articles
(nnimap-fetch-inbox new-articles)
(nnimap-transform-split-mail)
(nnheader-ms-strip-cr)
(nnmail-cache-open)
(nnmail-split-incoming (current-buffer)
#'nnimap-save-mail-spec
nil nil
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
#'nnimap-dummy-active-number
#'nnimap-save-mail-spec)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(when nnimap-incoming-split-list
(let ((specs (nnimap-make-split-specs nnimap-incoming-split-list))
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
sequences junk-articles)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
;; Create any groups that doesn't already exist on the
;; server first.
(dolist (spec specs)
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(when (and (not (member (car spec) groups))
(not (eq (car spec) 'junk)))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(nnimap-command "CREATE %S" (utf7-encode (car spec) t))))
;; Then copy over all the messages.
(erase-buffer)
(dolist (spec specs)
(let ((group (car spec))
(ranges (cdr spec)))
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(if (eq group 'junk)
(setq junk-articles ranges)
(push (list (nnimap-send-command
"UID COPY %s %S"
(nnimap-article-ranges ranges)
(utf7-encode group t))
ranges)
sequences))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
;; Wait for the last COPY response...
(when sequences
(nnimap-wait-for-response (caar sequences))
;; And then mark the successful copy actions as deleted,
;; and possibly expunge them.
(nnimap-mark-and-expunge-incoming
(nnimap-parse-copied-articles sequences)))
(nnimap-mark-and-expunge-incoming junk-articles)))))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-mark-and-expunge-incoming (range)
(when range
(setq range (nnimap-article-ranges range))
Merge changes made in Gnus trunk. nndraft.el (nndraft-request-expire-articles): Use the group name instead if "nndraft". gnus.texi (Using IMAP): Remove the @acronyms from the headings. nnregistry.el: Added. nnimap.el (nnimap-insert-partial-structure): Be way more permissive when interpreting the structures. GNUS-NEWS: Minor error in GNUS-NEWS - password-cache.el. nnimap.el (nnimap-request-accept-article): Add \r\n to the lines to make this work with Cyrus. gnus-registry.el: Don't prompt on load, which makes it impossible to build Gnus. gnus-gravatar.el: Add gnus-gravatar-properties. gnus-agent.el, gnus-art.el, gnus-bookmark.el, gnus-dired.el, gnus-group.el,\ gnus-int.el, gnus-msg.el, gnus-registry.el, gnus-score.el, gnus-srvr.el,\ gnus-sum.el, gnus-topic.el, gnus-util.el, gnus.el, mm-decode.el, mm-util.el,\ mm-view.el, mml-smime.el, mml.el, nnmairix.el, nnrss.el, smime.el:\ Introduce gnus-completing-read. gnus-util.el: Make completing-read function configurable. gnus-util.el: Add requires and fix history for iswitchb. webmail.el: Remove netscape/my-deja, since they no longer exist. gnus.el (gnus-local-domain): Declare variable obsolete. nnimap.el (nnimap-insert-partial-structure): Get the type from the correct slot, too. pop3.el (pop3-send-streaming-command, pop3-stream-length): New variable. nnimap.el (nnimap-open-connection): Revert the auto-network->starttls code. nnimap.el (nnimap-request-set-mark): Erase the buffer before issuing commands. nnimap.el (nnimap-split-rule): Mark as obsolete. gnus-sum.el (gnus-valid-move-group-p): Make sure that `group' is a symbol. nnimap.el (nnimap-split-incoming-mail): Allow `default' as nnimap-split-methods value. nnimap.el (nnimap-request-article): Downcase the NILs so that they are nil. nndoc.el (nndoc-retrieve-groups): New function. gnus.texi: Fix Gravatar documentation.
2010-09-30 08:39:23 +00:00
(erase-buffer)
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(let ((sequence
(nnimap-send-command
"UID STORE %s +FLAGS.SILENT (\\Deleted)" range)))
(cond
;; If the server supports it, we now delete the message we have
;; just copied over.
Merge changes made in Gnus trunk. nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set. gnus.el (gnus-group-startup-message): Move point to the start of the buffer. nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest. gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive. shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We"). gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter. gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections. gnus.el: Autoload gnus-article-fill-cited-long-lines. gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. gnus.texi (Paging the Article): Document C-u g/C-u C-u g. gnus-cite.el (gnus-article-foldable-buffer): Refactor out. gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge. gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness. gnus-srvr.el, nnir.el: Allow nnir searching for an entire server. gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles. gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place. nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging. nnimap.el (nnimap-wait-for-connection): Take a regexp. nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
2010-10-31 22:31:24 +00:00
((nnimap-capability "UIDPLUS")
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(setq sequence (nnimap-send-command "UID EXPUNGE %s" range)))
;; If it doesn't support UID EXPUNGE, then we only expunge if the
;; user has configured it.
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(nnimap-expunge
Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
2010-09-21 23:13:46 +00:00
(setq sequence (nnimap-send-command "EXPUNGE"))))
(nnimap-wait-for-response sequence))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-parse-copied-articles (sequences)
(let (sequence copied range)
(goto-char (point-min))
(while (re-search-forward "^\\([0-9]+\\) OK\\b" nil t)
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(setq sequence (string-to-number (match-string 1)))
(when (setq range (cadr (assq sequence sequences)))
(push (gnus-uncompress-range range) copied)))
(gnus-compress-sequence (sort (apply #'nconc copied) #'<))))
(defun nnimap-new-articles (flags)
(let (new)
(dolist (elem flags)
(unless (gnus-list-memq-of-list nnimap-unsplittable-articles
(cdr elem))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(push (car elem) new)))
(gnus-compress-sequence (nreverse new))))
(defun nnimap-make-split-specs (list)
(let ((specs nil)
entry)
(dolist (elem list)
(destructuring-bind (article spec) elem
(dolist (group (delete nil (mapcar #'car spec)))
(unless (setq entry (assoc group specs))
(push (setq entry (list group)) specs))
(setcdr entry (cons article (cdr entry))))))
(dolist (entry specs)
(setcdr entry (gnus-compress-sequence (sort (cdr entry) #'<))))
specs))
(defun nnimap-transform-split-mail ()
(goto-char (point-min))
(let (article bytes)
(block nil
(while (not (eobp))
(while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(delete-region (point) (progn (forward-line 1) (point)))
(when (eobp)
(return)))
(setq article (match-string 1)
bytes (nnimap-get-length))
(delete-region (line-beginning-position) (line-end-position))
;; Insert MMDF separator, and a way to remember what this
;; article UID is.
(insert (format "\^A\^A\^A\^A\n\nX-nnimap-article: %s" article))
(forward-char (1+ bytes))
(setq bytes (nnimap-get-length))
(delete-region (line-beginning-position) (line-end-position))
;; There's a body; skip past that.
(when bytes
(forward-char (1+ bytes))
(delete-region (line-beginning-position) (line-end-position)))))))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
(defun nnimap-dummy-active-number (group &optional server)
1)
(defun nnimap-save-mail-spec (group-art &optional server full-nov)
(let (article)
(goto-char (point-min))
(if (not (re-search-forward "X-nnimap-article: \\([0-9]+\\)" nil t))
(error "Invalid nnimap mail")
(setq article (string-to-number (match-string 1))))
Merge Changes made in Gnus trunk. gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data. gnus-html.el: Use gnus-html-encode-url to encode URL. gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range. gnus.el: Try to keep the server/method cache unique. gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges. gnus-html.el (gnus-html-put-image): Stop using markers. gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data. nnimap.el: Expunge IMAP groups by default on article deletion. gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while. nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server. nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting. nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'. nnimap.el (nnimap-make-process-buffer): Record the server name. gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set. gnus-html.el (gnus-html-image-fetched): Check for errors. gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'. nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles. gnus-group.el (gnus-group-get-icon): Compute icon to return. gnus-group.el (gnus-group-icon-list): Fix bad docstring information. nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap. time-date.el (date-to-time): Speed up date-to-time. gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info. gnus-group.el: Remove gnus-group-highlight-line from the default hook list. gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data. gnus-int.el (gnus-open-server): Add tracing for performance debugging. nnimap.el (nnimap-parse-flags): Parse the data in any order. nnimap.el (nnimap-update-info): Fix up code slightly.
2010-09-23 00:30:37 +00:00
(push (list article
(if (eq group-art 'junk)
(list (cons 'junk 1))
group-art))
Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
2010-09-18 10:02:19 +00:00
nnimap-incoming-split-list)))
2000-09-19 13:40:08 +00:00
(defun nnimap-make-thread-query (header)
(let* ((id (mail-header-id header))
(refs (split-string
(or (mail-header-references header)
"")))
(value
(format
"(OR HEADER REFERENCES %S HEADER Message-Id %S)"
id id)))
(dolist (refid refs value)
(setq value (format
"(OR (OR HEADER Message-Id %S HEADER REFERENCES %S) %s)"
refid refid value)))))
2000-09-19 13:40:08 +00:00
(provide 'nnimap)
;;; nnimap.el ends here