GNU bug report logs -
#35383
27.0.50; Complete process of decoding Gnus group names
Previous Next
Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Date: Mon, 22 Apr 2019 18:42:02 UTC
Severity: normal
Tags: fixed
Found in version 27.0.50
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #38 received at 35383 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 26 Apr 2019 14:21:11 +0900
> From: Katsumi Yamaoka <yamaoka <at> jpl.org>
> Cc: 35383 <at> debbugs.gnu.org
>
> > with
> > `insert-buffer-substring' -- I wonder if the encoding cookie will even
> > be honored in this case?
>
> No, it's useless of course. Moreover, --- I changed my idea
> (patching the `gnus-active-to-gnus-format' function so as to
> ignore the coding cookie) --- I come to think that the active
> file should not contain the ones other than the active infos.
> Gnus indeed ignores the coding cookie when parsing active, but
> it is due to just a lucky side effect of `read':
>
> (read ";; coding cookie\n\nactive_info\n") => active_info
>
> I.e., `read' ignores comments in the ELisp style and whitespace.
> However, in the first place, the active file is neither an ELisp
> file nor there is no agreement for a comment style in it. So, I
> think it is better to bind `coding-system-for-(read|write)' while
> reading and writing the active file rather than adding a coding
> cookie. Though binding `coding-system-for-(read|write)' would
> probably be unnecessary since `gnus-write-active-file' binds
> `coding-system-for-write' to `nnmail-active-file-coding-system',
> and `gnus-agent-save-active' binds `coding-system-for-read' to
> `gnus-agent-file-coding-system' that defaults to `utf-8-emacs'.
> Therefore, adding a coding cookie was originally unnecessary,
> wasn't it?
It is not unnecessary, because that file could be visited normally in
Emacs. So even if you have to bind coding-system-for-read for some
reason (and I admit I don't understand the reasons very well, and in
particular this will not affect 'read' or any other primitive that
is supposed to be reading from an already decoded buffer/string),
there are still valid reasons to have the cookie in the file.
This bug report was last modified 5 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.