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

From: Eric Abrahamsen <[email-masked]>
Date: Mon, 08 Apr 2019 19:01:08 -0700

On 04/09/19 09:55 AM, Katsumi Yamaoka wrote:
> 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.

Yes, that's what I was saying! Do the minimum needed now to get things
working again, then I'll be more careful putting a more thorough fix
later.

>> --- 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.

Yes, it's ugly, but hopefully it's temporary. I am glad that it doesn't
affect speed, though.

> 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 very much. I'll push this now, and then see what else needs
cleaning up.

Eric