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

Previous Next

Packages: gnus, emacs;

Reported by: Alan Schmitt <alan.schmitt <at> polytechnique.org>

Date: Wed, 25 Mar 2015 10:28:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20197 in the body.
You can then email your comments to 20197 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bugs <at> gnus.org:
bug#20197; Package gnus. (Wed, 25 Mar 2015 10:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Schmitt <alan.schmitt <at> polytechnique.org>:
New bug report received and forwarded. Copy sent to bugs <at> gnus.org. (Wed, 25 Mar 2015 10:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alan Schmitt <alan.schmitt <at> polytechnique.org>
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
Date: Wed, 25 Mar 2015 11:26:54 +0100
[Message part 1 (text/plain, inline)]
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 1344.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|SUBSCRIPTIONS]
  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 <at> ger.gmane.org>.
.
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|SUBSCRIPTIONS]
  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 <at> ger.gmane.org>.
.

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
[signature.asc (application/pgp-signature, inline)]

bug reassigned from package 'gnus' to 'emacs,gnus'. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 26 Jan 2017 18:11:04 GMT) Full text and rfc822 format available.

bug No longer marked as found in versions 5.130012. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 26 Jan 2017 18:11:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#20197; Package emacs,gnus. (Mon, 23 Sep 2019 11:40:02 GMT) Full text and rfc822 format available.

Message #12 received at 20197 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alan Schmitt <alan.schmitt <at> polytechnique.org>
Cc: 20197 <at> debbugs.gnu.org
Subject: Re: bug#20197: moving a message to an empty group on a different
 imap server fails
Date: Mon, 23 Sep 2019 13:39:32 +0200
Alan Schmitt <alan.schmitt <at> polytechnique.org> writes:

> 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).

I think this was fixed by this patch:

commit 3fb7881a0e320f380203c0f2dd16dfc7189af1e9
Author: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Date:   Sun Sep 6 12:47:43 2015 +0000

    nnimap.el:  Handle nil arg to nnimap-request-group
    
    * lisp/gnus/nnimap.el (nnimap-request-group):  Handle nil "info" arg.
    This arg isn't always passed in, check it's not nil before making it
    into a list.  The active arg will also be nil if the group is new,
    check for that.

So this should work now, and I'm closing this bug report.  If you're
still seeing this bug, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 20197 <at> debbugs.gnu.org and Alan Schmitt <alan.schmitt <at> polytechnique.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 23 Sep 2019 11:40:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Oct 2019 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 298 days ago.

Previous Next


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