From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68237 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general,gmane.emacs.xemacs.beta Subject: Re: IMAP and Exchange 2007 - imap-fetch-safe Followup-To: gmane.emacs.xemacs.beta Date: Mon, 02 Feb 2009 20:19:58 +0100 Message-ID: <878woolk81.fsf@marauder.physik.uni-ulm.de> References: <87iqphil5p.fsf@liv.ac.uk> <87ocz3n8d4.fsf@marauder.physik.uni-ulm.de> <87iqpa99wy.fsf@liv.ac.uk> <87wsde7t5j.fsf_-_@marauder.physik.uni-ulm.de> <86mye95p27.fsf@lifelogs.com> <878wpt48qj.fsf@marauder.physik.uni-ulm.de> <86d4eyvryx.fsf@lifelogs.com> <878wplcxws.fsf@marauder.physik.uni-ulm.de> <87k58za3q8.fsf@liv.ac.uk> <87k58zm99o.fsf_-_@marauder.physik.uni-ulm.de> <87fxjn9l7g.fsf@mocca.josefsson.org> <871vv1d50m.fsf@liv.ac.uk> <87wscblcma.fsf@marauder.physik.uni-ulm.de> <84vdrsvqhj.fsf@incoming.verizon.net> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233602430 21549 80.91.229.12 (2 Feb 2009 19:20:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2009 19:20:30 +0000 (UTC) Cc: Dave Love To: ding@gnus.org, xemacs-beta@xemacs.org Original-X-From: ding-owner+M16678@lists.math.uh.edu Mon Feb 02 20:21:43 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1LU4MQ-0003WN-O3 for ding-account@gmane.org; Mon, 02 Feb 2009 20:21:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1LU4L5-0004tF-Qq; Mon, 02 Feb 2009 13:20:11 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LU4L4-0004su-Dk for ding@lists.math.uh.edu; Mon, 02 Feb 2009 13:20:10 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LU4L0-00051l-J2 for ding@lists.math.uh.edu; Mon, 02 Feb 2009 13:20:10 -0600 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LU4LJ-0001Wm-00 for ; Mon, 02 Feb 2009 20:20:25 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.175]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id n12JK3q3000420; Mon, 2 Feb 2009 20:20:03 +0100 (MET) Original-Received: from localhost (localhost [127.0.0.1]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id D464A135E5; Mon, 2 Feb 2009 20:20:02 +0100 (CET) X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T;w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv,vbL^XF1nIp\:F=$Ei2o&mEe:%N~,:3]vtQ~s9u$9izmX$IF@VgGl7/,^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X Mail-Followup-To: ding@gnus.org, xemacs-beta@xemacs.org, Dave Love In-Reply-To: <84vdrsvqhj.fsf@incoming.verizon.net> (Dave Goldberg's message of "Mon, 02 Feb 2009 09:54:32 -0500") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux) X-DCC-Misty-Metrics: poseidon 1170; Body=3 Fuz1=3 Fuz2=3 X-Virus-Scanned: by amavisd-new X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68237 gmane.emacs.xemacs.beta:29313 Archived-At: On Mon, Feb 02 2009, Dave Goldberg wrote: > Unfortunately I cannot report the same success. I use XEmacs: > > "XEmacs 21.4 (patch 21) \"Educational Television\" [Lucid] (x86_64-unknown-linux, Mule) of Tue Jan 6 2009 on blackbird" Does anyone have an idea what is different in XEmacs? Here's the relevant code: (defun imap-fetch-safe (uids props &optional receive nouidfetch buffer) "Like `imap-fetch', but DTRT with Exchange 2007 bug. However, UIDS here is a cons, where the car is the canonical form of the UIDS specification, and the cdr is the one which works with Exchange 2007 or, potentially, other buggy servers. See `imap-enable-exchange-bug-workaround'." ;; The first time we get here for a given, we'll try the canonical ;; form. If we get the known error from the buggy server, set the ;; flag buffer-locally (to account for connections to multiple ;; servers), then re-try with the alternative UIDS spec. We don't ;; unconditionally use the alternative form, since the ;; currently-used alternatives are seriously inefficient with some ;; servers (although they are valid). ;; ;; FIXME: Maybe it would be cleaner to have a flag to not signal ;; the error (which otherwise gives a message), and test ;; `imap-failed-tags'. Also, Other IMAP clients use other forms of ;; request which work with Exchange, e.g. Claws does "UID FETCH 1:* ;; (UID)" rather than "FETCH UID 1,*". Is there a good reason not ;; to do the same? (condition-case data ;; Binding `debug-on-error' allows us to get the error from ;; `imap-parse-response' -- it's normally caught by Emacs around ;; execution of a process filter. (let ((debug-on-error t)) (imap-fetch (if imap-enable-exchange-bug-workaround (cdr uids) (car uids)) props receive nouidfetch buffer)) (error (if (and (not imap-enable-exchange-bug-workaround) ;; This is the Exchange 2007 response. It may be more ;; robust just to check for a BAD response to the ;; attempted fetch. (string-match "The specified message set is invalid" (cadr data))) (with-current-buffer (or buffer (current-buffer)) (set (make-local-variable 'imap-enable-exchange-bug-workaround) t) (imap-fetch (cdr uids) props receive nouidfetch)) (signal (car data) (cdr data)))))) > and if I don't set imap-enable-exchange-bug-workaround to t, I get > this backtrace: > > Debugger entered--Lisp error: (error "Internal error, tag 13 status BAD code nil text The specified message set is invalid.") > signal(error ("Internal error, tag 13 status BAD code nil text The specified message set is invalid.")) > cerror("Internal error, tag %s status %s code %s text %s" 13 BAD nil "The specified message set is invalid.") > apply(cerror "Internal error, tag %s status %s code %s text %s" (13 BAD nil "The specified message set is invalid.")) > error("Internal error, tag %s status %s code %s text %s" 13 BAD nil "The specified message set is invalid.") > imap-parse-response() > imap-arrival-filter(#" pid 10620 state:run> "ecified message set is invalid. > \n") > accept-process-output(#" pid 10620 state:run> 0 100) > imap-wait-for-tag(13 nil) > imap-send-command-wait("FETCH 1,* UID") > imap-fetch("1,*" "UID" nil nouidfetch nil) > byte-code("..." [nouidfetch receive props imap-enable-exchange-bug-workaround debug-on-error uids t imap-fetch buffer] 6) > imap-fetch-safe(("1,*" . "1,*:*") "UID" nil nouidfetch) > nnimap-find-minmax-uid("INBOX" examine) > nnimap-retrieve-groups(("INBOX" "Calendar" "Sent Items" "INBOX/Miscellaneous" "INBOX/MessageArchive" "Contacts") "imc") > gnus-retrieve-groups(("INBOX" "Calendar" "Sent Items" "INBOX/Miscellaneous" "INBOX/MessageArchive" "Contacts") (nnimap "imc" (nnimap-address "imc.mitre.org") (nnimap-stream starttls) (nnimap-server-port 143) (nnimap-need-unselect-to-notice-new-mail t) (nnimap-nov-is-evil t))) > gnus-read-active-file-2(("INBOX" "Calendar" "Sent Items" "INBOX/Miscellaneous" "INBOX/MessageArchive" "Contacts") (nnimap "imc" (nnimap-address "imc.mitre.org") (nnimap-stream starttls) (nnimap-server-port 143) (nnimap-need-unselect-to-notice-new-mail t) (nnimap-nov-is-evil t))) > gnus-read-active-file-1((nnimap "imc" (nnimap-address "imc.mitre.org") (nnimap-stream starttls) (nnimap-server-port 143) (nnimap-need-unselect-to-notice-new-mail t) (nnimap-nov-is-evil t)) nil) > gnus-read-active-file(nil nil) > gnus-setup-news(nil nil nil) > byte-code("..." [gnus-slave gnus-current-startup-file gnus-startup-file did-connect level dont-connect gnus-group-quit gnus-run-hooks gnus-startup-hook gnus-make-newsrc-file gnus-dribble-read-file gnus-request-create-group "queue" (nndraft "") "drafts" (nndraft "") gnus-setup-news nil gnus-setup-news-hook gnus-start-draft-setup gnus-group-list-groups gnus-group-first-unread-group gnus-configure-windows group gnus-group-set-mode-line gnus-started-hook gnus-use-dribble-file gnus-agent] 4) > gnus-1(nil nil nil) > gnus(nil) > call-interactively(gnus) > command-execute(gnus t) > execute-extended-command(nil) > call-interactively(execute-extended-command) Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/