From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#35383: 27.0.50; Complete process of decoding Gnus group names Date: Fri, 26 Apr 2019 14:21:11 +0900 Organization: Emacsen advocacy group Message-ID: References: <878sw1995f.fsf@ericabrahamsen.net> <87sgu87ayo.fsf@ericabrahamsen.net> <87k1fj49o2.fsf@ericabrahamsen.net> <87bm0uhxqy.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="221582"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-cygwin) Cc: 35383@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 26 07:22:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJtJL-000vVw-3k for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Apr 2019 07:22:11 +0200 Original-Received: from localhost ([127.0.0.1]:39535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJtJK-0001Kp-3I for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Apr 2019 01:22:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJtJD-0001Jf-Fp for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2019 01:22:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJtJC-0006Od-4l for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2019 01:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJtJC-0006OS-0W for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2019 01:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJtJB-0004yx-RA for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2019 01:22:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <878sw1995f.fsf@ericabrahamsen.net> Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Apr 2019 05:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35383 X-GNU-PR-Package: emacs Original-Received: via spool by 35383-submit@debbugs.gnu.org id=B35383.155625609019113 (code B ref 35383); Fri, 26 Apr 2019 05:22:01 +0000 Original-Received: (at 35383) by debbugs.gnu.org; 26 Apr 2019 05:21:30 +0000 Original-Received: from localhost ([127.0.0.1]:59799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJtIf-0004yD-Jq for submit@debbugs.gnu.org; Fri, 26 Apr 2019 01:21:29 -0400 Original-Received: from orchid.birch.relay.mailchannels.net ([23.83.209.137]:9902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJtIe-0004y5-1l for 35383@debbugs.gnu.org; Fri, 26 Apr 2019 01:21:28 -0400 X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A0285141BEA; Fri, 26 Apr 2019 05:21:26 +0000 (UTC) Original-Received: from hampton.hostforweb.net (100-96-7-81.trex.outbound.svc.cluster.local [100.96.7.81]) (Authenticated sender: tih5qno0ow) by relay.mailchannels.net (Postfix) with ESMTPA id 93A20141C9E; Fri, 26 Apr 2019 05:21:25 +0000 (UTC) X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net Original-Received: from hampton.hostforweb.net ([TEMPUNAVAIL]. [172.245.115.217]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Fri, 26 Apr 2019 05:21:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net X-MailChannels-Auth-Id: tih5qno0ow X-Relation-Slimy: 2e8bffaa2fa9f6f7_1556256086297_3208961440 X-MC-Loop-Signature: 1556256086297:1713373362 X-MC-Ingress-Time: 1556256086297 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1hJtIP-003rqv-MO; Fri, 26 Apr 2019 00:21:15 -0500 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:4tvPZm/vVRg8IWjVn0OHNxw20X4= X-OutGoing-Spam-Status: No, score=-0.2 X-AuthUser: yamaoka@hampton.hostforweb.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158268 Archived-At: On Thu, 25 Apr 2019 09:10:13 -0700, Eric Abrahamsen wrote: > On 04/25/19 08:48 AM, Katsumi Yamaoka wrote: >> Warning: Warning - invalid active: >> for the nnnil method, that is my `gnus-select-method'. Here are >> the contents of ~/News/agent/nnnil/agent.lib/active: >> --8<---------------cut here---------------start------------->8--- >> ;; -*- encoding: utf-8-emacs; -*- >> --8<---------------cut here---------------end--------------->8--- >> Why the warning is issued is to run (read (current-buffer)) at >> the beginning of the contents. This is actually an error but >> `condition-case' conceals it. > Hmm, this is all done in a temp buffer, Yes. When launching Gnus, the whole contents of the active file are read into the " *nntpd*" buffer, copied into the temp buffer, and parsed (see the flow summary attatched in the bottom of this message for how Gnus behaves when launching). > 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? Here are how Gnus reads the active file for the nnnil method observed in my system. Note that `gnus-agent' is t (the default). (gnus 1) [...] (gnus-setup-news nil t nil) (gnus-get-unread-articles 1 nil) (require 'gnus-agent) (with-current-buffer " *nntpd*" (gnus-read-active-file-1 '(nnnil) nil) (gnus-active-to-gnus-format '(nnnil) hashtb nil t) (gnus-agent-save-active '(nnil)) (gnus-agent-write-active "active-file" hashtb) ;; Add a coding cookie. (gnus-write-active-file "active-file" hashtb nil) (erase-buffer) (nnheader-insert-file-contents "active-file") (_copy to_ " *nntpd*") (_parse it_) Regards, P.S. I'll be not so active in the net for about ten days because of the national holidays assoc with the era name changing in Japan.