Mercurial > emacs
comparison lisp/gnus/nnimap.el @ 100993:a16e9f7c2536
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1513
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 09 Jan 2009 03:01:50 +0000 |
parents | a9dc0e7c3f2b |
children | d775b84fdd71 |
comparison
equal
deleted
inserted
replaced
100992:5cb6d276b93a | 100993:a16e9f7c2536 |
---|---|
1 ;;; nnimap.el --- imap backend for Gnus | 1 ;;; nnimap.el --- imap backend for Gnus |
2 | 2 |
3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
4 ;; 2007, 2008, 2009 Free Software Foundation, Inc. | 4 ;; 2007, 2008, 2009 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: Simon Josefsson <jas@pdc.kth.se> | 6 ;; Author: Simon Josefsson <simon@josefsson.org> |
7 ;; Jim Radford <radford@robby.caltech.edu> | 7 ;; Jim Radford <radford@robby.caltech.edu> |
8 ;; Keywords: mail | 8 ;; Keywords: mail |
9 | 9 |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 | 11 |
161 \"my3server\" and \"my4server\" both use the same rules. Similarly, | 161 \"my3server\" and \"my4server\" both use the same rules. Similarly, |
162 the inbox string is also a regexp. The actual splitting rules are as | 162 the inbox string is also a regexp. The actual splitting rules are as |
163 before, either a function, or a list with group/regexp or | 163 before, either a function, or a list with group/regexp or |
164 group/function elements." | 164 group/function elements." |
165 :group 'nnimap | 165 :group 'nnimap |
166 ;; FIXME: Doesn't allow `("my2server" ("INBOX" nnimap-split-fancy))' | |
167 ;; per example above. -- fx | |
166 :type '(choice :tag "Rule type" | 168 :type '(choice :tag "Rule type" |
167 (repeat :menu-tag "Single-server" | 169 (repeat :menu-tag "Single-server" |
168 :tag "Single-server list" | 170 :tag "Single-server list" |
169 (list (string :tag "Mailbox") | 171 (list (string :tag "Mailbox") |
170 (choice :tag "Predicate" | 172 (choice :tag "Predicate" |
458 :type '(choice (const :tag "No information" nil) | 460 :type '(choice (const :tag "No information" nil) |
459 (const :tag "Disable ID query" no) | 461 (const :tag "Disable ID query" no) |
460 (plist :key-type string :value-type string))) | 462 (plist :key-type string :value-type string))) |
461 | 463 |
462 (defcustom nnimap-debug nil | 464 (defcustom nnimap-debug nil |
463 "If non-nil, random debug spews are placed in *nnimap-debug* buffer. | 465 "If non-nil, trace nnimap- functions into `nnimap-debug-buffer'. |
466 Uses `trace-function-background', so you can turn it off with, | |
467 say, `untrace-all'. | |
468 | |
464 Note that username, passwords and other privacy sensitive | 469 Note that username, passwords and other privacy sensitive |
465 information (such as e-mail) may be stored in the *nnimap-debug* | 470 information (such as e-mail) may be stored in the buffer. |
466 buffer. It is not written to disk, however. Do not enable this | 471 It is not written to disk, however. Do not enable this |
467 variable unless you are comfortable with that." | 472 variable unless you are comfortable with that. |
473 | |
474 This variable only takes effect when loading the `nnimap' library. | |
475 See also `nnimap-log'." | |
468 :group 'nnimap | 476 :group 'nnimap |
469 :type 'boolean) | 477 :type 'boolean) |
470 | 478 |
471 ;; Internal variables: | 479 ;; Internal variables: |
472 | 480 |
553 (with-current-buffer nnimap-server-buffer | 561 (with-current-buffer nnimap-server-buffer |
554 (when (or (string= group (imap-current-mailbox)) | 562 (when (or (string= group (imap-current-mailbox)) |
555 (imap-mailbox-select group examine)) | 563 (imap-mailbox-select group examine)) |
556 (let (minuid maxuid) | 564 (let (minuid maxuid) |
557 (when (> (imap-mailbox-get 'exists) 0) | 565 (when (> (imap-mailbox-get 'exists) 0) |
558 (imap-fetch (if imap-enable-exchange-bug-workaround "1,*:*" "1,*") | 566 (imap-fetch-safe '("1,*" . "1,*:*") "UID" nil 'nouidfetch) |
559 "UID" nil 'nouidfetch) | |
560 (imap-message-map (lambda (uid Uid) | 567 (imap-message-map (lambda (uid Uid) |
561 (setq minuid (if minuid (min minuid uid) uid) | 568 (setq minuid (if minuid (min minuid uid) uid) |
562 maxuid (if maxuid (max maxuid uid) uid))) | 569 maxuid (if maxuid (max maxuid uid) uid))) |
563 'UID)) | 570 'UID)) |
564 (list (imap-mailbox-get 'exists) minuid maxuid))))) | 571 (list (imap-mailbox-get 'exists) minuid maxuid))))) |