From 2263bea807b7b3ca446261a76152d905b9830b05 Mon Sep 17 00:00:00 2001 From: dmaus Date: Wed, 14 Apr 2010 10:51:11 +0000 Subject: [PATCH] * elmo-imap4.el (elmo-imap4-disabled-extension): New variable. List of server extensions that are disabled on the client side. (elmo-imap4-session-capable-p): Honour list of disabled extensions. Let user disable server extensions on the client side. Provides way to work around problematic or bugged server implementations (e.g. problems with MS Exchange 2007 and ESEARCH capability). --- elmo/ChangeLog | 8 ++++++++ elmo/elmo-imap4.el | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 71d1965..6e3c1e8 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,11 @@ +2010-04-14 David Maus + + * elmo-imap4.el (elmo-imap4-disabled-extension): New + variable. List of server extensions that are disabled on the + client side. + (elmo-imap4-session-capable-p): Honour list of disabled + extensions. + 2010-03-17 David Maus * elmo-imap4.el (elmo-imap4-folder-list-flagged) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 18a3027..d64894d 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -95,6 +95,10 @@ "Extra namespace alist. A list of cons cell like: (REGEXP . DELIMITER). REGEXP should have a grouping for namespace prefix.") + +(defvar elmo-imap4-disabled-extensions nil + "List of server extensions that are disabled on the client side.") + ;; ;;; internal variables ;; @@ -200,7 +204,8 @@ Debug information is inserted in the buffer \"*IMAP4 DEBUG*\"") (luna-define-internal-accessors 'elmo-imap4-session)) (defmacro elmo-imap4-session-capable-p (session capability) - `(memq ,capability (elmo-imap4-session-capability-internal ,session))) + `(and (memq ,capability (elmo-imap4-session-capability-internal ,session)) + (not (memq ,capability elmo-imap4-disabled-extensions)))) ;;; MIME-ELMO-IMAP Location (eval-and-compile -- 1.7.10.4