Mercurial > emacs
annotate lisp/gnus/nnimap.el @ 107663:c852205c3682
(MIME Commands): Update description of gnus-article-browse-html-article.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Wed, 31 Mar 2010 00:08:42 +0000 |
parents | 0fe940324254 |
children | 943a190d417a |
rev | line source |
---|---|
31717 | 1 ;;; nnimap.el --- imap backend for Gnus |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
2 |
95820
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
94980
diff
changeset
|
3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
106815 | 4 ;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
31717 | 5 |
100993 | 6 ;; Author: Simon Josefsson <simon@josefsson.org> |
31717 | 7 ;; Jim Radford <radford@robby.caltech.edu> |
8 ;; Keywords: mail | |
9 | |
10 ;; This file is part of GNU Emacs. | |
11 | |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93820
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
31717 | 13 ;; it under the terms of the GNU General Public License as published by |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93820
diff
changeset
|
14 ;; the Free Software Foundation, either version 3 of the License, or |
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93820
diff
changeset
|
15 ;; (at your option) any later version. |
31717 | 16 |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93820
diff
changeset
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
31717 | 20 ;; GNU General Public License for more details. |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93820
diff
changeset
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
31717 | 24 |
25 ;;; Commentary: | |
26 | |
27 ;; Todo, major things: | |
28 ;; | |
29 ;; o Fix Gnus to view correct number of unread/total articles in group buffer | |
30 ;; o Fix Gnus to handle leading '.' in group names (fixed?) | |
31 ;; o Finish disconnected mode (moving articles between mailboxes unplugged) | |
32 ;; o Sieve | |
33 ;; o MIME (partial article fetches) | |
34 ;; o Split to other backends, different split rules for different | |
35 ;; servers/inboxes | |
36 ;; | |
37 ;; Todo, minor things: | |
38 ;; | |
39 ;; o Don't require half of Gnus -- backends should be standalone | |
40 ;; o Verify that we don't use IMAP4rev1 specific things (RFC2060 App B) | |
41 ;; o Dont uid fetch 1,* in nnimap-retrive-groups (slow) | |
42 ;; o Split up big fetches (1,* header especially) in smaller chunks | |
43 ;; o What do I do with gnus-newsgroup-*? | |
44 ;; o Tell Gnus about new groups (how can we tell?) | |
48588 | 45 ;; o Respooling (fix Gnus?) (unnecessary?) |
31717 | 46 ;; o Add support for the following: (if applicable) |
47 ;; request-list-newsgroups, request-regenerate | |
48 ;; list-active-group, | |
49 ;; request-associate-buffer, request-restore-buffer, | |
50 ;; o Do The Right Thing when UIDVALIDITY changes (what's the right thing?) | |
51 ;; o Support RFC2221 (Login referrals) | |
52 ;; o IMAP2BIS compatibility? (RFC2061) | |
53 ;; o ACAP stuff (perhaps a different project, would be nice to ACAPify | |
54 ;; .newsrc.eld) | |
55 ;; o What about Gnus's article editing, can we support it? NO! | |
56 ;; o Use \Draft to support the draft group?? | |
57 ;; o Duplicate suppression | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
58 ;; o Rewrite UID SEARCH UID X as UID FETCH X (UID) for those with slow servers |
31717 | 59 |
60 ;;; Code: | |
61 | |
107427
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
62 ;; For Emacs < 22.2. |
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
63 (eval-and-compile |
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
64 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) |
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
65 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
66 (require 'imap) |
31717 | 67 (require 'nnoo) |
68 (require 'nnmail) | |
69 (require 'nnheader) | |
70 (require 'mm-util) | |
71 (require 'gnus) | |
72 (require 'gnus-range) | |
73 (require 'gnus-start) | |
74 (require 'gnus-int) | |
75 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
76 (eval-when-compile (require 'cl)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
77 |
95820
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
94980
diff
changeset
|
78 (autoload 'auth-source-user-or-password "auth-source") |
94837 | 79 |
31717 | 80 (nnoo-declare nnimap) |
81 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
82 (defconst nnimap-version "nnimap 1.0") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
83 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
84 (defgroup nnimap nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
85 "Reading IMAP mail with Gnus." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
86 :group 'gnus) |
31717 | 87 |
88 (defvoo nnimap-address nil | |
89 "Address of physical IMAP server. If nil, use the virtual server's name.") | |
90 | |
91 (defvoo nnimap-server-port nil | |
92 "Port number on physical IMAP server. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
93 If nil, defaults to 993 for TLS/SSL connections and 143 otherwise.") |
31717 | 94 |
95 ;; Splitting variables | |
96 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
97 (defcustom nnimap-split-crosspost t |
31717 | 98 "If non-nil, do crossposting if several split methods match the mail. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
99 If nil, the first match found will be used." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
100 :group 'nnimap |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
101 :type 'boolean) |
31717 | 102 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
103 (defcustom nnimap-split-inbox nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
104 "Name of mailbox to split mail from. |
31717 | 105 |
106 Mail is read from this mailbox and split according to rules in | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
107 `nnimap-split-rule'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
108 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
109 This can be a string or a list of strings." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
110 :group 'nnimap |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
111 :type '(choice (string) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
112 (repeat string))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
113 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
114 (define-widget 'nnimap-strict-function 'function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
115 "This widget only matches values that are functionp. |
31717 | 116 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
117 Warning: This means that a value that is the symbol of a not yet |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
118 loaded function will not match. Use with care." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
119 :match 'nnimap-strict-function-match) |
31717 | 120 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
121 (defun nnimap-strict-function-match (widget value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
122 "Ignoring WIDGET, match if VALUE is a function." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
123 (functionp value)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
124 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
125 (defcustom nnimap-split-rule nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
126 "Mail will be split according to these rules. |
31717 | 127 |
128 Mail is read from mailbox(es) specified in `nnimap-split-inbox'. | |
129 | |
130 If you'd like, for instance, one mail group for mail from the | |
131 \"gnus-imap\" mailing list, one group for junk mail and leave | |
132 everything else in the incoming mailbox, you could do something like | |
133 this: | |
134 | |
48216
e5026995ea82
(nnimap-split-rule): Doc fix - escape open parens in column 0.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44512
diff
changeset
|
135 \(setq nnimap-split-rule '((\"INBOX.gnus-imap\" \"From:.*gnus-imap\") |
31717 | 136 (\"INBOX.junk\" \"Subject:.*buy\"))) |
137 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
138 As you can see, `nnimap-split-rule' is a list of lists, where the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
139 first element in each \"rule\" is the name of the IMAP mailbox (or the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
140 symbol `junk' if you want to remove the mail), and the second is a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
141 regexp that nnimap will try to match on the header to find a fit. |
31717 | 142 |
143 The second element can also be a function. In that case, it will be | |
144 called narrowed to the headers with the first element of the rule as | |
145 the argument. It should return a non-nil value if it thinks that the | |
146 mail belongs in that group. | |
147 | |
148 This variable can also have a function as its value, the function will | |
149 be called with the headers narrowed and should return a group where it | |
150 thinks the article should be splitted to. See `nnimap-split-fancy'. | |
151 | |
152 To allow for different split rules on different virtual servers, and | |
153 even different split rules in different inboxes on the same server, | |
154 the syntax of this variable have been extended along the lines of: | |
155 | |
48216
e5026995ea82
(nnimap-split-rule): Doc fix - escape open parens in column 0.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
44512
diff
changeset
|
156 \(setq nnimap-split-rule |
31717 | 157 '((\"my1server\" (\".*\" ((\"ding\" \"ding@gnus.org\") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
158 (\"junk\" \"From:.*Simon\"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
159 (\"my2server\" (\"INBOX\" nnimap-split-fancy)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
160 (\"my[34]server\" (\".*\" ((\"private\" \"To:.*Simon\") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
161 (\"junk\" my-junk-func))))) |
31717 | 162 |
163 The virtual server name is in fact a regexp, so that the same rules | |
164 may apply to several servers. In the example, the servers | |
165 \"my3server\" and \"my4server\" both use the same rules. Similarly, | |
166 the inbox string is also a regexp. The actual splitting rules are as | |
167 before, either a function, or a list with group/regexp or | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
168 group/function elements." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
169 :group 'nnimap |
100993 | 170 ;; FIXME: Doesn't allow `("my2server" ("INBOX" nnimap-split-fancy))' |
171 ;; per example above. -- fx | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
172 :type '(choice :tag "Rule type" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
173 (repeat :menu-tag "Single-server" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
174 :tag "Single-server list" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
175 (list (string :tag "Mailbox") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
176 (choice :tag "Predicate" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
177 (regexp :tag "A regexp") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
178 (nnimap-strict-function :tag "A function")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
179 (choice :menu-tag "A function" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
180 :tag "A function" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
181 (function-item nnimap-split-fancy) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
182 (function-item nnmail-split-fancy) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
183 (nnimap-strict-function :tag "User-defined function")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
184 (repeat :menu-tag "Multi-server (extended)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
185 :tag "Multi-server list" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
186 (list (regexp :tag "Server regexp") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
187 (list (regexp :tag "Incoming Mailbox regexp") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
188 (repeat :tag "Rules for matching server(s) and mailbox(es)" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
189 (list (string :tag "Destination mailbox") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
190 (choice :tag "Predicate" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
191 (regexp :tag "A Regexp") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
192 (nnimap-strict-function :tag "A Function"))))))))) |
31717 | 193 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
194 (defcustom nnimap-split-predicate "UNSEEN UNDELETED" |
31717 | 195 "The predicate used to find articles to split. |
196 If you use another IMAP client to peek on articles but always would | |
197 like nnimap to split them once it's started, you could change this to | |
198 \"UNDELETED\". Other available predicates are available in | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
199 RFC2060 section 6.4.4." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
200 :group 'nnimap |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
201 :type 'string) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
202 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
203 (defcustom nnimap-split-fancy nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
204 "Like the variable `nnmail-split-fancy'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
205 :group 'nnimap |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
206 :type 'sexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
207 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
208 (defvar nnimap-split-download-body-default nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
209 "Internal variable with default value for `nnimap-split-download-body'.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
210 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
211 (defcustom nnimap-split-download-body 'default |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
212 "Whether to download entire articles during splitting. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
213 This is generally not required, and will slow things down considerably. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
214 You may need it if you want to use an advanced splitting function that |
63617
f02351c457a6
(nnimap-split-download-body): Fix spellings.
Juanma Barranquero <lekktu@gmail.com>
parents:
61463
diff
changeset
|
215 analyzes the body before splitting the article. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
216 If this variable is nil, bodies will not be downloaded; if this |
79419
12805c0f0e4e
(nnimap-split-download-body): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
78486
diff
changeset
|
217 variable is the symbol `default' the default behavior is |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
218 used (which currently is nil, unless you use a statistical |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
219 spam.el test); if this variable is another non-nil value bodies |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
220 will be downloaded." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
221 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
222 :group 'nnimap |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
223 :type '(choice (const :tag "Let system decide" deault) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
224 boolean)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
225 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
226 ;; Performance / bug workaround variables |
31717 | 227 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
228 (defcustom nnimap-close-asynchronous t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
229 "Close mailboxes asynchronously in `nnimap-close-group'. |
57153
497f0d2ca551
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-558
Miles Bader <miles@gnu.org>
parents:
57120
diff
changeset
|
230 This means that errors caught by nnimap when closing the mailbox will |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
231 not prevent Gnus from updating the group status, which may be harmful. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
232 However, it increases speed." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
233 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
234 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
235 :group 'nnimap) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
236 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
237 (defcustom nnimap-dont-close t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
238 "Never close mailboxes. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
239 This increases the speed of closing mailboxes (quiting group) but may |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
240 decrease the speed of selecting another mailbox later. Re-selecting |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
241 the same mailbox will be faster though." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
242 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
243 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
244 :group 'nnimap) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
245 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
246 (defcustom nnimap-retrieve-groups-asynchronous t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
247 "Send asynchronous STATUS commands for each mailbox before checking mail. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
248 If you have mailboxes that rarely receives mail, this speeds up new |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
249 mail checking. It works by first sending STATUS commands for each |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
250 mailbox, and then only checking groups which has a modified UIDNEXT |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
251 more carefully for new mail. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
252 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
253 In summary, the default is O((1-p)*k+p*n) and changing it to nil makes |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
254 it O(n). If p is small, then the default is probably faster." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
255 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
256 :type 'boolean |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
257 :group 'nnimap) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
258 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
259 (defvoo nnimap-need-unselect-to-notice-new-mail t |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
260 "Unselect mailboxes before looking for new mail in them. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
261 Some servers seem to need this under some circumstances.") |
31717 | 262 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
263 (defvoo nnimap-logout-timeout nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
264 "Close server immediately if it can't logout in this number of seconds. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
265 If it is nil, never close server until logout completes. This variable |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
266 overrides `imap-logout-timeout' on a per-server basis.") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
267 |
31717 | 268 ;; Authorization / Privacy variables |
269 | |
270 (defvoo nnimap-auth-method nil | |
271 "Obsolete.") | |
272 | |
273 (defvoo nnimap-stream nil | |
274 "How nnimap will connect to the server. | |
275 | |
276 The default, nil, will try to use the \"best\" method the server can | |
277 handle. | |
278 | |
279 Change this if | |
280 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
281 1) you want to connect with TLS/SSL. The TLS/SSL integration |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
282 with IMAP is suboptimal so you'll have to tell it |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
283 specifically. |
31717 | 284 |
285 2) your server is more capable than your environment -- i.e. your | |
286 server accept Kerberos login's but you haven't installed the | |
287 `imtest' program or your machine isn't configured for Kerberos. | |
288 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
289 Possible choices: gssapi, kerberos4, starttls, tls, ssl, network, shell. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
290 See also `imap-streams' and `imap-stream-alist'.") |
31717 | 291 |
292 (defvoo nnimap-authenticator nil | |
293 "How nnimap authenticate itself to the server. | |
294 | |
295 The default, nil, will try to use the \"best\" method the server can | |
296 handle. | |
297 | |
298 There is only one reason for fiddling with this variable, and that is | |
299 if your server is more capable than your environment -- i.e. you | |
300 connect to a server that accept Kerberos login's but you haven't | |
301 installed the `imtest' program or your machine isn't configured for | |
302 Kerberos. | |
303 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
304 Possible choices: gssapi, kerberos4, digest-md5, cram-md5, login, anonymous. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
305 See also `imap-authenticators' and `imap-authenticator-alist'") |
31717 | 306 |
307 (defvoo nnimap-directory (nnheader-concat gnus-directory "overview/") | |
308 "Directory to keep NOV cache files for nnimap groups. | |
309 See also `nnimap-nov-file-name'.") | |
310 | |
311 (defvoo nnimap-nov-file-name "nnimap." | |
312 "NOV cache base filename. | |
313 The group name and `nnimap-nov-file-name-suffix' will be appended. A | |
314 typical complete file name would be | |
315 ~/News/overview/nnimap.pdc.INBOX.ding.nov, or | |
316 ~/News/overview/nnimap/pdc/INBOX/ding/nov if | |
317 `nnmail-use-long-file-names' is nil") | |
318 | |
319 (defvoo nnimap-nov-file-name-suffix ".novcache" | |
320 "Suffix for NOV cache base filename.") | |
321 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
322 (defvoo nnimap-nov-is-evil gnus-agent |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
323 "If non-nil, never generate or use a local nov database for this backend. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
324 Using nov databases should speed up header fetching considerably. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
325 However, it will invoke a UID SEARCH UID command on the server, and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
326 some servers implement this command inefficiently by opening each and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
327 every message in the group, thus making it quite slow. |
31717 | 328 Unlike other backends, you do not need to take special care if you |
329 flip this variable.") | |
330 | |
66573
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
331 (defvoo nnimap-search-uids-not-since-is-evil nil |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
332 "If non-nil, avoid \"UID SEARCH UID ... NOT SINCE\" queries when expiring. |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
333 Instead, use \"UID SEARCH SINCE\" to prune the list of expirable |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
334 articles within Gnus. This seems to be faster on Courier in some cases.") |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
335 |
31717 | 336 (defvoo nnimap-expunge-on-close 'always ; 'ask, 'never |
337 "Whether to expunge a group when it is closed. | |
338 When a IMAP group with articles marked for deletion is closed, this | |
339 variable determine if nnimap should actually remove the articles or | |
340 not. | |
341 | |
342 If always, nnimap always perform a expunge when closing the group. | |
343 If never, nnimap never expunges articles marked for deletion. | |
344 If ask, nnimap will ask you if you wish to expunge marked articles. | |
345 | |
346 When setting this variable to `never', you can only expunge articles | |
347 by using `G x' (gnus-group-nnimap-expunge) from the Group buffer.") | |
348 | |
349 (defvoo nnimap-list-pattern "*" | |
350 "A string LIMIT or list of strings with mailbox wildcards used to limit available groups. | |
351 See below for available wildcards. | |
352 | |
353 The LIMIT string can be a cons cell (REFERENCE . LIMIT), where | |
354 REFERENCE will be passed as the first parameter to LIST/LSUB. The | |
355 semantics of this are server specific, on the University of Washington | |
356 server you can specify a directory. | |
357 | |
358 Example: | |
359 '(\"INBOX\" \"mail/*\" (\"~friend/mail/\" . \"list/*\")) | |
360 | |
361 There are two wildcards * and %. * matches everything, % matches | |
362 everything in the current hierarchy.") | |
363 | |
364 (defvoo nnimap-news-groups nil | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
365 "IMAP support a news-like mode, also known as bulletin board mode, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
366 where replies is sent via IMAP instead of SMTP. |
31717 | 367 |
368 This variable should contain a regexp matching groups where you wish | |
369 replies to be stored to the mailbox directly. | |
370 | |
371 Example: | |
372 '(\"^[^I][^N][^B][^O][^X].*$\") | |
373 | |
374 This will match all groups not beginning with \"INBOX\". | |
375 | |
376 Note that there is nothing technically different between mail-like and | |
377 news-like mailboxes. If you wish to have a group with todo items or | |
378 similar which you wouldn't want to set up a mailing list for, you can | |
379 use this to make replies go directly to the group.") | |
380 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
381 (defvoo nnimap-expunge-search-string "UID %s NOT SINCE %s" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
382 "IMAP search command to use for articles that are to be expired. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
383 The first %s is replaced by a UID set of articles to search on, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
384 and the second %s is replaced by a date criterium. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
385 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
386 One useful (and perhaps the only useful) value to change this to would |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
387 be `UID %s NOT SENTSINCE %s' to make nnimap use the Date: header |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
388 instead of the internal date of messages. See section 6.4.4 of RFC |
74984 | 389 2060 for more information on valid strings. |
390 | |
391 However, if `nnimap-search-uids-not-since-is-evil' is true, this | |
392 variable has no effect since the search logic is reversed.") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
393 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
394 (defvoo nnimap-importantize-dormant t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
395 "If non-nil, mark \"dormant\" articles as \"ticked\" for other IMAP clients. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
396 Note that within Gnus, dormant articles will still (only) be |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
397 marked as ticked. This is to make \"dormant\" articles stand out, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
398 just like \"ticked\" articles, in other IMAP clients.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
399 |
31717 | 400 (defvoo nnimap-server-address nil |
401 "Obsolete. Use `nnimap-address'.") | |
402 | |
403 (defcustom nnimap-authinfo-file "~/.authinfo" | |
404 "Authorization information for IMAP servers. In .netrc format." | |
405 :type | |
406 '(choice file | |
407 (repeat :tag "Entries" | |
408 :menu-tag "Inline" | |
409 (list :format "%v" | |
410 :value ("" ("login" . "") ("password" . "")) | |
411 (string :tag "Host") | |
412 (checklist :inline t | |
413 (cons :format "%v" | |
414 (const :format "" "login") | |
415 (string :format "Login: %v")) | |
416 (cons :format "%v" | |
417 (const :format "" "password") | |
56280
5716fec2dbc0
(nnimap-authinfo-file, nnimap-prune-cache): Add :group 'nnimap.
Kim F. Storm <storm@cua.dk>
parents:
55398
diff
changeset
|
418 (string :format "Password: %v")))))) |
5716fec2dbc0
(nnimap-authinfo-file, nnimap-prune-cache): Add :group 'nnimap.
Kim F. Storm <storm@cua.dk>
parents:
55398
diff
changeset
|
419 :group 'nnimap) |
31717 | 420 |
421 (defcustom nnimap-prune-cache t | |
422 "If non-nil, nnimap check whether articles still exist on server before using data stored in NOV cache." | |
56280
5716fec2dbc0
(nnimap-authinfo-file, nnimap-prune-cache): Add :group 'nnimap.
Kim F. Storm <storm@cua.dk>
parents:
55398
diff
changeset
|
423 :type 'boolean |
5716fec2dbc0
(nnimap-authinfo-file, nnimap-prune-cache): Add :group 'nnimap.
Kim F. Storm <storm@cua.dk>
parents:
55398
diff
changeset
|
424 :group 'nnimap) |
31717 | 425 |
426 (defvar nnimap-request-list-method 'imap-mailbox-list | |
427 "Method to use to request a list of all folders from the server. | |
428 If this is 'imap-mailbox-lsub, then use a server-side subscription list to | |
429 restrict visible folders.") | |
430 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
431 (defcustom nnimap-id nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
432 "Plist with client identity to send to server upon login. |
96488
a30459da1bd7
* nnimap.el (nnimap-id):
Juanma Barranquero <lekktu@gmail.com>
parents:
96024
diff
changeset
|
433 A nil value means no information is sent, symbol `no' to disable ID query |
a30459da1bd7
* nnimap.el (nnimap-id):
Juanma Barranquero <lekktu@gmail.com>
parents:
96024
diff
changeset
|
434 altogether, or plist with identifier-value pairs to send to |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
435 server. RFC 2971 describes the list as follows: |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
436 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
437 Any string may be sent as a field, but the following are defined to |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
438 describe certain values that might be sent. Implementations are free |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
439 to send none, any, or all of these. Strings are not case-sensitive. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
440 Field strings MUST NOT be longer than 30 octets. Value strings MUST |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
441 NOT be longer than 1024 octets. Implementations MUST NOT send more |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
442 than 30 field-value pairs. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
443 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
444 name Name of the program |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
445 version Version number of the program |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
446 os Name of the operating system |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
447 os-version Version of the operating system |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
448 vendor Vendor of the client/server |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
449 support-url URL to contact for support |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
450 address Postal address of contact/vendor |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
451 date Date program was released, specified as a date-time |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
452 in IMAP4rev1 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
453 command Command used to start the program |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
454 arguments Arguments supplied on the command line, if any |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
455 if any |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
456 environment Description of environment, i.e., UNIX environment |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
457 variables or Windows registry settings |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
458 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
459 Implementations MUST NOT send the same field name more than once. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
460 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
461 An example plist would be '(\"name\" \"Gnus\" \"version\" gnus-version-number |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
462 \"os\" system-configuration \"vendor\" \"GNU\")." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
463 :group 'nnimap |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
464 :type '(choice (const :tag "No information" nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
465 (const :tag "Disable ID query" no) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
466 (plist :key-type string :value-type string))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
467 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
468 (defcustom nnimap-debug nil |
100993 | 469 "If non-nil, trace nnimap- functions into `nnimap-debug-buffer'. |
470 Uses `trace-function-background', so you can turn it off with, | |
471 say, `untrace-all'. | |
472 | |
60161
b070535d2416
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-111
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
473 Note that username, passwords and other privacy sensitive |
100993 | 474 information (such as e-mail) may be stored in the buffer. |
475 It is not written to disk, however. Do not enable this | |
476 variable unless you are comfortable with that. | |
477 | |
478 This variable only takes effect when loading the `nnimap' library. | |
479 See also `nnimap-log'." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
480 :group 'nnimap |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
481 :type 'boolean) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
482 |
31717 | 483 ;; Internal variables: |
484 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
485 (defvar nnimap-debug-buffer "*nnimap-debug*") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
486 (defvar nnimap-mailbox-info (gnus-make-hashtable 997)) |
31717 | 487 (defvar nnimap-current-move-server nil) |
488 (defvar nnimap-current-move-group nil) | |
489 (defvar nnimap-current-move-article nil) | |
490 (defvar nnimap-length) | |
491 (defvar nnimap-progress-chars '(?| ?/ ?- ?\\)) | |
492 (defvar nnimap-progress-how-often 20) | |
493 (defvar nnimap-counter) | |
494 (defvar nnimap-server-buffer-alist nil) ;; Map server name to buffers. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
495 (defvar nnimap-current-server nil) ;; Current server |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
496 (defvar nnimap-server-buffer nil) ;; Current servers' buffer |
31717 | 497 |
498 | |
499 | |
500 (nnoo-define-basics nnimap) | |
501 | |
502 ;; Utility functions: | |
503 | |
107473 | 504 (defsubst nnimap-decode-group-name (group) |
505 (and group | |
506 (gnus-group-decoded-name group))) | |
507 | |
508 (defsubst nnimap-encode-group-name (group) | |
509 (and group | |
510 (mm-encode-coding-string group (gnus-group-name-charset nil group)))) | |
511 | |
512 (defun nnimap-group-prefixed-name (group &optional server) | |
513 (gnus-group-prefixed-name group | |
514 (gnus-server-to-method | |
515 (format "nnimap:%s" | |
516 (or server nnimap-current-server))))) | |
517 | |
31717 | 518 (defsubst nnimap-get-server-buffer (server) |
519 "Return buffer for SERVER, if nil use current server." | |
520 (cadr (assoc (or server nnimap-current-server) nnimap-server-buffer-alist))) | |
521 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
522 (defun nnimap-remove-server-from-buffer-alist (server list) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
523 "Remove SERVER from LIST." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
524 (let (l) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
525 (dolist (e list) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
526 (unless (equal server (car-safe e)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
527 (push e l))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
528 l)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
529 |
31717 | 530 (defun nnimap-possibly-change-server (server) |
531 "Return buffer for SERVER, changing the current server as a side-effect. | |
532 If SERVER is nil, uses the current server." | |
533 (setq nnimap-current-server (or server nnimap-current-server) | |
534 nnimap-server-buffer (nnimap-get-server-buffer nnimap-current-server))) | |
535 | |
536 (defun nnimap-verify-uidvalidity (group server) | |
537 "Verify stored uidvalidity match current one in GROUP on SERVER." | |
107473 | 538 (let* ((gnusgroup (nnimap-group-prefixed-name group server)) |
31717 | 539 (new-uidvalidity (imap-mailbox-get 'uidvalidity)) |
32995
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
540 (old-uidvalidity (gnus-group-get-parameter gnusgroup 'uidvalidity)) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
541 (dir (file-name-as-directory (expand-file-name nnimap-directory))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
542 (nameuid (nnheader-translate-file-chars |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
543 (concat nnimap-nov-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
544 (if (equal server "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
545 "unnamed" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
546 server) "." group "." old-uidvalidity |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
547 nnimap-nov-file-name-suffix) t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
548 (file (if (or nnmail-use-long-file-names |
32995
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
549 (file-exists-p (expand-file-name nameuid dir))) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
550 (expand-file-name nameuid dir) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
551 (expand-file-name |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
552 (mm-encode-coding-string |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
553 (nnheader-replace-chars-in-string nameuid ?. ?/) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
554 nnmail-pathname-coding-system) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
555 dir)))) |
31717 | 556 (if old-uidvalidity |
557 (if (not (equal old-uidvalidity new-uidvalidity)) | |
32995
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
558 ;; uidvalidity clash |
107473 | 559 (progn |
560 (gnus-group-set-parameter gnusgroup 'uidvalidity new-uidvalidity) | |
561 (gnus-group-remove-parameter gnusgroup 'imap-status) | |
562 (gnus-sethash (gnus-group-prefixed-name group server) | |
563 nil nnimap-mailbox-info) | |
564 (gnus-delete-file file)) | |
31717 | 565 t) |
566 (gnus-group-add-parameter gnusgroup (cons 'uidvalidity new-uidvalidity)) | |
107473 | 567 (gnus-group-remove-parameter gnusgroup 'imap-status) |
568 (gnus-sethash ; Maybe not necessary here. | |
569 (gnus-group-prefixed-name group server) | |
570 nil nnimap-mailbox-info) | |
31717 | 571 t))) |
572 | |
573 (defun nnimap-before-find-minmax-bugworkaround () | |
574 "Function called before iterating through mailboxes with | |
575 `nnimap-find-minmax-uid'." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
576 (when nnimap-need-unselect-to-notice-new-mail |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
577 ;; XXX this is for UoW imapd problem, it doesn't notice new mail in |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
578 ;; currently selected mailbox without a re-select/examine. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
579 (or (null (imap-current-mailbox nnimap-server-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
580 (imap-mailbox-unselect nnimap-server-buffer)))) |
31717 | 581 |
582 (defun nnimap-find-minmax-uid (group &optional examine) | |
48588 | 583 "Find lowest and highest active article number in GROUP. |
31717 | 584 If EXAMINE is non-nil the group is selected read-only." |
585 (with-current-buffer nnimap-server-buffer | |
107473 | 586 (let ((decoded-group (nnimap-decode-group-name group))) |
587 (when (or (string= decoded-group (imap-current-mailbox)) | |
588 (imap-mailbox-select decoded-group examine)) | |
589 (let (minuid maxuid) | |
590 (when (> (imap-mailbox-get 'exists) 0) | |
591 (imap-fetch-safe '("1,*" . "1,*:*") "UID" nil 'nouidfetch) | |
592 (imap-message-map (lambda (uid Uid) | |
593 (setq minuid (if minuid (min minuid uid) uid) | |
594 maxuid (if maxuid (max maxuid uid) uid))) | |
595 'UID)) | |
596 (list (imap-mailbox-get 'exists) minuid maxuid)))))) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
597 |
31717 | 598 (defun nnimap-possibly-change-group (group &optional server) |
599 "Make GROUP the current group, and SERVER the current server." | |
600 (when (nnimap-possibly-change-server server) | |
107473 | 601 (let ((decoded-group (nnimap-decode-group-name group))) |
602 (with-current-buffer nnimap-server-buffer | |
603 (if (or (null group) (imap-current-mailbox-p decoded-group)) | |
604 imap-current-mailbox ; Note: utf-7 encoded. | |
605 (if (imap-mailbox-select decoded-group) | |
606 (if (or (nnimap-verify-uidvalidity | |
607 group (or server nnimap-current-server)) | |
608 (zerop (imap-mailbox-get 'exists decoded-group)) | |
609 t ;; for OGnus to see if ignoring uidvalidity | |
610 ;; changes has any bad effects. | |
611 (yes-or-no-p | |
612 (format | |
613 "nnimap: Group %s is not uidvalid. Continue? " | |
614 decoded-group))) | |
615 imap-current-mailbox ; Note: utf-7 encoded. | |
616 (imap-mailbox-unselect) | |
617 (error "nnimap: Group %s is not uid-valid" decoded-group)) | |
618 (nnheader-report 'nnimap (imap-error-text)))))))) | |
31717 | 619 |
620 (defun nnimap-replace-whitespace (string) | |
621 "Return STRING with all whitespace replaced with space." | |
622 (when string | |
623 (while (string-match "[\r\n\t]+" string) | |
624 (setq string (replace-match " " t t string))) | |
625 string)) | |
626 | |
627 ;; Required backend functions | |
628 | |
629 (defun nnimap-retrieve-headers-progress () | |
630 "Hook to insert NOV line for current article into `nntp-server-buffer'." | |
631 (and (numberp nnmail-large-newsgroup) | |
632 (zerop (% (incf nnimap-counter) nnimap-progress-how-often)) | |
633 (> nnimap-length nnmail-large-newsgroup) | |
634 (nnheader-message 6 "nnimap: Retrieving headers... %c" | |
635 (nth (/ (% nnimap-counter | |
636 (* (length nnimap-progress-chars) | |
637 nnimap-progress-how-often)) | |
638 nnimap-progress-how-often) | |
639 nnimap-progress-chars))) | |
640 (with-current-buffer nntp-server-buffer | |
641 (let (headers lines chars uid mbx) | |
642 (with-current-buffer nnimap-server-buffer | |
643 (setq uid imap-current-message | |
107473 | 644 mbx (nnimap-encode-group-name (imap-current-mailbox)) |
100124
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
645 headers (if (imap-capability 'IMAP4rev1) |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
646 ;; xxx don't just use car? alist doesn't contain |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
647 ;; anything else now, but it might... |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
648 (nth 2 (car (imap-message-get uid 'BODYDETAIL))) |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
649 (imap-message-get uid 'RFC822.HEADER)) |
31717 | 650 lines (imap-body-lines (imap-message-body imap-current-message)) |
651 chars (imap-message-get imap-current-message 'RFC822.SIZE))) | |
652 (nnheader-insert-nov | |
92770
b7f1378e2a2c
(nnimap-retrieve-headers-progress): Use a unibyte temp buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92147
diff
changeset
|
653 ;; At this stage, we only have bytes, so let's use unibyte buffers |
b7f1378e2a2c
(nnimap-retrieve-headers-progress): Use a unibyte temp buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92147
diff
changeset
|
654 ;; to make it more clear. |
b7f1378e2a2c
(nnimap-retrieve-headers-progress): Use a unibyte temp buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92147
diff
changeset
|
655 (mm-with-unibyte-buffer |
31717 | 656 (buffer-disable-undo) |
100874
8698a8bb7d0e
Gnus: Add explanations for recent changes to the code itself.
Michael Olson <mwolson@gnu.org>
parents:
100871
diff
changeset
|
657 ;; headers can be nil if article is write-only |
100871
1d5b4a08955f
Gnus: Fix edge cases with no data being returned and Courier eccentricity.
Michael Olson <mwolson@gnu.org>
parents:
100124
diff
changeset
|
658 (when headers (insert headers)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
659 (let ((head (nnheader-parse-naked-head uid))) |
31717 | 660 (mail-header-set-number head uid) |
661 (mail-header-set-chars head chars) | |
662 (mail-header-set-lines head lines) | |
663 (mail-header-set-xref | |
664 head (format "%s %s:%d" (system-name) mbx uid)) | |
665 head)))))) | |
666 | |
667 (defun nnimap-retrieve-which-headers (articles fetch-old) | |
668 "Get a range of articles to fetch based on ARTICLES and FETCH-OLD." | |
669 (with-current-buffer nnimap-server-buffer | |
670 (if (numberp (car-safe articles)) | |
671 (imap-search | |
672 (concat "UID " | |
673 (imap-range-to-message-set | |
674 (gnus-compress-sequence | |
675 (append (gnus-uncompress-sequence | |
676 (and fetch-old | |
677 (cons (if (numberp fetch-old) | |
678 (max 1 (- (car articles) fetch-old)) | |
679 1) | |
680 (1- (car articles))))) | |
681 articles))))) | |
682 (mapcar (lambda (msgid) | |
683 (imap-search | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
684 (format "HEADER Message-Id \"%s\"" msgid))) |
31717 | 685 articles)))) |
686 | |
687 (defun nnimap-group-overview-filename (group server) | |
49274
eb2699620e9c
* gnus-agent.el: Don't use `path'.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
48588
diff
changeset
|
688 "Make file name for GROUP on SERVER." |
32995
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
689 (let* ((dir (file-name-as-directory (expand-file-name nnimap-directory))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
690 (uidvalidity (gnus-group-get-parameter |
107473 | 691 (nnimap-group-prefixed-name group server) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
692 'uidvalidity)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
693 (name (nnheader-translate-file-chars |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
694 (concat nnimap-nov-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
695 (if (equal server "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
696 "unnamed" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
697 server) "." group nnimap-nov-file-name-suffix) t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
698 (nameuid (nnheader-translate-file-chars |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
699 (concat nnimap-nov-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
700 (if (equal server "") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
701 "unnamed" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
702 server) "." group "." uidvalidity |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
703 nnimap-nov-file-name-suffix) t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
704 (oldfile (if (or nnmail-use-long-file-names |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
705 (file-exists-p (expand-file-name name dir))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
706 (expand-file-name name dir) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
707 (expand-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
708 (mm-encode-coding-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
709 (nnheader-replace-chars-in-string name ?. ?/) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
710 nnmail-pathname-coding-system) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
711 dir))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
712 (newfile (if (or nnmail-use-long-file-names |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
713 (file-exists-p (expand-file-name nameuid dir))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
714 (expand-file-name nameuid dir) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
715 (expand-file-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
716 (mm-encode-coding-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
717 (nnheader-replace-chars-in-string nameuid ?. ?/) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
718 nnmail-pathname-coding-system) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
719 dir)))) |
32995
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
720 (when (and (file-exists-p oldfile) (not (file-exists-p newfile))) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
721 (message "nnimap: Upgrading novcache filename...") |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
722 (sit-for 1) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
723 (gnus-make-directory (file-name-directory newfile)) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
724 (unless (ignore-errors (rename-file oldfile newfile) t) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
725 (if (ignore-errors (copy-file oldfile newfile) t) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
726 (delete-file oldfile) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
727 (error "Can't rename `%s' to `%s'" oldfile newfile)))) |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
728 newfile)) |
31717 | 729 |
730 (defun nnimap-retrieve-headers-from-file (group server) | |
731 (with-current-buffer nntp-server-buffer | |
732 (let ((nov (nnimap-group-overview-filename group server))) | |
733 (when (file-exists-p nov) | |
734 (mm-insert-file-contents nov) | |
735 (set-buffer-modified-p nil) | |
736 (let ((min (ignore-errors (goto-char (point-min)) | |
737 (read (current-buffer)))) | |
738 (max (ignore-errors (goto-char (point-max)) | |
739 (forward-line -1) | |
740 (read (current-buffer))))) | |
741 (if (and (numberp min) (numberp max)) | |
742 (cons min max) | |
743 ;; junk, remove it, it's saved later | |
744 (erase-buffer) | |
745 nil)))))) | |
746 | |
747 (defun nnimap-retrieve-headers-from-server (articles group server) | |
748 (with-current-buffer nnimap-server-buffer | |
749 (let ((imap-fetch-data-hook '(nnimap-retrieve-headers-progress)) | |
750 (nnimap-length (gnus-range-length articles)) | |
751 (nnimap-counter 0)) | |
752 (imap-fetch (imap-range-to-message-set articles) | |
753 (concat "(UID RFC822.SIZE BODY " | |
754 (let ((headers | |
755 (append '(Subject From Date Message-Id | |
756 References In-Reply-To Xref) | |
757 (copy-sequence | |
758 nnmail-extra-headers)))) | |
759 (if (imap-capability 'IMAP4rev1) | |
760 (format "BODY.PEEK[HEADER.FIELDS %s])" headers) | |
761 (format "RFC822.HEADER.LINES %s)" headers))))) | |
60526
bbb951948fa8
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-165
Miles Bader <miles@gnu.org>
parents:
60161
diff
changeset
|
762 (with-current-buffer nntp-server-buffer |
60558
474d659beb95
(nnimap-retrieve-headers-from-server): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
60526
diff
changeset
|
763 (sort-numeric-fields 1 (point-min) (point-max))) |
31717 | 764 (and (numberp nnmail-large-newsgroup) |
765 (> nnimap-length nnmail-large-newsgroup) | |
766 (nnheader-message 6 "nnimap: Retrieving headers...done"))))) | |
767 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
768 (defun nnimap-dont-use-nov-p (group server) |
31717 | 769 (or gnus-nov-is-evil nnimap-nov-is-evil |
770 (unless (and (gnus-make-directory | |
771 (file-name-directory | |
772 (nnimap-group-overview-filename group server))) | |
773 (file-writable-p | |
774 (nnimap-group-overview-filename group server))) | |
775 (message "nnimap: Nov cache not writable, %s" | |
776 (nnimap-group-overview-filename group server))))) | |
777 | |
778 (deffoo nnimap-retrieve-headers (articles &optional group server fetch-old) | |
779 (when (nnimap-possibly-change-group group server) | |
780 (with-current-buffer nntp-server-buffer | |
781 (erase-buffer) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
782 (if (nnimap-dont-use-nov-p group server) |
31717 | 783 (nnimap-retrieve-headers-from-server |
784 (gnus-compress-sequence articles) group server) | |
785 (let (uids cached low high) | |
786 (when (setq uids (nnimap-retrieve-which-headers articles fetch-old) | |
787 low (car uids) | |
788 high (car (last uids))) | |
789 (if (setq cached (nnimap-retrieve-headers-from-file group server)) | |
790 (progn | |
791 ;; fetch articles with uids before cache block | |
792 (when (< low (car cached)) | |
793 (goto-char (point-min)) | |
794 (nnimap-retrieve-headers-from-server | |
795 (cons low (1- (car cached))) group server)) | |
796 ;; fetch articles with uids after cache block | |
797 (when (> high (cdr cached)) | |
798 (goto-char (point-max)) | |
799 (nnimap-retrieve-headers-from-server | |
800 (cons (1+ (cdr cached)) high) group server)) | |
801 (when nnimap-prune-cache | |
802 ;; remove nov's for articles which has expired on server | |
803 (goto-char (point-min)) | |
804 (dolist (uid (gnus-set-difference articles uids)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
805 (when (re-search-forward (format "^%d\t" uid) nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
806 (gnus-delete-line))))) |
31717 | 807 ;; nothing cached, fetch whole range from server |
808 (nnimap-retrieve-headers-from-server | |
809 (cons low high) group server)) | |
810 (when (buffer-modified-p) | |
811 (nnmail-write-region | |
44512
d9d12d6d22cc
(nnimap-retrieve-headers): Don't assume point-min == 1.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
40494
diff
changeset
|
812 (point-min) (point-max) |
d9d12d6d22cc
(nnimap-retrieve-headers): Don't assume point-min == 1.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
40494
diff
changeset
|
813 (nnimap-group-overview-filename group server) nil 'nomesg)) |
31717 | 814 (nnheader-nov-delete-outside-range low high)))) |
815 'nov))) | |
816 | |
107427
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
817 (declare-function netrc-parse "netrc" (file)) |
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
818 (declare-function netrc-machine-user-or-password "netrc" |
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
819 (mode authinfo-file-or-list machines ports defaults)) |
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
820 |
31717 | 821 (defun nnimap-open-connection (server) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
822 ;; Note: `nnimap-open-server' that calls this function binds |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
823 ;; `imap-logout-timeout' to `nnimap-logout-timeout'. |
31717 | 824 (if (not (imap-open nnimap-address nnimap-server-port nnimap-stream |
825 nnimap-authenticator nnimap-server-buffer)) | |
826 (nnheader-report 'nnimap "Can't open connection to server %s" server) | |
107427
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
827 (require 'netrc) |
31717 | 828 (unless (or (imap-capability 'IMAP4 nnimap-server-buffer) |
829 (imap-capability 'IMAP4rev1 nnimap-server-buffer)) | |
830 (imap-close nnimap-server-buffer) | |
831 (nnheader-report 'nnimap "Server %s is not IMAP4 compliant" server)) | |
60696
7503b2a24a3c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-187
Miles Bader <miles@gnu.org>
parents:
60558
diff
changeset
|
832 (let* ((list (progn (gnus-message 7 "Parsing authinfo file `%s'." |
7503b2a24a3c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-187
Miles Bader <miles@gnu.org>
parents:
60558
diff
changeset
|
833 nnimap-authinfo-file) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
834 (netrc-parse nnimap-authinfo-file))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
835 (port (if nnimap-server-port |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
836 (int-to-string nnimap-server-port) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
837 "imap")) |
107427
ecbe0edc4f69
Stop message.el from loading about 40 libraries it doesn't always need.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
838 (auth-info |
101804 | 839 (auth-source-user-or-password '("login" "password") server port)) |
840 (auth-user (nth 0 auth-info)) | |
841 (auth-passwd (nth 1 auth-info)) | |
95820
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
94980
diff
changeset
|
842 (user (or |
101804 | 843 auth-user ; this is preferred to netrc-* |
94837 | 844 (netrc-machine-user-or-password |
845 "login" | |
846 list | |
847 (list server | |
848 (or nnimap-server-address | |
849 nnimap-address)) | |
850 (list port) | |
851 (list "imap" "imaps" "143" "993")))) | |
95820
645fb33380d6
Remove unnecessary eval-and-compile of autoloads.
Glenn Morris <rgm@gnu.org>
parents:
94980
diff
changeset
|
852 (passwd (or |
101804 | 853 auth-passwd ; this is preferred to netrc-* |
94837 | 854 (netrc-machine-user-or-password |
855 "password" | |
856 list | |
857 (list server | |
858 (or nnimap-server-address | |
859 nnimap-address)) | |
860 (list port) | |
861 (list "imap" "imaps" "143" "993"))))) | |
31717 | 862 (if (imap-authenticate user passwd nnimap-server-buffer) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
863 (prog2 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
864 (setq nnimap-server-buffer-alist |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
865 (nnimap-remove-server-from-buffer-alist |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
866 server |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
867 nnimap-server-buffer-alist)) |
31717 | 868 (push (list server nnimap-server-buffer) |
869 nnimap-server-buffer-alist) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
870 (imap-id nnimap-id nnimap-server-buffer) |
31717 | 871 (nnimap-possibly-change-server server)) |
872 (imap-close nnimap-server-buffer) | |
873 (kill-buffer nnimap-server-buffer) | |
874 (nnheader-report 'nnimap "Could not authenticate to %s" server))))) | |
875 | |
876 (deffoo nnimap-open-server (server &optional defs) | |
877 (nnheader-init-server-buffer) | |
878 (if (nnimap-server-opened server) | |
879 t | |
880 (unless (assq 'nnimap-server-buffer defs) | |
881 (push (list 'nnimap-server-buffer (concat " *nnimap* " server)) defs)) | |
882 ;; translate `nnimap-server-address' to `nnimap-address' in defs | |
883 ;; for people that configured nnimap with a very old version | |
884 (unless (assq 'nnimap-address defs) | |
885 (if (assq 'nnimap-server-address defs) | |
886 (push (list 'nnimap-address | |
887 (cadr (assq 'nnimap-server-address defs))) defs) | |
888 (push (list 'nnimap-address server) defs))) | |
889 (nnoo-change-server 'nnimap server defs) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
890 (or nnimap-server-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
891 (setq nnimap-server-buffer (cadr (assq 'nnimap-server-buffer defs)))) |
31717 | 892 (with-current-buffer (get-buffer-create nnimap-server-buffer) |
893 (nnoo-change-server 'nnimap server defs)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
894 (let ((imap-logout-timeout nnimap-logout-timeout)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
895 (or (and nnimap-server-buffer |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
896 (imap-opened nnimap-server-buffer) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
897 (if (with-current-buffer nnimap-server-buffer |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
898 (memq imap-state '(auth selected examine))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
899 t |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
900 (imap-close nnimap-server-buffer) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
901 (nnimap-open-connection server))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
902 (nnimap-open-connection server))))) |
31717 | 903 |
904 (deffoo nnimap-server-opened (&optional server) | |
905 "Whether SERVER is opened. | |
906 If SERVER is the current virtual server, and the connection to the | |
907 physical server is alive, this function return a non-nil value. If | |
908 SERVER is nil, it is treated as the current server." | |
909 ;; clean up autologouts?? | |
910 (and (or server nnimap-current-server) | |
911 (nnoo-server-opened 'nnimap (or server nnimap-current-server)) | |
912 (imap-opened (nnimap-get-server-buffer server)))) | |
913 | |
914 (deffoo nnimap-close-server (&optional server) | |
915 "Close connection to server and free all resources connected to it. | |
916 Return nil if the server couldn't be closed for some reason." | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
917 (let ((server (or server nnimap-current-server)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
918 (imap-logout-timeout nnimap-logout-timeout)) |
31717 | 919 (when (or (nnimap-server-opened server) |
920 (imap-opened (nnimap-get-server-buffer server))) | |
921 (imap-close (nnimap-get-server-buffer server)) | |
922 (kill-buffer (nnimap-get-server-buffer server)) | |
923 (setq nnimap-server-buffer nil | |
924 nnimap-current-server nil | |
925 nnimap-server-buffer-alist | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
926 (nnimap-remove-server-from-buffer-alist |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
927 server |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
928 nnimap-server-buffer-alist))) |
31717 | 929 (nnoo-close-server 'nnimap server))) |
930 | |
931 (deffoo nnimap-request-close () | |
932 "Close connection to all servers and free all resources that the backend have reserved. | |
933 All buffers that have been created by that | |
934 backend should be killed. (Not the nntp-server-buffer, though.) This | |
935 function is generally only called when Gnus is shutting down." | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
936 (mapc (lambda (server) (nnimap-close-server (car server))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
937 nnimap-server-buffer-alist) |
31717 | 938 (setq nnimap-server-buffer-alist nil)) |
939 | |
940 (deffoo nnimap-status-message (&optional server) | |
941 "This function returns the last error message from server." | |
942 (when (nnimap-possibly-change-server server) | |
943 (nnoo-status-message 'nnimap server))) | |
944 | |
100124
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
945 ;; We used to use a string-as-multibyte here, but it is really incorrect. |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
946 ;; This function is used when we're about to insert a unibyte string |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
947 ;; into a potentially multibyte buffer. The string is either an article |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
948 ;; header or body (or both?), undecoded. When Emacs is asked to convert |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
949 ;; a unibyte string to multibyte, it may either use the equivalent of |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
950 ;; nothing (e.g. non-Mule XEmacs), string-make-unibyte (i.e. decode using |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
951 ;; locale), string-as-multibyte (decode using emacs-internal coding system) |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
952 ;; or string-to-multibyte (keep the data undecoded as a sequence of bytes). |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
953 ;; Only the last one preserves the data such that we can reliably later on |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
954 ;; decode the text using the mime info. |
d0077257129f
(nnimap-retrieve-headers-progress): Don't use nnimap-demule
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100039
diff
changeset
|
955 (defalias 'nnimap-demule 'mm-string-to-multibyte) |
31717 | 956 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
957 (defun nnimap-make-callback (article gnus-callback buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
958 "Return a callback function." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
959 `(lambda () |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
960 (nnimap-callback ,article ,gnus-callback ,buffer))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
961 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
962 (defun nnimap-callback (article gnus-callback buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
963 (when (eq article (imap-current-message)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
964 (remove-hook 'imap-fetch-data-hook |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
965 (nnimap-make-callback article gnus-callback buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
966 (with-current-buffer buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
967 (insert |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
968 (with-current-buffer nnimap-server-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
969 (nnimap-demule |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
970 (if (imap-capability 'IMAP4rev1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
971 ;; xxx don't just use car? alist doesn't contain |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
972 ;; anything else now, but it might... |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
973 (nth 2 (car (imap-message-get article 'BODYDETAIL))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
974 (imap-message-get article 'RFC822))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
975 (nnheader-ms-strip-cr) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
976 (funcall gnus-callback t)))) |
31717 | 977 |
978 (defun nnimap-request-article-part (article part prop &optional | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
979 group server to-buffer detail) |
31717 | 980 (when (nnimap-possibly-change-group group server) |
981 (let ((article (if (stringp article) | |
982 (car-safe (imap-search | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
983 (format "HEADER Message-Id \"%s\"" article) |
31717 | 984 nnimap-server-buffer)) |
985 article))) | |
986 (when article | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
987 (gnus-message 10 "nnimap: Fetching (part of) article %d from %s..." |
107473 | 988 article (or (nnimap-decode-group-name group) |
989 (imap-current-mailbox) | |
990 (nnimap-decode-group-name | |
991 gnus-newsgroup-name))) | |
31717 | 992 (if (not nnheader-callback-function) |
993 (with-current-buffer (or to-buffer nntp-server-buffer) | |
994 (erase-buffer) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
995 (let ((data (imap-fetch article part prop nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
996 nnimap-server-buffer))) |
100874
8698a8bb7d0e
Gnus: Add explanations for recent changes to the code itself.
Michael Olson <mwolson@gnu.org>
parents:
100871
diff
changeset
|
997 ;; data can be nil if article is write-only |
100871
1d5b4a08955f
Gnus: Fix edge cases with no data being returned and Courier eccentricity.
Michael Olson <mwolson@gnu.org>
parents:
100124
diff
changeset
|
998 (when data |
1d5b4a08955f
Gnus: Fix edge cases with no data being returned and Courier eccentricity.
Michael Olson <mwolson@gnu.org>
parents:
100124
diff
changeset
|
999 (insert (nnimap-demule (if detail |
1d5b4a08955f
Gnus: Fix edge cases with no data being returned and Courier eccentricity.
Michael Olson <mwolson@gnu.org>
parents:
100124
diff
changeset
|
1000 (nth 2 (car data)) |
1d5b4a08955f
Gnus: Fix edge cases with no data being returned and Courier eccentricity.
Michael Olson <mwolson@gnu.org>
parents:
100124
diff
changeset
|
1001 data))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1002 (nnheader-ms-strip-cr) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1003 (gnus-message |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1004 10 "nnimap: Fetching (part of) article %d from %s...done" |
107473 | 1005 article (or (nnimap-decode-group-name group) |
1006 (imap-current-mailbox) | |
1007 (nnimap-decode-group-name gnus-newsgroup-name))) | |
31717 | 1008 (if (bobp) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1009 (nnheader-report 'nnimap "No such article %d in %s: %s" |
107473 | 1010 article (or (nnimap-decode-group-name group) |
1011 (imap-current-mailbox) | |
1012 (nnimap-decode-group-name | |
1013 gnus-newsgroup-name)) | |
31717 | 1014 (imap-error-text nnimap-server-buffer)) |
1015 (cons group article))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1016 (add-hook 'imap-fetch-data-hook |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
1017 (nnimap-make-callback article |
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
1018 nnheader-callback-function |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1019 nntp-server-buffer)) |
31717 | 1020 (imap-fetch-asynch article part nil nnimap-server-buffer) |
1021 (cons group article)))))) | |
1022 | |
1023 (deffoo nnimap-asynchronous-p () | |
1024 t) | |
1025 | |
1026 (deffoo nnimap-request-article (article &optional group server to-buffer) | |
1027 (if (imap-capability 'IMAP4rev1 nnimap-server-buffer) | |
1028 (nnimap-request-article-part | |
1029 article "BODY.PEEK[]" 'BODYDETAIL group server to-buffer 'detail) | |
1030 (nnimap-request-article-part | |
1031 article "RFC822.PEEK" 'RFC822 group server to-buffer))) | |
1032 | |
1033 (deffoo nnimap-request-head (article &optional group server to-buffer) | |
1034 (if (imap-capability 'IMAP4rev1 nnimap-server-buffer) | |
1035 (nnimap-request-article-part | |
1036 article "BODY.PEEK[HEADER]" 'BODYDETAIL group server to-buffer 'detail) | |
1037 (nnimap-request-article-part | |
1038 article "RFC822.HEADER" 'RFC822.HEADER group server to-buffer))) | |
1039 | |
1040 (deffoo nnimap-request-body (article &optional group server to-buffer) | |
1041 (if (imap-capability 'IMAP4rev1 nnimap-server-buffer) | |
1042 (nnimap-request-article-part | |
1043 article "BODY.PEEK[TEXT]" 'BODYDETAIL group server to-buffer 'detail) | |
1044 (nnimap-request-article-part | |
1045 article "RFC822.TEXT.PEEK" 'RFC822.TEXT group server to-buffer))) | |
1046 | |
1047 (deffoo nnimap-request-group (group &optional server fast) | |
1048 (nnimap-request-update-info-internal | |
1049 group | |
107473 | 1050 (gnus-get-info (nnimap-group-prefixed-name group server)) |
31717 | 1051 server) |
1052 (when (nnimap-possibly-change-group group server) | |
1053 (nnimap-before-find-minmax-bugworkaround) | |
1054 (let (info) | |
1055 (cond (fast group) | |
1056 ((null (setq info (nnimap-find-minmax-uid group t))) | |
1057 (nnheader-report 'nnimap "Could not get active info for %s" | |
1058 group)) | |
1059 (t | |
1060 (nnheader-insert "211 %d %d %d %s\n" (or (nth 0 info) 0) | |
1061 (max 1 (or (nth 1 info) 1)) | |
1062 (or (nth 2 info) 0) group) | |
1063 (nnheader-report 'nnimap "Group %s selected" group) | |
1064 t))))) | |
1065 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1066 (defun nnimap-update-unseen (group &optional server) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1067 "Update the unseen count in `nnimap-mailbox-info'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1068 (gnus-sethash |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1069 (gnus-group-prefixed-name group server) |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
1070 (let ((old (gnus-gethash-safe (gnus-group-prefixed-name group server) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1071 nnimap-mailbox-info))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1072 (list (nth 0 old) (nth 1 old) |
107473 | 1073 (imap-mailbox-status (nnimap-decode-group-name group) |
1074 'unseen nnimap-server-buffer))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1075 nnimap-mailbox-info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1076 |
31717 | 1077 (defun nnimap-close-group (group &optional server) |
1078 (with-current-buffer nnimap-server-buffer | |
1079 (when (and (imap-opened) | |
1080 (nnimap-possibly-change-group group server)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1081 (nnimap-update-unseen group server) |
31717 | 1082 (case nnimap-expunge-on-close |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1083 (always (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1084 (imap-mailbox-expunge nnimap-close-asynchronous) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1085 (unless nnimap-dont-close |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1086 (imap-mailbox-close nnimap-close-asynchronous)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1087 (ask (if (and (imap-search "DELETED") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1088 (gnus-y-or-n-p (format "Expunge articles in group `%s'? " |
107473 | 1089 (imap-current-mailbox)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1090 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1091 (imap-mailbox-expunge nnimap-close-asynchronous) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1092 (unless nnimap-dont-close |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1093 (imap-mailbox-close nnimap-close-asynchronous))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1094 (imap-mailbox-unselect))) |
31717 | 1095 (t (imap-mailbox-unselect))) |
1096 (not imap-current-mailbox)))) | |
1097 | |
1098 (defun nnimap-pattern-to-list-arguments (pattern) | |
1099 (mapcar (lambda (p) | |
1100 (cons (car-safe p) (or (cdr-safe p) p))) | |
1101 (if (and (listp pattern) | |
1102 (listp (cdr pattern))) | |
1103 pattern | |
1104 (list pattern)))) | |
1105 | |
1106 (deffoo nnimap-request-list (&optional server) | |
1107 (when (nnimap-possibly-change-server server) | |
1108 (with-current-buffer nntp-server-buffer | |
1109 (erase-buffer)) | |
1110 (gnus-message 5 "nnimap: Generating active list%s..." | |
1111 (if (> (length server) 0) (concat " for " server) "")) | |
1112 (nnimap-before-find-minmax-bugworkaround) | |
1113 (with-current-buffer nnimap-server-buffer | |
1114 (dolist (pattern (nnimap-pattern-to-list-arguments nnimap-list-pattern)) | |
1115 (dolist (mbx (funcall nnimap-request-list-method | |
1116 (cdr pattern) (car pattern))) | |
1117 (or (member "\\NoSelect" (imap-mailbox-get 'list-flags mbx)) | |
107473 | 1118 (let* ((encoded-mbx (nnimap-encode-group-name mbx)) |
1119 (info (nnimap-find-minmax-uid encoded-mbx 'examine))) | |
31717 | 1120 (when info |
1121 (with-current-buffer nntp-server-buffer | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1122 (insert (format "\"%s\" %d %d y\n" |
107473 | 1123 encoded-mbx (or (nth 2 info) 0) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1124 (max 1 (or (nth 1 info) 1))))))))))) |
31717 | 1125 (gnus-message 5 "nnimap: Generating active list%s...done" |
1126 (if (> (length server) 0) (concat " for " server) "")) | |
1127 t)) | |
1128 | |
1129 (deffoo nnimap-request-post (&optional server) | |
1130 (let ((success t)) | |
1131 (dolist (mbx (message-unquote-tokens | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1132 (message-tokenize-header |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1133 (message-fetch-field "Newsgroups") ", ")) success) |
31717 | 1134 (let ((to-newsgroup (gnus-group-prefixed-name mbx gnus-command-method))) |
1135 (or (gnus-active to-newsgroup) | |
1136 (gnus-activate-group to-newsgroup) | |
1137 (if (gnus-y-or-n-p (format "No such group: %s. Create it? " | |
1138 to-newsgroup)) | |
1139 (or (and (gnus-request-create-group | |
1140 to-newsgroup gnus-command-method) | |
1141 (gnus-activate-group to-newsgroup nil nil | |
1142 gnus-command-method)) | |
1143 (error "Couldn't create group %s" to-newsgroup))) | |
1144 (error "No such group: %s" to-newsgroup)) | |
1145 (unless (nnimap-request-accept-article mbx (nth 1 gnus-command-method)) | |
1146 (setq success nil)))))) | |
1147 | |
1148 ;; Optional backend functions | |
1149 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1150 (defun nnimap-string-lessp-numerical (s1 s2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1151 "Return t if first arg string is less than second in numerical order." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1152 (cond ((string= s1 s2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1153 nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1154 ((> (length s1) (length s2)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1155 nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1156 ((< (length s1) (length s2)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1157 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1158 ((< (string-to-number (substring s1 0 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1159 (string-to-number (substring s2 0 1))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1160 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1161 ((> (string-to-number (substring s1 0 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1162 (string-to-number (substring s2 0 1))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1163 nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1164 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1165 (nnimap-string-lessp-numerical (substring s1 1) (substring s2 1))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1166 |
31717 | 1167 (deffoo nnimap-retrieve-groups (groups &optional server) |
1168 (when (nnimap-possibly-change-server server) | |
1169 (gnus-message 5 "nnimap: Checking mailboxes...") | |
1170 (with-current-buffer nntp-server-buffer | |
1171 (erase-buffer) | |
1172 (nnimap-before-find-minmax-bugworkaround) | |
107473 | 1173 (let (asyncgroups slowgroups decoded-group) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1174 (if (null nnimap-retrieve-groups-asynchronous) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1175 (setq slowgroups groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1176 (dolist (group groups) |
107473 | 1177 (setq decoded-group (nnimap-decode-group-name group)) |
1178 (gnus-message 9 "nnimap: Quickly checking mailbox %s" | |
1179 decoded-group) | |
1180 (add-to-list (if (gnus-group-get-parameter | |
1181 (nnimap-group-prefixed-name group) | |
1182 'imap-status) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1183 'asyncgroups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1184 'slowgroups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1185 (list group (imap-mailbox-status-asynch |
107473 | 1186 decoded-group |
1187 '(uidvalidity uidnext unseen) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1188 nnimap-server-buffer)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1189 (dolist (asyncgroup asyncgroups) |
107473 | 1190 (let* ((group (nth 0 asyncgroup)) |
1191 (tag (nth 1 asyncgroup)) | |
1192 (gnusgroup (nnimap-group-prefixed-name group)) | |
1193 (saved-uidvalidity (gnus-group-get-parameter gnusgroup | |
1194 'uidvalidity)) | |
1195 (saved-imap-status (gnus-group-get-parameter gnusgroup | |
1196 'imap-status)) | |
1197 (saved-info (and saved-imap-status | |
1198 (split-string saved-imap-status " ")))) | |
1199 (setq decoded-group (nnimap-decode-group-name group)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1200 (when (imap-ok-p (imap-wait-for-tag tag nnimap-server-buffer)) |
107473 | 1201 (if (or (not (equal |
1202 saved-uidvalidity | |
1203 (imap-mailbox-get 'uidvalidity decoded-group | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1204 nnimap-server-buffer))) |
107473 | 1205 (not (equal |
1206 (nth 0 saved-info) | |
1207 (imap-mailbox-get 'uidnext decoded-group | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1208 nnimap-server-buffer)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1209 (push (list group) slowgroups) |
107473 | 1210 (gnus-sethash |
1211 (gnus-group-prefixed-name group server) | |
1212 (list (imap-mailbox-get 'uidvalidity | |
1213 decoded-group nnimap-server-buffer) | |
1214 (imap-mailbox-get 'uidnext | |
1215 decoded-group nnimap-server-buffer) | |
1216 (imap-mailbox-get 'unseen | |
1217 decoded-group nnimap-server-buffer)) | |
1218 nnimap-mailbox-info) | |
1219 (insert (format "\"%s\" %s %s y\n" group | |
1220 (nth 2 saved-info) | |
1221 (nth 1 saved-info)))))))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1222 (dolist (group slowgroups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1223 (if nnimap-retrieve-groups-asynchronous |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1224 (setq group (car group))) |
107473 | 1225 (setq decoded-group (nnimap-decode-group-name group)) |
1226 (gnus-message 7 "nnimap: Mailbox %s modified" decoded-group) | |
1227 (or (member "\\NoSelect" (imap-mailbox-get 'list-flags decoded-group | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1228 nnimap-server-buffer)) |
107473 | 1229 (let* ((gnusgroup (nnimap-group-prefixed-name group)) |
1230 (status (imap-mailbox-status | |
1231 decoded-group '(uidvalidity uidnext unseen) | |
1232 nnimap-server-buffer)) | |
1233 (info (nnimap-find-minmax-uid group 'examine)) | |
1234 (min-uid (max 1 (or (nth 1 info) 1))) | |
1235 (max-uid (or (nth 2 info) 0))) | |
1236 (when (> (or (imap-mailbox-get 'recent decoded-group | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1237 nnimap-server-buffer) 0) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1238 0) |
107473 | 1239 (push (list (cons decoded-group 0)) nnmail-split-history)) |
1240 (insert (format "\"%s\" %d %d y\n" group max-uid min-uid)) | |
1241 (gnus-sethash | |
1242 (gnus-group-prefixed-name group server) | |
1243 status | |
1244 nnimap-mailbox-info) | |
1245 (if (not (equal (nth 0 status) | |
1246 (gnus-group-get-parameter gnusgroup | |
1247 'uidvalidity))) | |
1248 (nnimap-verify-uidvalidity group nnimap-current-server)) | |
1249 ;; The imap-status parameter is a string on the form | |
1250 ;; "<uidnext> <min-uid> <max-uid>". | |
1251 (gnus-group-add-parameter | |
1252 gnusgroup | |
1253 (cons 'imap-status | |
1254 (format "%s %s %s" (nth 1 status) min-uid max-uid)))))))) | |
31717 | 1255 (gnus-message 5 "nnimap: Checking mailboxes...done") |
1256 'active)) | |
1257 | |
1258 (deffoo nnimap-request-update-info-internal (group info &optional server) | |
1259 (when (nnimap-possibly-change-group group server) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1260 (when info ;; xxx what does this mean? should we create a info? |
31717 | 1261 (with-current-buffer nnimap-server-buffer |
1262 (gnus-message 5 "nnimap: Updating info for %s..." | |
107473 | 1263 (nnimap-decode-group-name (gnus-info-group info))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1264 |
31717 | 1265 (when (nnimap-mark-permanent-p 'read) |
1266 (let (seen unseen) | |
1267 ;; read info could contain articles marked unread by other | |
1268 ;; imap clients! we correct this | |
69625
17473f7e626b
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-170
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
1269 (setq unseen (gnus-compress-sequence |
17473f7e626b
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-170
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
1270 (imap-search "UNSEEN UNDELETED")) |
17473f7e626b
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-170
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
1271 seen (gnus-range-difference (gnus-info-read info) unseen) |
17473f7e626b
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-170
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
1272 seen (gnus-range-add seen |
17473f7e626b
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-170
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
1273 (gnus-compress-sequence |
17473f7e626b
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-170
Miles Bader <miles@gnu.org>
parents:
69135
diff
changeset
|
1274 (imap-search "SEEN"))) |
31717 | 1275 seen (if (and (integerp (car seen)) |
1276 (null (cdr seen))) | |
1277 (list (cons (car seen) (car seen))) | |
1278 seen)) | |
1279 (gnus-info-set-read info seen))) | |
1280 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1281 (dolist (pred gnus-article-mark-lists) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1282 (when (or (eq (cdr pred) 'recent) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1283 (and (nnimap-mark-permanent-p (cdr pred)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1284 (member (nnimap-mark-to-flag (cdr pred)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1285 (imap-mailbox-get 'flags)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1286 (gnus-info-set-marks |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1287 info |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1288 (gnus-update-alist-soft |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1289 (cdr pred) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1290 (gnus-compress-sequence |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1291 (imap-search (nnimap-mark-to-predicate (cdr pred)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1292 (gnus-info-marks info)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1293 t))) |
31717 | 1294 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1295 (when nnimap-importantize-dormant |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1296 ;; nnimap mark dormant article as ticked too (for other clients) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1297 ;; so we remove that mark for gnus since we support dormant |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1298 (gnus-info-set-marks |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1299 info |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1300 (gnus-update-alist-soft |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1301 'tick |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1302 (gnus-remove-from-range |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1303 (cdr-safe (assoc 'tick (gnus-info-marks info))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1304 (cdr-safe (assoc 'dormant (gnus-info-marks info)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1305 (gnus-info-marks info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1306 t)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1307 |
31717 | 1308 (gnus-message 5 "nnimap: Updating info for %s...done" |
107473 | 1309 (nnimap-decode-group-name (gnus-info-group info))) |
31717 | 1310 |
1311 info)))) | |
1312 | |
1313 (deffoo nnimap-request-type (group &optional article) | |
1314 (if (and nnimap-news-groups (string-match nnimap-news-groups group)) | |
1315 'news | |
1316 'mail)) | |
1317 | |
1318 (deffoo nnimap-request-set-mark (group actions &optional server) | |
1319 (when (nnimap-possibly-change-group group server) | |
1320 (with-current-buffer nnimap-server-buffer | |
1321 (let (action) | |
107473 | 1322 (gnus-message 7 "nnimap: Setting marks in %s..." |
1323 (nnimap-decode-group-name group)) | |
31717 | 1324 (while (setq action (pop actions)) |
1325 (let ((range (nth 0 action)) | |
1326 (what (nth 1 action)) | |
1327 (cmdmarks (nth 2 action)) | |
1328 marks) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1329 ;; bookmark can't be stored (not list/range |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1330 (setq cmdmarks (delq 'bookmark cmdmarks)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1331 ;; killed can't be stored (not list/range |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1332 (setq cmdmarks (delq 'killed cmdmarks)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1333 ;; unsent are for nndraft groups only |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1334 (setq cmdmarks (delq 'unsent cmdmarks)) |
31717 | 1335 ;; cache flags are pointless on the server |
1336 (setq cmdmarks (delq 'cache cmdmarks)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1337 ;; seen flags are local to each gnus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1338 (setq cmdmarks (delq 'seen cmdmarks)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1339 ;; recent marks can't be set |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1340 (setq cmdmarks (delq 'recent cmdmarks)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1341 (when nnimap-importantize-dormant |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1342 ;; flag dormant articles as ticked |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1343 (if (memq 'dormant cmdmarks) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1344 (setq cmdmarks (cons 'tick cmdmarks)))) |
31717 | 1345 ;; remove stuff we are forbidden to store |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1346 (mapc (lambda (mark) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1347 (if (imap-message-flag-permanent-p |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1348 (nnimap-mark-to-flag mark)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1349 (setq marks (cons mark marks)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1350 cmdmarks) |
31717 | 1351 (when (and range marks) |
1352 (cond ((eq what 'del) | |
1353 (imap-message-flags-del | |
1354 (imap-range-to-message-set range) | |
1355 (nnimap-mark-to-flag marks nil t))) | |
1356 ((eq what 'add) | |
1357 (imap-message-flags-add | |
1358 (imap-range-to-message-set range) | |
1359 (nnimap-mark-to-flag marks nil t))) | |
1360 ((eq what 'set) | |
1361 (imap-message-flags-set | |
1362 (imap-range-to-message-set range) | |
1363 (nnimap-mark-to-flag marks nil t))))))) | |
107473 | 1364 (gnus-message 7 "nnimap: Setting marks in %s...done" |
1365 (nnimap-decode-group-name group))))) | |
31717 | 1366 nil) |
1367 | |
1368 (defun nnimap-split-fancy () | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1369 "Like the function `nnmail-split-fancy', but uses `nnimap-split-fancy'." |
31717 | 1370 (let ((nnmail-split-fancy nnimap-split-fancy)) |
1371 (nnmail-split-fancy))) | |
1372 | |
1373 (defun nnimap-split-to-groups (rules) | |
1374 ;; tries to match all rules in nnimap-split-rule against content of | |
1375 ;; nntp-server-buffer, returns a list of groups that matched. | |
107473 | 1376 ;; Note: This function takes and returns decoded group names. |
31717 | 1377 (with-current-buffer nntp-server-buffer |
1378 ;; Fold continuation lines. | |
1379 (goto-char (point-min)) | |
1380 (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t) | |
1381 (replace-match " " t t)) | |
1382 (if (functionp rules) | |
1383 (funcall rules) | |
1384 (let (to-groups regrepp) | |
1385 (catch 'split-done | |
1386 (dolist (rule rules to-groups) | |
1387 (let ((group (car rule)) | |
1388 (regexp (cadr rule))) | |
1389 (goto-char (point-min)) | |
1390 (when (and (if (stringp regexp) | |
1391 (progn | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1392 (if (not (stringp group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1393 (setq group (eval group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1394 (setq regrepp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1395 (string-match "\\\\[0-9&]" group))) |
31717 | 1396 (re-search-forward regexp nil t)) |
1397 (funcall regexp group)) | |
1398 ;; Don't enter the article into the same group twice. | |
1399 (not (assoc group to-groups))) | |
1400 (push (if regrepp | |
1401 (nnmail-expand-newtext group) | |
1402 group) | |
1403 to-groups) | |
1404 (or nnimap-split-crosspost | |
1405 (throw 'split-done to-groups)))))))))) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1406 |
31717 | 1407 (defun nnimap-assoc-match (key alist) |
1408 (let (element) | |
1409 (while (and alist (not element)) | |
1410 (if (string-match (car (car alist)) key) | |
1411 (setq element (car alist))) | |
1412 (setq alist (cdr alist))) | |
1413 element)) | |
1414 | |
1415 (defun nnimap-split-find-rule (server inbox) | |
1416 (if (and (listp nnimap-split-rule) (listp (car nnimap-split-rule)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1417 (list (cdar nnimap-split-rule)) (listp (cadar nnimap-split-rule))) |
31717 | 1418 ;; extended format |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1419 (cadr (nnimap-assoc-match inbox (cdr (nnimap-assoc-match |
31717 | 1420 server nnimap-split-rule)))) |
1421 nnimap-split-rule)) | |
1422 | |
1423 (defun nnimap-split-find-inbox (server) | |
1424 (if (listp nnimap-split-inbox) | |
1425 nnimap-split-inbox | |
1426 (list nnimap-split-inbox))) | |
1427 | |
1428 (defun nnimap-split-articles (&optional group server) | |
107473 | 1429 ;; Note: Assumes decoded group names in nnimap-split-inbox, |
1430 ;; nnimap-split-rule, nnimap-split-fancy, and nnmail-split-history. | |
31717 | 1431 (when (nnimap-possibly-change-server server) |
1432 (with-current-buffer nnimap-server-buffer | |
107473 | 1433 (let (rule inbox removeorig |
1434 (inboxes (nnimap-split-find-inbox server))) | |
31717 | 1435 ;; iterate over inboxes |
1436 (while (and (setq inbox (pop inboxes)) | |
107473 | 1437 (nnimap-possibly-change-group |
1438 (nnimap-encode-group-name inbox))) ;; SELECT | |
31717 | 1439 ;; find split rule for this server / inbox |
1440 (when (setq rule (nnimap-split-find-rule server inbox)) | |
1441 ;; iterate over articles | |
1442 (dolist (article (imap-search nnimap-split-predicate)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1443 (when (if (if (eq nnimap-split-download-body 'default) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1444 nnimap-split-download-body-default |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1445 nnimap-split-download-body) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1446 (and (nnimap-request-article article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1447 (with-current-buffer nntp-server-buffer (mail-narrow-to-head))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1448 (nnimap-request-head article)) |
31717 | 1449 ;; copy article to right group(s) |
1450 (setq removeorig nil) | |
1451 (dolist (to-group (nnimap-split-to-groups rule)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1452 (cond ((eq to-group 'junk) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1453 (message "IMAP split removed %s:%s:%d" server inbox |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1454 article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1455 (setq removeorig t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1456 ((imap-message-copy (number-to-string article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1457 to-group nil 'nocopyuid) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1458 (message "IMAP split moved %s:%s:%d to %s" server |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1459 inbox article to-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1460 (setq removeorig t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1461 (when nnmail-cache-accepted-message-ids |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1462 (with-current-buffer nntp-server-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1463 (let (msgid) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1464 (and (setq msgid |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1465 (nnmail-fetch-field "message-id")) |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
1466 (nnmail-cache-insert msgid |
107473 | 1467 (nnimap-encode-group-name to-group) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1468 (nnmail-fetch-field "subject")))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1469 ;; Add the group-art list to the history list. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1470 (push (list (cons to-group 0)) nnmail-split-history)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1471 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1472 (message "IMAP split failed to move %s:%s:%d to %s" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1473 server inbox article to-group)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1474 (if (if (eq nnimap-split-download-body 'default) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1475 nnimap-split-download-body-default |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1476 nnimap-split-download-body) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1477 (widen)) |
31717 | 1478 ;; remove article if it was successfully copied somewhere |
1479 (and removeorig | |
1480 (imap-message-flags-add (format "%d" article) | |
1481 "\\Seen \\Deleted"))))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1482 (when (imap-mailbox-select inbox) ;; just in case |
31717 | 1483 ;; todo: UID EXPUNGE (if available) to remove splitted articles |
1484 (imap-mailbox-expunge) | |
1485 (imap-mailbox-close))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1486 (when nnmail-cache-accepted-message-ids |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1487 (nnmail-cache-close)) |
31717 | 1488 t)))) |
1489 | |
1490 (deffoo nnimap-request-scan (&optional group server) | |
1491 (nnimap-split-articles group server)) | |
1492 | |
1493 (deffoo nnimap-request-newgroups (date &optional server) | |
1494 (when (nnimap-possibly-change-server server) | |
1495 (with-current-buffer nntp-server-buffer | |
1496 (gnus-message 5 "nnimap: Listing subscribed mailboxes%s%s..." | |
1497 (if (> (length server) 0) " on " "") server) | |
1498 (erase-buffer) | |
1499 (nnimap-before-find-minmax-bugworkaround) | |
1500 (dolist (pattern (nnimap-pattern-to-list-arguments | |
1501 nnimap-list-pattern)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1502 (dolist (mbx (imap-mailbox-lsub (cdr pattern) (car pattern) nil |
31717 | 1503 nnimap-server-buffer)) |
1504 (or (catch 'found | |
1505 (dolist (mailbox (imap-mailbox-get 'list-flags mbx | |
1506 nnimap-server-buffer)) | |
1507 (if (string= (downcase mailbox) "\\noselect") | |
1508 (throw 'found t))) | |
1509 nil) | |
107473 | 1510 (let* ((encoded-mbx (nnimap-encode-group-name mbx)) |
1511 (info (nnimap-find-minmax-uid encoded-mbx 'examine))) | |
31717 | 1512 (when info |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1513 (insert (format "\"%s\" %d %d y\n" |
107473 | 1514 encoded-mbx (or (nth 2 info) 0) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1515 (max 1 (or (nth 1 info) 1))))))))) |
31717 | 1516 (gnus-message 5 "nnimap: Listing subscribed mailboxes%s%s...done" |
1517 (if (> (length server) 0) " on " "") server)) | |
1518 t)) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1519 |
31717 | 1520 (deffoo nnimap-request-create-group (group &optional server args) |
1521 (when (nnimap-possibly-change-server server) | |
107473 | 1522 (let ((decoded-group (nnimap-decode-group-name group))) |
1523 (or (imap-mailbox-status decoded-group 'uidvalidity nnimap-server-buffer) | |
1524 (imap-mailbox-create decoded-group nnimap-server-buffer) | |
1525 (nnheader-report 'nnimap "%S" | |
1526 (imap-error-text nnimap-server-buffer)))))) | |
31717 | 1527 |
1528 (defun nnimap-time-substract (time1 time2) | |
1529 "Return TIME for TIME1 - TIME2." | |
1530 (let* ((ms (- (car time1) (car time2))) | |
1531 (ls (- (nth 1 time1) (nth 1 time2)))) | |
1532 (if (< ls 0) | |
1533 (list (- ms 1) (+ (expt 2 16) ls)) | |
1534 (list ms ls)))) | |
1535 | |
61463
f09e8d159baf
(nnimap-date-days-ago): Handle byte-compiler warnings differently.
Lute Kamstra <lute@gnu.org>
parents:
61304
diff
changeset
|
1536 (eval-when-compile (require 'parse-time)) |
31717 | 1537 (defun nnimap-date-days-ago (daysago) |
1538 "Return date, in format \"3-Aug-1998\", for DAYSAGO days ago." | |
61304
a1964e18a9ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-234
Miles Bader <miles@gnu.org>
parents:
60696
diff
changeset
|
1539 (require 'parse-time) |
40494
4c7be17ecf55
(nnimap-date-days-ago): Defeat locale.
Gerd Moellmann <gerd@gnu.org>
parents:
38413
diff
changeset
|
1540 (let* ((time (nnimap-time-substract (current-time) (days-to-time daysago))) |
4c7be17ecf55
(nnimap-date-days-ago): Defeat locale.
Gerd Moellmann <gerd@gnu.org>
parents:
38413
diff
changeset
|
1541 (date (format-time-string |
4c7be17ecf55
(nnimap-date-days-ago): Defeat locale.
Gerd Moellmann <gerd@gnu.org>
parents:
38413
diff
changeset
|
1542 (format "%%d-%s-%%Y" |
4c7be17ecf55
(nnimap-date-days-ago): Defeat locale.
Gerd Moellmann <gerd@gnu.org>
parents:
38413
diff
changeset
|
1543 (capitalize (car (rassoc (nth 4 (decode-time time)) |
4c7be17ecf55
(nnimap-date-days-ago): Defeat locale.
Gerd Moellmann <gerd@gnu.org>
parents:
38413
diff
changeset
|
1544 parse-time-months)))) |
4c7be17ecf55
(nnimap-date-days-ago): Defeat locale.
Gerd Moellmann <gerd@gnu.org>
parents:
38413
diff
changeset
|
1545 time))) |
31717 | 1546 (if (eq ?0 (string-to-char date)) |
1547 (substring date 1) | |
1548 date))) | |
1549 | |
1550 (defun nnimap-request-expire-articles-progress () | |
1551 (gnus-message 5 "nnimap: Marking article %d for deletion..." | |
1552 imap-current-message)) | |
1553 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1554 (defun nnimap-expiry-target (arts group server) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1555 (unless (eq nnmail-expiry-target 'delete) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1556 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1557 (dolist (art arts) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1558 (nnimap-request-article art group server (current-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1559 ;; hints for optimization in `nnimap-request-accept-article' |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1560 (let ((nnimap-current-move-article art) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1561 (nnimap-current-move-group group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1562 (nnimap-current-move-server server)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1563 (nnmail-expiry-target-group nnmail-expiry-target group)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1564 ;; It is not clear if `nnmail-expiry-target' somehow cause the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1565 ;; current group to be changed or not, so we make sure here. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1566 (nnimap-possibly-change-group group server))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1567 |
31717 | 1568 ;; Notice that we don't actually delete anything, we just mark them deleted. |
1569 (deffoo nnimap-request-expire-articles (articles group &optional server force) | |
1570 (let ((artseq (gnus-compress-sequence articles))) | |
1571 (when (and artseq (nnimap-possibly-change-group group server)) | |
1572 (with-current-buffer nnimap-server-buffer | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1573 (let ((days (or (and nnmail-expiry-wait-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1574 (funcall nnmail-expiry-wait-function group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1575 nnmail-expiry-wait))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1576 (cond ((or force (eq days 'immediate)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1577 (let ((oldarts (imap-search |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
1578 (concat "UID " |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1579 (imap-range-to-message-set artseq))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1580 (when oldarts |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1581 (nnimap-expiry-target oldarts group server) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1582 (when (imap-message-flags-add |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
1583 (imap-range-to-message-set |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1584 (gnus-compress-sequence oldarts)) "\\Deleted") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1585 (setq articles (gnus-set-difference |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1586 articles oldarts)))))) |
66573
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1587 ((and nnimap-search-uids-not-since-is-evil (numberp days)) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1588 (let* ((all-new-articles |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1589 (gnus-compress-sequence |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1590 (imap-search (format "SINCE %s" |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1591 (nnimap-date-days-ago days))))) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1592 (oldartseq |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1593 (gnus-range-difference artseq all-new-articles)) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1594 (oldarts (gnus-uncompress-range oldartseq))) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1595 (when oldarts |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1596 (nnimap-expiry-target oldarts group server) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1597 (when (imap-message-flags-add |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1598 (imap-range-to-message-set oldartseq) |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1599 "\\Deleted") |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1600 (setq articles (gnus-set-difference |
e65b759c6906
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
1601 articles oldarts)))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1602 ((numberp days) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1603 (let ((oldarts (imap-search |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1604 (format nnimap-expunge-search-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1605 (imap-range-to-message-set artseq) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1606 (nnimap-date-days-ago days)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1607 (imap-fetch-data-hook |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1608 '(nnimap-request-expire-articles-progress))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1609 (when oldarts |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1610 (nnimap-expiry-target oldarts group server) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1611 (when (imap-message-flags-add |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
1612 (imap-range-to-message-set |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1613 (gnus-compress-sequence oldarts)) "\\Deleted") |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
57153
diff
changeset
|
1614 (setq articles (gnus-set-difference |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1615 articles oldarts))))))))))) |
31717 | 1616 ;; return articles not deleted |
1617 articles) | |
1618 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1619 (deffoo nnimap-request-move-article (article group server accept-form |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1620 &optional last move-is-internal) |
31717 | 1621 (when (nnimap-possibly-change-server server) |
1622 (save-excursion | |
1623 (let ((buf (get-buffer-create " *nnimap move*")) | |
1624 (nnimap-current-move-article article) | |
1625 (nnimap-current-move-group group) | |
1626 (nnimap-current-move-server nnimap-current-server) | |
1627 result) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1628 (gnus-message 10 "nnimap-request-move-article: this is an %s move" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1629 (if move-is-internal |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1630 "internal" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1631 "external")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1632 ;; request the article only when the move is NOT internal |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1633 (and (or move-is-internal |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1634 (nnimap-request-article article group server)) |
92770
b7f1378e2a2c
(nnimap-retrieve-headers-progress): Use a unibyte temp buffer.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92147
diff
changeset
|
1635 (with-current-buffer buf |
31717 | 1636 (buffer-disable-undo (current-buffer)) |
1637 (insert-buffer-substring nntp-server-buffer) | |
1638 (setq result (eval accept-form)) | |
1639 (kill-buffer buf) | |
1640 result) | |
69135
12d289b6e5de
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-118
Miles Bader <miles@gnu.org>
parents:
68633
diff
changeset
|
1641 (nnimap-possibly-change-group group server) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1642 (imap-message-flags-add |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1643 (imap-range-to-message-set (list article)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1644 "\\Deleted" 'silent nnimap-server-buffer)) |
31717 | 1645 result)))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1646 |
31717 | 1647 (deffoo nnimap-request-accept-article (group &optional server last) |
1648 (when (nnimap-possibly-change-server server) | |
1649 (let (uid) | |
1650 (if (setq uid | |
1651 (if (string= nnimap-current-server nnimap-current-move-server) | |
1652 ;; moving article within same server, speed it up... | |
1653 (and (nnimap-possibly-change-group | |
1654 nnimap-current-move-group) | |
1655 (imap-message-copy (number-to-string | |
1656 nnimap-current-move-article) | |
107473 | 1657 (nnimap-decode-group-name group) |
1658 'dontcreate nil | |
31717 | 1659 nnimap-server-buffer)) |
1660 (with-current-buffer (current-buffer) | |
1661 (goto-char (point-min)) | |
32995
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
1662 ;; remove any 'From blabla' lines, some IMAP servers |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
1663 ;; reject the entire message otherwise. |
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
1664 (when (looking-at "^From[^:]") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1665 (delete-region (point) (progn (forward-line) (point)))) |
32995
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
1666 ;; turn into rfc822 format (\r\n eol's) |
31717 | 1667 (while (search-forward "\n" nil t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1668 (replace-match "\r\n")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1669 (when nnmail-cache-accepted-message-ids |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1670 (nnmail-cache-insert (nnmail-fetch-field "message-id") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1671 group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1672 (nnmail-fetch-field "subject")))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1673 (when (and last nnmail-cache-accepted-message-ids) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1674 (nnmail-cache-close)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1675 ;; this 'or' is for Cyrus server bug |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1676 (or (null (imap-current-mailbox nnimap-server-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1677 (imap-mailbox-unselect nnimap-server-buffer)) |
107473 | 1678 (imap-message-append (nnimap-decode-group-name group) |
1679 (current-buffer) nil nil | |
31717 | 1680 nnimap-server-buffer))) |
1681 (cons group (nth 1 uid)) | |
1682 (nnheader-report 'nnimap (imap-error-text nnimap-server-buffer)))))) | |
1683 | |
1684 (deffoo nnimap-request-delete-group (group force &optional server) | |
1685 (when (nnimap-possibly-change-server server) | |
107473 | 1686 (setq group (nnimap-decode-group-name group)) |
96024 | 1687 (when (string= group (imap-current-mailbox nnimap-server-buffer)) |
1688 (imap-mailbox-unselect nnimap-server-buffer)) | |
31717 | 1689 (with-current-buffer nnimap-server-buffer |
1690 (if force | |
1691 (or (null (imap-mailbox-status group 'uidvalidity)) | |
1692 (imap-mailbox-delete group)) | |
1693 ;; UNSUBSCRIBE? | |
1694 t)))) | |
1695 | |
1696 (deffoo nnimap-request-rename-group (group new-name &optional server) | |
1697 (when (nnimap-possibly-change-server server) | |
107473 | 1698 (imap-mailbox-rename (nnimap-decode-group-name group) |
1699 (nnimap-decode-group-name new-name) | |
1700 nnimap-server-buffer))) | |
31717 | 1701 |
1702 (defun nnimap-expunge (mailbox server) | |
1703 (when (nnimap-possibly-change-group mailbox server) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1704 (imap-mailbox-expunge nil nnimap-server-buffer))) |
31717 | 1705 |
1706 (defun nnimap-acl-get (mailbox server) | |
1707 (when (nnimap-possibly-change-server server) | |
32995
3720ccaca161
2000-10-27 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32153
diff
changeset
|
1708 (and (imap-capability 'ACL nnimap-server-buffer) |
107473 | 1709 (imap-mailbox-acl-get (nnimap-decode-group-name mailbox) |
1710 nnimap-server-buffer)))) | |
31717 | 1711 |
1712 (defun nnimap-acl-edit (mailbox method old-acls new-acls) | |
1713 (when (nnimap-possibly-change-server (cadr method)) | |
1714 (unless (imap-capability 'ACL nnimap-server-buffer) | |
1715 (error "Your server does not support ACL editing")) | |
1716 (with-current-buffer nnimap-server-buffer | |
1717 ;; delete all removed identifiers | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1718 (mapc (lambda (old-acl) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1719 (unless (assoc (car old-acl) new-acls) |
107473 | 1720 (or (imap-mailbox-acl-delete (car old-acl) |
1721 (nnimap-decode-group-name mailbox)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1722 (error "Can't delete ACL for %s" (car old-acl))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1723 old-acls) |
31717 | 1724 ;; set all changed acl's |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1725 (mapc (lambda (new-acl) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1726 (let ((new-rights (cdr new-acl)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1727 (old-rights (cdr (assoc (car new-acl) old-acls)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1728 (unless (and old-rights new-rights |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1729 (string= old-rights new-rights)) |
107473 | 1730 (or (imap-mailbox-acl-set (car new-acl) new-rights |
1731 (nnimap-decode-group-name mailbox)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1732 (error "Can't set ACL for %s to %s" (car new-acl) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1733 new-rights))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1734 new-acls) |
31717 | 1735 t))) |
1736 | |
1737 | |
1738 ;;; Internal functions | |
1739 | |
1740 ;; | |
1741 ;; This is confusing. | |
1742 ;; | |
1743 ;; mark => read, tick, draft, reply etc | |
1744 ;; flag => "\\Seen", "\\Flagged", "\\Draft", "gnus-expire" etc | |
1745 ;; predicate => "SEEN", "FLAGGED", "DRAFT", "KEYWORD gnus-expire" etc | |
1746 ;; | |
1747 ;; Mark should not really contain 'read since it's not a "mark" in the Gnus | |
1748 ;; world, but we cheat. Mark == gnus-article-mark-lists + '(read . read). | |
1749 ;; | |
1750 | |
1751 (defconst nnimap-mark-to-predicate-alist | |
1752 (mapcar | |
1753 (lambda (pair) ; cdr is the mark | |
1754 (or (assoc (cdr pair) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1755 '((read . "SEEN") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1756 (tick . "FLAGGED") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1757 (draft . "DRAFT") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1758 (recent . "RECENT") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1759 (reply . "ANSWERED"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1760 (cons (cdr pair) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1761 (format "KEYWORD gnus-%s" (symbol-name (cdr pair)))))) |
31717 | 1762 (cons '(read . read) gnus-article-mark-lists))) |
1763 | |
1764 (defun nnimap-mark-to-predicate (pred) | |
1765 "Convert a Gnus mark (a symbol such as read, tick, expire) to a IMAP predicate. | |
1766 This is a string such as \"SEEN\", \"FLAGGED\", \"KEYWORD gnus-expire\", | |
1767 to be used within a IMAP SEARCH query." | |
1768 (cdr (assq pred nnimap-mark-to-predicate-alist))) | |
1769 | |
1770 (defconst nnimap-mark-to-flag-alist | |
1771 (mapcar | |
1772 (lambda (pair) | |
1773 (or (assoc (cdr pair) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1774 '((read . "\\Seen") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1775 (tick . "\\Flagged") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1776 (draft . "\\Draft") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1777 (recent . "\\Recent") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1778 (reply . "\\Answered"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1779 (cons (cdr pair) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1780 (format "gnus-%s" (symbol-name (cdr pair)))))) |
31717 | 1781 (cons '(read . read) gnus-article-mark-lists))) |
1782 | |
1783 (defun nnimap-mark-to-flag-1 (preds) | |
1784 (if (and (not (null preds)) (listp preds)) | |
1785 (cons (nnimap-mark-to-flag (car preds)) | |
1786 (nnimap-mark-to-flag (cdr preds))) | |
1787 (cdr (assoc preds nnimap-mark-to-flag-alist)))) | |
1788 | |
1789 (defun nnimap-mark-to-flag (preds &optional always-list make-string) | |
1790 "Convert a Gnus mark (a symbol such as read, tick, expire) to a IMAP flag. | |
1791 This is a string such as \"\\Seen\", \"\\Flagged\", \"gnus-expire\", to | |
1792 be used in a STORE FLAGS command." | |
1793 (let ((result (nnimap-mark-to-flag-1 preds))) | |
1794 (setq result (if (and (or make-string always-list) | |
1795 (not (listp result))) | |
1796 (list result) | |
1797 result)) | |
1798 (if make-string | |
1799 (mapconcat (lambda (flag) | |
1800 (if (listp flag) | |
1801 (mapconcat 'identity flag " ") | |
1802 flag)) | |
1803 result " ") | |
1804 result))) | |
1805 | |
1806 (defun nnimap-mark-permanent-p (mark &optional group) | |
78486
f0a07da7dd45
Replace `iff' in doc-strings and comments.
Glenn Morris <rgm@gnu.org>
parents:
78224
diff
changeset
|
1807 "Return t if MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." |
31717 | 1808 (imap-message-flag-permanent-p (nnimap-mark-to-flag mark))) |
1809 | |
1810 (when nnimap-debug | |
1811 (require 'trace) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
56280
diff
changeset
|
1812 (buffer-disable-undo (get-buffer-create nnimap-debug-buffer)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1813 (mapc (lambda (f) (trace-function-background f nnimap-debug-buffer)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1814 '( |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1815 nnimap-possibly-change-server |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1816 nnimap-verify-uidvalidity |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1817 nnimap-find-minmax-uid |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1818 nnimap-before-find-minmax-bugworkaround |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1819 nnimap-possibly-change-group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1820 ;;nnimap-replace-whitespace |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1821 nnimap-retrieve-headers-progress |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1822 nnimap-retrieve-which-headers |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1823 nnimap-group-overview-filename |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1824 nnimap-retrieve-headers-from-file |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1825 nnimap-retrieve-headers-from-server |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1826 nnimap-retrieve-headers |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1827 nnimap-open-connection |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1828 nnimap-open-server |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1829 nnimap-server-opened |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1830 nnimap-close-server |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1831 nnimap-request-close |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1832 nnimap-status-message |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1833 ;;nnimap-demule |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1834 nnimap-request-article-part |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1835 nnimap-request-article |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1836 nnimap-request-head |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1837 nnimap-request-body |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1838 nnimap-request-group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1839 nnimap-close-group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1840 nnimap-pattern-to-list-arguments |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1841 nnimap-request-list |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1842 nnimap-request-post |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1843 nnimap-retrieve-groups |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1844 nnimap-request-update-info-internal |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1845 nnimap-request-type |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1846 nnimap-request-set-mark |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1847 nnimap-split-to-groups |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1848 nnimap-split-find-rule |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1849 nnimap-split-find-inbox |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1850 nnimap-split-articles |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1851 nnimap-request-scan |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1852 nnimap-request-newgroups |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1853 nnimap-request-create-group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1854 nnimap-time-substract |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1855 nnimap-date-days-ago |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1856 nnimap-request-expire-articles-progress |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1857 nnimap-request-expire-articles |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1858 nnimap-request-move-article |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1859 nnimap-request-accept-article |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1860 nnimap-request-delete-group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1861 nnimap-request-rename-group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1862 gnus-group-nnimap-expunge |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1863 gnus-group-nnimap-edit-acl |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1864 gnus-group-nnimap-edit-acl-done |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1865 nnimap-group-mode-hook |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1866 nnimap-mark-to-predicate |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1867 nnimap-mark-to-flag-1 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1868 nnimap-mark-to-flag |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1869 nnimap-mark-permanent-p |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
1870 ))) |
31717 | 1871 |
1872 (provide 'nnimap) | |
1873 | |
55398
dd7a1cf22d3d
(nnimap-demule): Avoid string-as-multibyte.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1874 ;; arch-tag: 2b001f20-3ff9-4094-a0ad-46807c1ba70b |
31717 | 1875 ;;; nnimap.el ends here |