From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Gnus; Restore multi encoding support for NNTP Date: Fri, 31 Dec 2021 16:59:31 +0100 Message-ID: <874k6o7okc.fsf@gnus.org> References: <87wnjqb62b.fsf@gnus.org> <87sfueb3y1.fsf@gnus.org> <87wnjm6tbs.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4035"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Eric Abrahamsen , Emacs Devel To: LdBeth Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 31 17:00:42 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n3KKg-0000on-08 for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Dec 2021 17:00:42 +0100 Original-Received: from localhost ([::1]:33886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3KKe-0002DV-Bu for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Dec 2021 11:00:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3KJh-0001WN-0x for emacs-devel@gnu.org; Fri, 31 Dec 2021 10:59:42 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=53370 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3KJf-0004Zt-Dh for emacs-devel@gnu.org; Fri, 31 Dec 2021 10:59:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=8l412oO9Ynzjg5qbyHnUE+ZuTQbqy1pk6Io7eLHBVeM=; b=m0BktvNNdHlJvk26rTU+eDPNJv Vrj55uLFjfKZGpLDhEExQvabOtFVkWu0M8WTlBtjJZ71bdwsHVJU+zjtNq3D95tyhacsGMAAu+j+k iFjRZAag0s7er6sAVGCQyG/01jyXPYMtaOZXKXlGI4AP6Qxz5oFFpr9tL3L2y2s8UgX8=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n3KJZ-0002PG-QN; Fri, 31 Dec 2021 16:59:36 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEUUDwsiGxQxKhtU T0Y2MCdDPC5jVTWCbT3///9ZM6kgAAAAAWJLR0QIht6VegAAAAd0SU1FB+UMHw8zEktZ2RwAAAG2 SURBVDjLtZPLdqMwDIblHNK17cCswWNmHRIeABsz61xM1+2clr5Bn7+SgMAkp7sZLcxBH7r8kgGY TSll0JSCOxN8KCXhn9ljKmVyEHKn7/2JNw7E5djVq77Sa5SZQQBOQusWcOyvewQFdxwW/+ZiTJWi On6x6/Q2nNN+BCKugLF9QxHcarFKhb5cM8gxRNzEzMBKOIEqdeqaBUiKAFEd610a6gkInDZxzNP4 TEEQsxTNBQncTQqnRBi9NoTgi3kp1lNE6XPeI24SKcuIxkQ6i7/zoD5jykucBa5mS5egxXkZT6/Z 8D59gB5baAItVkk+h+HPDXQHbfHx8wTwe0DjLsEXpq+LdASC/MML6/aYo3Ibz2DL4G0aCPZzTgOC PTwNH0RmUMApxSLlHn5wxCCn2SLICFSPoHkEmoEkjuBpBFSjY+CSwGDs6p1Az8BvDlx81PFKIDII WwKo/Bn9z80CMo0CS3Rs50xA0zN50ozXBODXPCqqgfc5bqY7CvNid8FTLi2mfSymQ+cNj9/BnQlr WGm+jYdr2/mqvpEz/wAyiXVo2+CWnJ4XA4+W0OHgG8u/AxL+i30BYqViLgdydBkAAAAldEVYdGRh dGU6Y3JlYXRlADIwMjEtMTItMzFUMTU6NTE6MTgrMDA6MDAWZS5wAAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIxLTEyLTMxVDE1OjUxOjE4KzAwOjAwZziWzAAAAABJRU5ErkJggg== X-Now-Playing: Herbert's _Bodily Functions (1)_: "Foreign Bodies" In-Reply-To: (LdBeth's message of "Thu, 30 Dec 2021 23:18:19 +0800") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:283748 Archived-At: LdBeth writes: > This property is automatically added by `decode-coding-string` when > the decoding is non trivial. It seems Gnus can save and restore text > properties without further modification, and at least this won't break > anything that is already working. Please let me know if this is an > unreliable behavior. > > ``` > (decode-coding-string "\262\342\312\324" 'gbk) > ;; =3D=3D> #("=E6=B5=8B=E8=AF=95" 0 2 (charset chinese-gbk)) ;; "test" in= Chinese > > ``` Ah, right, I'd totally forgotten that bit. I think it can be relied upon. And storing the info as a text property will probably work in Gnus -- it'll save the data to .newsrc.eld, as you've found out -- but it sounds pretty brittle to me. That is, I wouldn't be surprised if the text property goes missing at some point, because the code in Gnus isn't written with text properties in mind. > Lars> And... I don't understand why `gnus-group-real-name' should encode > Lars> anything -- it's a function used everywhere to just strip the prefix > Lars> from group names, and doesn't really have anything conceptually to = do > Lars> with translating to on-the-wire formats. > > oops, I'm doing this wrong. I was meant to modify only where > `gnus-group-real-name' been called inside `gnus-int.el`. > > Btw I figured it is not a good idea to do encoding in nntp.el because > the decoding was not done in nntp.el either. Perhaps just having this in an alist in nntp.el somewhere would be the most logical choice, even though it means that nntp.el peeks at Gnus variables.=20 --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no