[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash t
From: |
Eric Abrahamsen |
Subject: |
bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables |
Date: |
Wed, 27 Mar 2019 14:27:19 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
On 03/27/19 13:54 PM, Katsumi Yamaoka wrote:
> On Tue, 26 Mar 2019 14:44:32 -0700, Eric Abrahamsen wrote:
>> Thanks for this report. When you have a moment will you please try the
>> attached patch and see if it fixes the problem?
>
> Works great. Now I can enter and read the nnml:テスト group.
> Thank you. But there seem to be some more fix needed.
>
> The group level of nnml:テスト is 1 and there are some unread
> articles in it, however the group is not listed in the Group
> buffer when I launch Gnus by `C-u 1 M-x gnus RET' (it also
> happened when I worked on non-ASCII group names years ago, but
> I don't recall how I fixed it, sorry). Typing L helps it.
I think I've found the source of the problem. The error you and others
are seeing comes when the group has an entry in gnus-newsrc-hashtb (ie,
you're subscribed to the group) but not in gnus-active-hashtb (Gnus
can't tell if the group has articles).
Gnus writes "nnml:テスト" to .newsrc.eld as
"nnml:\343\203\206\343\202\271\343\203\210", and that's used as the key
in gnus-newsrc-hashtb. But when it reads the active info from nnml, the
(unibyte) buffer contains:
nnml:\343\203\206\343\202\271\343\203\210
As a symbol, not a string. My current code then uses `symbol-name' to
turn it into a string, but it's crucially *not the same string* as the
one saved to.newsrc.eld, even though it looks the same in edebug, the
*scratch* buffer, etc.
Hence a mismatch between the two keys in the two hash-tables, and things
going haywire.
Obviously this arises from a misunderstanding on my part about how
bytes and strings interact. The code in question is at line 2145 in
gnus-start.el -- it uses `read' to pick pieces out of the buffer.
Right now my best idea is to swap out `read' for a some sort of regexp
crawl, but I am open to suggestions.
Thanks,
Eric
- bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables, (continued)
- bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables, Andy Moreton, 2019/03/25
- bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables, Eric Abrahamsen, 2019/03/25
- bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables, Robert Pluim, 2019/03/25
- bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables, Basil L. Contovounesios, 2019/03/25
- bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables, Bastien, 2019/03/25
- bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables, Andy Moreton, 2019/03/25
- bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables, Eric Abrahamsen, 2019/03/26
bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables, Eric Abrahamsen, 2019/03/26