Subject: 23.0.60; [REGRESSION] gnus/nnimap/agent: all mails marked as read the second time you enter INBOX

From: Luca Capello <[email-masked]>
Date: Mon, 10 Mar 2008 15:33:01 +0100

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the [email-masked] mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Hello,

please Cc: me, I'm not subscribed to the list.

With the latest emacs-snapshot upgrade on Debian, gnus started marking
all the mails in my IMAP INBOX folder as read.  I reported this as a
regression because I didn't change anything WRT my gnus configuration
and downgrading to emacs-snapshot_1:20080215-1~etch1 removed the bug.

I tested different times, with the same results:

- quit gnus and emacs
- through webmail, move all my IMAP INBOX mails to another folder, mark
  them as unread and move them back to INBOX
- launch emacs and gnus
- the first time gnus starts, the group summary shows the correct total
  number of the unread messages in my IMAP INBOX folder
- enter and exit the IMAP INBOX group
- M-x gnus-group-get-new-news and now the IMAP INBOX group has 0 unread
  mails
- C-u M-x gnus-group-get-new-news doesn't show the read mails either

I suspected a specific problem with my configuration, since I tested a
minimal .gnus (simply setting `gnus-select-method') with another clean
account on the same box and there's no bug there.  However, reading
lisp/gnus/ChangeLog didn't show me any relevant change.

After some debugging, I found that simply disabling the gnus agent or
wiping ~/News/agent/ solved the problem.  More debugging revealed that
another solution was calling `gnus-agent-expire'.  Again, I don't know
what changed with emacs-snapshot_1:20080307-1 and why previous versions
(including 20080215-1~etch1) didn't spot this.

Thx, bye,
Gismo / Luca

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.0.60/etc/DEBUG for instructions.

In GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu)
 of 2008-03-07 on elegiac, modified by Debian
 (emacs-snapshot package, version 1:20080307-1)
configured using `configure  '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.0.60/leim' '--with-x=no' '--without-dbus' '--without-sound' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  shell-dirtrack-mode: t
  gnus-topic-mode: t
  gnus-undo-mode: t
  gpm-mouse-mode: t
  display-battery-mode: t
  display-time-mode: t
  show-paren-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC 
[ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B 
ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC 
[ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B 
ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC 
[ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B 
ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC 
[ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B 
ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B C-x k RET ESC 
x i n f o RET / G n u m G n u TAB s TAB RET TAB TAB 
TAB TAB TAB TAB RET TAB TAB TAB TAB TAB TAB TAB TAB 
TAB RET TAB TAB RET TAB TAB TAB TAB ESC [ Z RET TAB 
TAB TAB C-x k RET TAB TAB TAB TAB TAB ESC [ B ESC [ 
D ESC [ D ESC [ B C-x o C-x o ESC [ B ESC [ A ESC [ 
A ESC [ A C-h v RET C-x k RET C-x o C-x k RET C-c ESC 
f g C-x b RET d ESC x r e p o e r TAB DEL DEL r TAB 
e m TAB b u TAB RET

Recent messages:
Making completion list...
uncompressing gnus.gz...done
uncompressing gnus-1.gz...done
uncompressing gnus-2.gz...done
Info-next-reference: No cross references in this node [3 times]
mouse-2, RET: find variable's definition
mouse-2, RET: customize variable
mouse-2, RET: read this Info node
mouse-2, RET: go back to previous help buffer
mouse-2, RET: find variable's definition