bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Mon, 08 Apr 2019 11:31:57 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On 04/08/19 17:13 PM, Katsumi Yamaoka wrote:
> On Wed, 27 Mar 2019 13:54:42 +0900, Katsumi Yamaoka wrote:
>> 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'...
>
> I found a cause of it not to be listed in the group buffer just
> after launching Gnus.
>
> The group entry in the ~/Mail/active file is:
>
> テスト 5 1 y
>
> The file coding is utf-8-unix.  So, the binary expression of the
> group name is \343\203\206\343\202\271\343\203\210, where \343
> is a single character, and this form is what the hash tables use
> (in the ~/.newsrc.eld file, "\343" consists of four characters
>  "\", "3", "4", and "3", though).
>
> `gnus-active-to-gnus-format' reads it in the following way:
>
> ・Load the active file to the " *nntpd*" buffer in the binary
>  mode.  Copy it to another temp buffer.  There \343 is a single
>  character.
> ・Read the group name using `(read (current-buffer))'.
>  Then it is read as a symbol; \343 is still a single character.
> ・Convert it to a string using `symbol-name'.
>  \343 is expanded into the one consists of four characters. :<
>  It should never match to the one in the hash tables.
>
> Why the single-char to four-chars conversion happens is that
> the buffer where those processes are done is in the multibyte
> mode.  So, the patch attached below solves the problem.  I'm
> going to test it for the other back ends...
>
> --- gnus-start.el~    2019-03-25 21:22:46.184139100 +0000
> +++ gnus-start.el     2019-04-08 08:07:41.906976900 +0000
> @@ -2139,3 +2139,3 @@
>
> -    (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?

Eric

Attachment: 0001-WIP-on-nnmail-group-names.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]