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: Eric Abrahamsen
Subject: bug#43129: 25.2; Typo in lisp/gnus/nnimap.el
Date: Mon, 31 Aug 2020 09:47:52 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Sean Connor <sconnor005@allyinics.org> 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.





reply via email to

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