From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Gnus nnir patch for Emacs 26? Date: Thu, 13 Jun 2019 15:20:52 -0700 Message-ID: <87wohp2kl7.fsf@ericabrahamsen.net> References: <87tvcuscih.fsf@ericabrahamsen.net> <83y325ztr0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="32304"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 14 00:22:11 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hbY6l-00084t-JF for ged-emacs-devel@m.gmane.org; Fri, 14 Jun 2019 00:22:11 +0200 Original-Received: from localhost ([::1]:46082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbY6c-0001Kt-RM for ged-emacs-devel@m.gmane.org; Thu, 13 Jun 2019 18:22:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41745) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbY68-0001Hk-IE for emacs-devel@gnu.org; Thu, 13 Jun 2019 18:21:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbY5i-0006S8-Vt for emacs-devel@gnu.org; Thu, 13 Jun 2019 18:21:09 -0400 Original-Received: from [195.159.176.226] (port=36662 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbY5i-0006OM-FP for emacs-devel@gnu.org; Thu, 13 Jun 2019 18:21:06 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hbY5d-0006n6-NC for emacs-devel@gnu.org; Fri, 14 Jun 2019 00:21:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:YryjUY6b7Kmtrb52tntrEn1e5mk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237559 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Eric Abrahamsen >> Date: Wed, 12 Jun 2019 14:46:14 -0700 >> >> Someone recently reported a bug in Gnus for searching IMAP groups when >> the group has a non-ascii name. The bug has been there a while, at least >> as far back as Emacs 26. I've attached the diff, which looks large only >> because of indentation changes, it boils down to adding the line: >> >> (setq group (nnimap-decode-gnus-group group)) > > I didn't understand that this change fixes the problem, the last > message still indicated the patch didn't resolve it. Did you continue > discussing off-list or something? If not, how do you know the fix is > complete? Yes, Dieter wrote off-list (I think by accident) right afterwards to say he'd been mistaken and the fix worked. I was also able to reproduce the bug and confirm the fix. >> Is it too late/too intrusive for Emacs 26? This is the first time >> anyone's reported the bug, so it's obviously not super pressing. Another >> odd thing is that this fix will be unnecessary once the >> scratch/gnus-decoded branch lands, so this change shouldn't go into >> master, but I gather that's possible with a dontmerge cookie or >> something. > > If this patch indeed fixes the problem, it's okay for emacs-26, but > please only add that one line, don't reindent anything and don't > replace lambda with its fancier equivalent. Just the minimal required > change. Here's a proper commit with a simpler-looking version that doesn't re-indent everything. I've done before-and-after tests and this works just the same. I've also added a do not merge thing following Robert's pointer. How's it look? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0007-Make-sure-Gnus-imap-group-names-are-decoded-before-s.patch >From f999e6e090f300769fe6087290459701dc929acc Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 13 Jun 2019 15:09:24 -0700 Subject: [PATCH 7/7] Make sure Gnus imap group names are decoded before searching do not merge (fix unnecessary in Emacs 27) * lisp/gnus/nnir.el (nnir-run-imap): Ensure that non-ascii group names have been fully decoded before passing them to imap search. --- lisp/gnus/nnir.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 05b2f0aa8a..0062cd8589 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -969,6 +969,7 @@ nnir-run-imap (mapcar #'(lambda (group) (let (artlist) + (setq group (nnimap-decode-gnus-group group)) (condition-case () (when (nnimap-change-group (gnus-group-short-name group) server) -- 2.22.0 --=-=-=--