bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43129: 25.2; Typo in lisp/gnus/nnimap.el


From: Sean Connor
Subject: bug#43129: 25.2; Typo in lisp/gnus/nnimap.el
Date: Mon, 31 Aug 2020 03:47:18 -0400

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)))))
sean

reply via email to

[Prev in Thread] Current Thread [Next in Thread]