unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Roland Winkler <winkler@gnu.org>
To: 54158@debbugs.gnu.org
Subject: bug#54158: 28.0.91; duplicate mail downloads in Gnus (IMAP)
Date: Sat, 19 Mar 2022 22:50:44 -0500	[thread overview]
Message-ID: <87czihuvsb.fsf@gnu.org> (raw)
In-Reply-To: <87tucmc2y4.fsf@gnu.org>

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!






      reply	other threads:[~2022-03-20  3:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25 16:42 bug#54158: 28.0.91; duplicate mail downloads in Gnus (IMAP) Roland Winkler
2022-02-25 21:05 ` Eric Abrahamsen
2022-02-25 21:36   ` Roland Winkler
2022-02-26  5:19     ` Eric Abrahamsen
2022-02-28 16:30       ` Roland Winkler
2022-03-07 15:50       ` Roland Winkler
2022-03-10 19:38         ` Eric Abrahamsen
2022-03-13  5:33           ` Roland Winkler
2022-03-18 16:09             ` Roland Winkler
2022-03-18 16:19               ` Eric Abrahamsen
2022-03-18 16:34                 ` Roland Winkler
2022-03-18 16:45                   ` Robert Pluim
2022-03-18 17:55                     ` Roland Winkler
2022-03-18 16:49                   ` Eric Abrahamsen
2022-03-18 16:53                     ` Eric Abrahamsen
2022-03-18 15:27       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-18 16:03         ` Eric Abrahamsen
2022-03-19  4:53 ` Andrew Cohen
2022-03-19 16:25   ` Roland Winkler
2022-03-21 19:33     ` Eric Abrahamsen
2022-03-21 19:38       ` Lars Ingebrigtsen
2022-03-21 19:48         ` Eric Abrahamsen
2022-03-21 19:50           ` Lars Ingebrigtsen
2022-03-21 23:18             ` Eric Abrahamsen
2022-03-21 20:40       ` Roland Winkler
2022-03-21 23:27         ` Eric Abrahamsen
2022-03-19 21:52 ` Andrew Cohen
2022-03-20  3:50   ` Roland Winkler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czihuvsb.fsf@gnu.org \
    --to=winkler@gnu.org \
    --cc=54158@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).