all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-devel@gnu.org
Subject: Re: Gnus nnir patch for Emacs 26?
Date: Thu, 13 Jun 2019 15:20:52 -0700	[thread overview]
Message-ID: <87wohp2kl7.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 83y325ztr0.fsf@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1692 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Eric Abrahamsen <eric@ericabrahamsen.net>
>> 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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0007-Make-sure-Gnus-imap-group-names-are-decoded-before-s.patch --]
[-- Type: text/x-patch, Size: 934 bytes --]

From f999e6e090f300769fe6087290459701dc929acc Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
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


  reply	other threads:[~2019-06-13 22:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 21:46 Gnus nnir patch for Emacs 26? Eric Abrahamsen
2019-06-13  7:02 ` Robert Pluim
2019-06-13 10:04 ` Eli Zaretskii
2019-06-13 22:20   ` Eric Abrahamsen [this message]
2019-06-14  6:03     ` Eli Zaretskii
2019-06-14  8:18       ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wohp2kl7.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.