GNU bug report logs - #20197
moving a message to an empty group on a different imap server fails

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs,gnus; Reported by: Alan Schmitt <alan.schmitt@HIDDEN>; dated Wed, 25 Mar 2015 10:28:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug No longer marked as found in versions 5.130012. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug reassigned from package 'gnus' to 'emacs,gnus'. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Mar 2015 10:27:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 25 06:27:06 2015
Received: from localhost ([127.0.0.1]:35969 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YaiWf-0000W4-Gy
	for submit <at> debbugs.gnu.org; Wed, 25 Mar 2015 06:27:05 -0400
Received: from mx1.polytechnique.org ([129.104.30.34]:55545)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <SRS0=PWet=EH=polytechnique.org=alan.schmitt@HIDDEN>)
 id 1YaiWd-0000Vv-Jv
 for submit <at> debbugs.gnu.org; Wed, 25 Mar 2015 06:27:04 -0400
Received: from wifi-eduroam-161122.inria.fr (ren089r.vpn.inria.fr
 [128.93.181.89])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by ssl.polytechnique.org (Postfix) with ESMTPSA id D3B3E1408EFAA
 for <submit <at> debbugs.gnu.org>; Wed, 25 Mar 2015 11:27:00 +0100 (CET)
From: Alan Schmitt <alan.schmitt@HIDDEN>
To: submit <at> debbugs.gnu.org (The Gnus Bugfixing Girls + Boys)
Subject: moving a message to an empty group on a different imap server fails
X-Debbugs-Version: 5.130012
X-Debbugs-Package: gnus
Date: Wed, 25 Mar 2015 11:26:54 +0100
Message-ID: <m2pp7xqsnl.fsf@HIDDEN>
User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.90 (darwin)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Wed Mar 25
 11:27:01 2015 +0100 (CET))
X-Spam-Flag: No, tests=bogofilter, spamicity=0.000510, queueID=F29551408EFCA
X-Org-Mail: alan.schmitt.1995@HIDDEN
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello,

I'm seeing a bug with the current git version of gnus when I move
a message in an empty group on a different imap server. I've discovered
the bug through expiring but I can reproduce it when manually moving the
message (using "B m").

The problem happens in the last line of that snippet

