GNU bug report logs - #54158
28.0.91; duplicate mail downloads in Gnus (IMAP)

Previous Next

Package: emacs;

Reported by: Roland Winkler <winkler <at> gnu.org>

Date: Fri, 25 Feb 2022 16:44:01 UTC

Severity: normal

Found in version 28.0.91

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Roland Winkler <winkler <at> gnu.org>
To: 54158 <at> debbugs.gnu.org
Subject: bug#54158: 28.0.91; duplicate mail downloads in Gnus (IMAP)
Date: Sat, 19 Mar 2022 22:50:44 -0500
On Sun, Mar 20 2022, Andrew Cohen wrote:
>>I am surprised that `mail-source-fetch-imap' in Gnus from Emacs 27.2
>>and from Emacs 28.0.91 are essentially the same (from all I can tell).
>>So I am wondering why `mail-source-fetch-imap' in Gnus from Emacs 27.2
>>was behaving as expected; but the bug showed up only in Emacs 28.  Can
>>this be in subtle ways related to the fact that mail-source.el in Emacs
>>27 used dynamic binding, whereas in Emacs 28 it uses lexical binding,
>>as speculated previously by Eric?
>
> This is indeed a mystery. If you are excited about getting to the bottom
> of it you could try enabling the log with emacs-27 and post the result
> of your scenario. The problem was the variable 'remove was accumulating
> UIDs from prior iterations of the loop. 

I am perplexed: Certainly, I struggled for the longest time to identify
a reproducible recipe for this bug till I learned about the variable
imap-log (see my earlier posts in this thread).  Indeed, with this
recipe the bug does show up both with Emacs 28.0.91 and Emacs 27.2.  So
I need to take back what I said before that this bug is a regression.

Reading the code of `mail-source-fetch-imap' more carefully, I agree
with you: it would be a mystery if the code had ever worked as intended.

A possible explanation from my side is: while I started using Gnus about
mid of last year when I had Emacs 27.2, I added a second IMAP folder to
my `mail-sources' configuration more recently, possibly around the time
when I switched from 27.2 to 28.0.91.  Then I got fooled by this bug
because I didn't know its actual cause.  While I went back temporarily
from 28.0.91 to 27.2 to see whether this changed anything, I may have
done that for too short an amount of time to run into the particular
situation that triggers this bug.  Oh well.

Thanks to everyone who has helped to find the cause of this bug!





This bug report was last modified 3 years and 121 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.