I currently have three email accounts I use and access with gnus. After a recent upgrade to emacs 28.1 I lost the ability to search the mail for one of these addresses. They are all initiated similarly with a gnus-secondary-select-methods of 'nnimap. They all three retrieve mail and allow viewing and sending. For two of them the new parsed search queries work perfectly, and for one of them (microsoft exchange server 2016 imap 4) it always returns an empty group. I thought it might be something funny with that server so I logged on to it via telnet and did the search that way and verified it correctly finds the correct messages. Turning gnus verbosity up to 10 does not reveal any error messages. Any idea what could be causing this idiosyncratic behavior? I also logged onto a different computer running emacs 27 and for the same email account imap based search works fine.

1 Answer 1


Sounds like a bug in Gnus, or a bug in the IMAP server you are using. You should report it to the Gnus maintainer by running M-x gnus-bug.

  • Reporting the bug led to me discovering that gnus is sending the imap command with the UTF-8 charset, but the MS Exchange server only suppports US-ASCII. You can change this manually in the gnus-search.el.gz file and recompile. Hopefully a better longer term fix will be implemented at some point. May 5, 2022 at 9:37
  • That definitely sounds like a bug in Exchange :). Glad you figured it out though.
    – db48x
    May 5, 2022 at 9:56
  • 1
    @grszkthfr The bug report was: #55214 . The fix is to find the gnus-search file and replace "UID SEARCH CHARSET UTF-8 %s" with "UID SEARCH CHARSET US-ASCII %s" then recompile the source. Of course this way you have to repeat the action everytime you update your emacs version. Hopefully, they will figure out a longer term fix soon. I think they are working on it. Sep 25, 2022 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.