From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#43129: 25.2; Typo in lisp/gnus/nnimap.el Date: Mon, 31 Aug 2020 09:47:52 -0700 Message-ID: <87wo1eep8n.fsf@ericabrahamsen.net> References: <87zh6bgsu1.fsf@allyinics.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6013"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43129@debbugs.gnu.org To: Sean Connor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 31 18:49:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCmzV-0001Sa-Gj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Aug 2020 18:49:09 +0200 Original-Received: from localhost ([::1]:39126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCmzU-0003xB-HZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Aug 2020 12:49:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCmzO-0003wp-EC for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2020 12:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCmzO-0002ue-5M for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2020 12:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kCmzO-0005lB-2w for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2020 12:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Aug 2020 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43129 X-GNU-PR-Package: emacs Original-Received: via spool by 43129-submit@debbugs.gnu.org id=B43129.159889248322067 (code B ref 43129); Mon, 31 Aug 2020 16:49:02 +0000 Original-Received: (at 43129) by debbugs.gnu.org; 31 Aug 2020 16:48:03 +0000 Original-Received: from localhost ([127.0.0.1]:53553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCmyQ-0005jq-M2 for submit@debbugs.gnu.org; Mon, 31 Aug 2020 12:48:02 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:48066 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCmyO-0005jL-8i for 43129@debbugs.gnu.org; Mon, 31 Aug 2020 12:48:01 -0400 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id D4B32FA028; Mon, 31 Aug 2020 16:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1598892474; bh=mNCzTZXcPxi14PH58KooXy3ryU9GMav8MFmMhJXtzyA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ID4xNGttUsN9N4h9PtU4Ysge6sMQfa2nFNqGT0z7ElDSCMUQlFzN4Le7EYzoDwCYc 7GWGQO5O5hjqCuxAbParOYRsWRbWtSTDAL2Fssb62/G8L35VAjFfwY+bjGJhB+yJar x2Z5l29//ux/+bMMbcAVtxz0jqWMfS6VQk8cVWa4= In-Reply-To: <87zh6bgsu1.fsf@allyinics.org> (Sean Connor's message of "Mon, 31 Aug 2020 03:47:18 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186779 Archived-At: Sean Connor writes: > In commit fc9206b73a254a400245578b94542cfe82c68e9c, when IMAP MOVE > extension support was added, > > the line > > (or (nnimap-find-uid-response "COPYUID" (cadr result)) > > was replaced with > > (or (nnimap-find-uid-response "COPYUID" (caddr result)) > > which results in a significant slowing of internal-move-group article > movement as the call to nnimap-find-uid-response always fails as caddr > always returns nil, AFAICT based on testing with example server > responses given in IMAP RFCs and those from two different IMAP servers, > leading Gnus to make a slow call to nnimap-find-article-message-id > insead of using the article number provided by the COPYUID response. > > Simple patch, which undoes the switch from cadr to caddr: > > diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el > index be8ad9a672..baf90d38ad 100644 > --- a/lisp/gnus/nnimap.el > +++ b/lisp/gnus/nnimap.el > @@ -986,7 +986,7 @@ nnimap-request-move-article > (when (and (car result) (not can-move)) > (nnimap-delete-article article)) > (cons internal-move-group > - (or (nnimap-find-uid-response "COPYUID" (caddr result)) > + (or (nnimap-find-uid-response "COPYUID" (cadr result)) > (nnimap-find-article-by-message-id > internal-move-group server message-id > nnimap-request-articles-find-limit))))) > > > Cautious patch, which would handle cases where caddr is appropriate, if > there are any: > > diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el > index be8ad9a672..cea8988f81 100644 > --- a/lisp/gnus/nnimap.el > +++ b/lisp/gnus/nnimap.el > @@ -986,7 +986,8 @@ nnimap-request-move-article > (when (and (car result) (not can-move)) > (nnimap-delete-article article)) > (cons internal-move-group > - (or (nnimap-find-uid-response "COPYUID" (caddr result)) > + (or (nnimap-find-uid-response "COPYUID" (cadr result)) > + (nnimap-find-uid-response "COPYUID" (caddr result)) > (nnimap-find-article-by-message-id > internal-move-group server message-id > nnimap-request-articles-find-limit))))) > Thanks for this report! Can you tell us which IMAP servers you've tested this on? I just tried Dovecot, and the "(cadr result)" fix works properly there. Unless we know there are some servers where "(caddr result)" is appropriate (I wonder what server Nikolaus was using), I'm inclined to put the simpler fix in.