Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Kenichi Handa <handa@ni.aist.go.jp>, ding@gnus.org, emacs-devel@gnu.org
Subject: Re: [Unicode-2] `read' always returns multibyte symbol
Date: Thu, 15 Nov 2007 08:52:57 +0900	[thread overview]
Message-ID: <b4mejesjsfa.fsf@jpl.org> (raw)
In-Reply-To: <jwv7ikk3mp7.fsf-monnier+emacs@gnu.org>

>>>>> Stefan Monnier wrote:

>> !     ;; Use a unibyte buffer in order to make `read' read non-ASCII
>> !     ;; group names (which have been encoded) as unibyte strings.
>> !     (mm-with-unibyte-buffer
>> !       (insert-buffer-substring cur)

> Why is `cur' a multibyte buffer?  Since it contains encoded strings, I'd
> expect it would be better (more robust and convenient) to use a unibyte
> buffer for it.

Good point.  The `cur' is `nntp-server-buffer' (" *nntpd*") or
`gnus-work-buffer' (" *gnus work*") as the case may be.  Gnus uses
those buffers for various purposes.  Although there looks no
situation where it is necessary to have multibyte data as far as
I can observe, Gnus explicitly sets them as multibyte buffers (see
`nnheader-init-server-buffer' and `gnus-set-work-buffer').  I
believe the reason they do so is to prevent from breaking data
when copying them to another multibyte buffer (IIUC, copying data
from a multibyte buffer to a unibyte buffer causes no problem).
So, I didn't modify those buffers' multibyteness.  If I introduced
a new unibyte work buffer (such as " *gnus binary work*"), it
required that `gnus-read-active-file-2' binds `nntp-server-buffer'
to it for example.  It is used by all the back ends but I'm not
sure it never causes a problem with them all.

Regards,

  reply	other threads:[~2007-11-14 23:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13  9:41 Katsumi Yamaoka
2007-11-13 12:55 ` Kenichi Handa
2007-11-13 15:10   ` Stefan Monnier
2007-11-14  4:53     ` Kenichi Handa
2007-11-14  3:56   ` Katsumi Yamaoka
2007-11-14 11:39     ` Katsumi Yamaoka
2007-11-14 14:52       ` Stefan Monnier
2007-11-14 23:52         ` Katsumi Yamaoka [this message]
2007-11-15  1:15           ` Stefan Monnier
2007-11-15  3:01             ` Katsumi Yamaoka
2007-11-15  3:39               ` Stefan Monnier
2007-11-15 10:20       ` Katsumi Yamaoka
2007-11-15 11:08         ` Kenichi Handa
2007-11-15 11:41           ` Katsumi Yamaoka
2007-11-15 14:41             ` Kenichi Handa
2007-11-15 23:31               ` Katsumi Yamaoka
2007-11-16  0:51                 ` Kenichi Handa
2007-11-16  1:24                   ` Katsumi Yamaoka
2007-11-16  2:51                     ` Stefan Monnier
2007-11-15 15:22           ` Stefan Monnier
2007-11-16  0:29             ` Kenichi Handa
2007-11-16 10:50             ` Eli Zaretskii
2007-11-13 15:07 ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=b4mejesjsfa.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@ni.aist.go.jp \
    --cc=monnier@iro.umontreal.ca \
    /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.
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 NNTP newsgroup(s).