#+begin_src emacs-lisp
(deffoo nnimap-request-group (group &optional server dont-check info)
  (setq group (nnimap-decode-gnus-group group))
  (let ((result (nnimap-change-group
      	   ;; Don't SELECT the group if we're going to select it
      	   ;; later, anyway.
      	   (if (and (not dont-check)
      		    (assoc group nnimap-current-infos))
      	       nil
      	     group)
      	   server))
        articles active marks high low)
    (with-current-buffer nntp-server-buffer
      (when result
        (when (or (not dont-check)
      	    (not (setq active
      		       (nth 2 (assoc group nnimap-current-infos)))))
          (let ((sequences (nnimap-retrieve-group-data-early
      		      server (list info))))
#+end_src

It happens if the function is called with info being nil, then
`nnimap-retrieve-group-data-early' is called with `(nil)' as second
argument (the singleton list containing the empty list).

Since `(nil)' is not nil, the guard of the `when' in the following
snippet does not prevent the code from being run in the following

#+begin_src emacs-lisp
(deffoo nnimap-retrieve-group-data-early (server infos)
  (when (and (nnimap-change-group nil server)
             infos)
#+end_src

and the rest of the code breaks (when a `dolist' is done on the list
`(nil)').

Unfortunately I don't know what should be done in `nnimap-request-group'
if `info' is nil, so I cannot propose a patch.

Best regards,

Alan


Ma Gnus v0.12
GNU Emacs 24.4.90.1 (x86_64-apple-darwin14.1.0, Carbon Version 157 AppKit 1=
344.72)
 of 2015-03-11 on charm-ecran.irisa.fr
200 news.gmane.org InterNetNews NNRP server INN 2.5.1 ready (posting ok)
100 Legal commands
  ARTICLE [message-ID|number]
  AUTHINFO USER name|PASS password|GENERIC program [argument ...]
  BODY [message-ID|number]
  CAPABILITIES [keyword]
  DATE
  GROUP newsgroup
  HDR header [message-ID|range]
  HEAD [message-ID|number]
  HELP
  IHAVE message-ID
  LAST
  LIST [ACTIVE [wildmat]|ACTIVE.TIMES [wildmat]|DISTRIB.PATS|DISTRIBUTIONS|=
HEADERS [MSGID|RANGE]|MODERATORS|MOTD|NEWSGROUPS [wildmat]|OVERVIEW.FMT|SUB=
SCRIPTIONS]
  LISTGROUP [newsgroup [range]]
  MODE READER
  NEWGROUPS [yy]yymmdd hhmmss [GMT]
  NEWNEWS wildmat [yy]yymmdd hhmmss [GMT]
  NEXT
  OVER [range]
  POST
  QUIT
  STARTTLS
  STAT [message-ID|number]
  XGTITLE [wildmat]
  XHDR header [message-ID|range]
  XOVER [range]
  XPAT header message-ID|range pattern [pattern ...]
Report problems to <usenet@HIDDEN>.
.
382 Begin TLS negotiation now
100 Legal commands
  ARTICLE [message-ID|number]
  AUTHINFO USER name|PASS password|GENERIC program [argument ...]
  BODY [message-ID|number]
  CAPABILITIES [keyword]
  DATE
  GROUP newsgroup
  HDR header [message-ID|range]
  HEAD [message-ID|number]
  HELP
  IHAVE message-ID
  LAST
  LIST [ACTIVE [wildmat]|ACTIVE.TIMES [wildmat]|DISTRIB.PATS|DISTRIBUTIONS|=
HEADERS [MSGID|RANGE]|MODERATORS|MOTD|NEWSGROUPS [wildmat]|OVERVIEW.FMT|SUB=
SCRIPTIONS]
  LISTGROUP [newsgroup [range]]
  MODE READER
  NEWGROUPS [yy]yymmdd hhmmss [GMT]
  NEWNEWS wildmat [yy]yymmdd hhmmss [GMT]
  NEXT
  OVER [range]
  POST
  QUIT
  STARTTLS
  STAT [message-ID|number]
  XGTITLE [wildmat]
  XHDR header [message-ID|range]
  XOVER [range]
  XPAT header message-ID|range pattern [pattern ...]
Report problems to <usenet@HIDDEN>.
.

=2D-=20
OpenPGP Key ID : 040D0A3B4ED2E5C7

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)

iQEcBAEBCgAGBQJVEo10AAoJEAQNCjtO0uXH8FIH+wVjkfbImD0MD6MqnBpyaaWp
hXTuCr8TYLKlhX80m5PD7L0AkKf/GtFdhAjVyfpn3i9c4Am+2chqSXW/qE1540J5
3hdvo5G8jrCSf33y7UNJvSv4f+mKpjcGG3GxQ64vC4/59tNYV0p7x38cP+EHEn33
qnMMeEADwzJWN0+vi+tT7dnkrvGgS/Y1qlXlRYNJsbp5w9EHd/HYvdaWfJC4xhlo
IYym7zt3iKdCXemRABQoQmqyOv9fA2vZcX63Loduq8cGwA423L/JAmX7qK1zmEWC
ui5xPg1g2eNvexaMenTX/5rD6JIvxkIF8T1LF2epPy1JABpUfTkNtrWWFSnzBkw=
=ap/u
-----END PGP SIGNATURE-----
--=-=-=--





Acknowledgement sent to Alan Schmitt <alan.schmitt@HIDDEN>:
New bug report received and forwarded. Copy sent to bugs@HIDDEN. Full text available.
Report forwarded to bugs@HIDDEN:
bug#20197; Package gnus. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 26 Jan 2017 18:15:01 UTC

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