From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86082 Path: news.gmane.org!not-for-mail From: Nikolaus Rath Newsgroups: gmane.emacs.gnus.general Subject: Re: [PATCH] Use IMAP MOVE extension if available Date: Mon, 27 Jul 2015 09:10:39 -0700 Message-ID: <87r3nta8e8.fsf@thinkpad.rath.org> References: <87io9l2bd0.fsf@vostro.rath.org> <87y4ibf93c.fsf@ericabrahamsen.net> <87wpxuerau.fsf@thinkpad.rath.org> <878ua2cj3m.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1438013520 4714 80.91.229.3 (27 Jul 2015 16:12:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jul 2015 16:12:00 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M34316@lists.math.uh.edu Mon Jul 27 18:11:41 2015 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZJl08-0000gg-4W for ding-account@gmane.org; Mon, 27 Jul 2015 18:11:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1ZJkzI-0005Yx-MD; Mon, 27 Jul 2015 11:10:48 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1ZJkzH-0005Yf-4C for ding@lists.math.uh.edu; Mon, 27 Jul 2015 11:10:47 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1ZJkzF-00054f-KZ for ding@lists.math.uh.edu; Mon, 27 Jul 2015 11:10:47 -0500 Original-Received: from ebox.rath.org ([45.79.69.51]) by quimby.gnus.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ZJkzD-0004xT-Ha for ding@gnus.org; Mon, 27 Jul 2015 18:10:43 +0200 Original-Received: from thinkpad (thinkpad [192.168.12.2]) by ebox.rath.org (Postfix) with ESMTPS id BE62E17BBE for ; Mon, 27 Jul 2015 16:10:40 +0000 (UTC) Original-Received: by thinkpad (Postfix, from userid 1000) id 47056C2187; Mon, 27 Jul 2015 09:10:40 -0700 (PDT) Mail-Copies-To: never Mail-Followup-To: ding@gnus.org In-Reply-To: <878ua2cj3m.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 27 Jul 2015 12:36:29 +0800") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux) X-Spam-Score: -2.4 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86082 Archived-At: On Jul 27 2015, Eric Abrahamsen wrote: > diff --git a/lisp/nnimap.el b/lisp/nnimap.el > index 161a6b4..f8e6e3e 100644 > --- a/lisp/nnimap.el > +++ b/lisp/nnimap.el > @@ -489,11 +489,18 @@ textual parts.") > (when (functionp (nth 2 credentials)) > (funcall (nth 2 credentials))) > ;; See if CAPABILITY is set as part of login > - ;; response. > - (dolist (response (cddr login-result)) > - (when (string=3D "CAPABILITY" (upcase (car response))) > - (setf (nnimap-capabilities nnimap-object) > - (mapcar #'upcase (cdr response)))))) > + ;; response. If it wasn't, specifically request > + ;; it. > + (when > + (catch 'caps > + (dolist (response (cddr login-result)) > + (when (string=3D "CAPABILITY" (upcase (car response))) > + (throw 'caps (setq capabilities (cdr response))))) > + (let ((req (nnimap-command "CAPABILITY"))) > + (when (car req) > + (throw 'caps (setq capabilities (cdaddr req)))))) > + (setf (nnimap-capabilities nnimap-object) > + (mapcar #'upcase capabilities)))) > ;; If the login failed, then forget the credentials > ;; that are now possibly cached. > (dolist (host (list (nnoo-current-server 'nnimap) This looks a lot more complex, but as far as I can tell it still needlessy asks for capabilities if they have been supplied in the response code of OK response instead of a in separate, untagged response. So is it really worth the extra complexity, if in many cases we still issue an explicit CAPABILITY command? (For everyone unfamiliar with RFC3501, what I mean is that this: * CAPABILITY IMAP4rev1 AND SOME MORE \r\n 1 OK Logged in\r\n will be parsed correcly but this: 1 OK [CAPABILITY IMAP4rev1 AND SOME MORE] Logged in\r\n will still cause Gnus to issue a separate CAPABILITY command). Best, -Nikolaus --=20 GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB