unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: LdBeth <andpuke@foxmail.com>
Cc: Eric Abrahamsen <eric@ericabrahamsen.net>,
	Emacs Devel <emacs-devel@gnu.org>
Subject: Re: [PATCH] Gnus; Restore multi encoding support for NNTP
Date: Fri, 31 Dec 2021 16:59:31 +0100	[thread overview]
Message-ID: <874k6o7okc.fsf@gnus.org> (raw)
In-Reply-To: <tencent_ACAA1B5F378B23490F23C6A6CEB655DA9F06@qq.com> (LdBeth's message of "Thu, 30 Dec 2021 23:18:19 +0800")

LdBeth <andpuke@foxmail.com> 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)
> ;; ==> #("测试" 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. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



  reply	other threads:[~2021-12-31 15:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-27  9:42 Gnus; Restore multi encoding support for NNTP LdBeth
2021-12-27 12:11 ` Lars Ingebrigtsen
2021-12-27 12:41   ` LdBeth
2021-12-27 12:57     ` Lars Ingebrigtsen
2021-12-27 13:58       ` LdBeth
2021-12-28  3:17         ` Eric Abrahamsen
2021-12-28 14:31           ` Lars Ingebrigtsen
2021-12-28 15:40             ` LdBeth
2021-12-28 14:29         ` Lars Ingebrigtsen
2021-12-28 15:43           ` LdBeth
2021-12-30 10:23         ` [PATCH] " LdBeth
2021-12-30 14:49           ` Lars Ingebrigtsen
2021-12-30 14:54             ` Eli Zaretskii
2021-12-30 15:18             ` LdBeth
2021-12-31 15:59               ` Lars Ingebrigtsen [this message]
2022-01-01  2:11                 ` LdBeth
2022-01-01  3:32                   ` LdBeth
2022-01-03 11:18                     ` Lars Ingebrigtsen
2022-01-03 11:25                       ` Lars Ingebrigtsen
2022-01-03 14:00                       ` LdBeth
2022-01-01  6:58                   ` Eli Zaretskii
2022-01-01  8:34                     ` LdBeth
2022-01-01  8:56                       ` Eli Zaretskii
2022-01-01  9:26                         ` LdBeth
2022-01-01  9:35                           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874k6o7okc.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=andpuke@foxmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).