I upgraded to emacs 24 from emacs 23. I had a problem with gnus and getting mail via imap, which I couldn't immediately find a solution to via the usual mechanism of googling the error message.
It turns out that changing the value of gnus-secondary-select-methods from:
((nnimap "mail"))
to
((nnimap "mail"
(nnimap-stream network)))
did the trick.