Subject: Re: bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables

From: Katsumi Yamaoka <[email-masked]>
Date: Tue, 09 Apr 2019 09:55:23 +0900

On Mon, 08 Apr 2019 11:31:57 -0700, Eric Abrahamsen wrote:
> On 04/08/19 17:13 PM, Katsumi Yamaoka wrote:
>> -    (with-temp-buffer
>> +    (mm-with-unibyte-buffer
>>        (insert-buffer-substring cur)

> I was asking on emacs.devel about that, and with Andreas' help came up
> with the attached patch. It's a terrible hack, but it seems to work, and
> I think would be good as an intermediate step.

> What you're doing -- changing the unibyte/multibyte status of the
> buffers -- is I think part of the final, more correct solution to the
> problem, that will leave group names decoded everywhere. But I would
> like to Gnus back into an intermediate working state before tackling
> that...

> What do you think?

Whatever we should do finally, isn't it necessary to make Gnus on
Emacs master work now anyway even if it is immature?  Those who
like the *latest* code by any means (me included) would be coming
to use it sooner or later.  So, I'd like you to install to master
a fix whatever makes Gnus work.

> --- a/lisp/gnus/gnus-start.el
> +++ b/lisp/gnus/gnus-start.el
[...]
>  				(setq group (read cur)
> +				      group
> +				      (encode-coding-string
> +				       (cond ((numberp group)
> +					      (number-to-string group))
> +					     ((symbolp group)
> +					      (symbol-name group))
> +					     ((stringp group)
> +					      group))
> +				       'latin-1))))

Makes sense to me.  Though encoding the one having already encoded
looks redundant, I have no idea other than this and my patch, and
benchmark reports there is no notably difference in speed between
this and my patch.
Anyway I verified it works for listing the nnml:テスト group.

> --- a/lisp/gnus/nnmail.el
> +++ b/lisp/gnus/nnmail.el

> --- a/lisp/gnus/nnml.el
> +++ b/lisp/gnus/nnml.el

Verified that those patches enable updating groups by `M-g'.

> --- a/lisp/gnus/nnrss.el
> +++ b/lisp/gnus/nnrss.el

Verified that I can read some feeds.

Thanks.