From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/36646 Path: main.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.gnus.general Subject: Patch for an IMAP interop bug Date: 14 Jun 2001 15:30:39 -0700 Message-ID: <87lmmuk834.fsf@fluff.lickey.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035172196 9650 80.91.224.250 (21 Oct 2002 03:49:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:49:56 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 7149 invoked from network); 14 Jun 2001 22:58:26 -0000 Original-Received: from adsl-216-102-197-223.dsl.snfc21.pacbell.net (HELO ns.lickey.com) (216.102.197.223) by gnus.org with SMTP; 14 Jun 2001 22:58:26 -0000 Original-Received: from fluff.lickey.com (fluff.lickey.com [192.168.100.242]) by ns.lickey.com (Postfix) with ESMTP id DB39AA839 for ; Thu, 14 Jun 2001 15:30:39 -0700 (PDT) Original-Received: by fluff.lickey.com (Postfix, from userid 1000) id A63322481C7; Thu, 14 Jun 2001 15:30:39 -0700 (PDT) Original-To: ding@gnus.org User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Original-Lines: 37 Xref: main.gmane.org gmane.emacs.gnus.general:36646 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:36646 I was experiencing problems connecting to a courier-imap server with the current CVS ognus. Turns out that server is sending some flags with this format: ( \Noinferior) instead of (\Noinferior) Other IMAP clients can handle it, so nnimap probably should as well: --- imap.el.orig Thu Jun 14 15:05:05 2001 +++ imap.el Thu Jun 14 15:19:11 2001 @@ -2221,7 +2221,7 @@ (setq acl (append acl (list (cons identifier rights))))) (imap-mailbox-put 'acl acl mailbox))) -;; flag-list = "(" [flag *(SP flag)] ")" +;; flag-list = "(" *SP [flag *(SP flag)] ")" ;; ;; flag = "\Answered" / "\Flagged" / "\Deleted" / ;; "\Seen" / "\Draft" / flag-keyword / flag-extension @@ -2241,7 +2241,8 @@ (let (flag-list start) (assert (eq (char-after) ?\()) (while (and (not (eq (char-after) ?\))) - (setq start (progn (imap-forward) (point))) + (setq start (progn (imap-forward) (skip-chars-forward " ") + (point))) (> (skip-chars-forward "^ )" (imap-point-at-eol)) 0)) (push (buffer-substring start (point)) flag-list)) (assert (eq (char-after) ?\))) -- matt