unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@unixuser.org>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: Paul Michael Reilly <pmr@pajato.com>, emacs-devel@gnu.org
Subject: Re: Need some help with Rmail/mbox
Date: Sun, 21 Sep 2008 09:57:49 +0900	[thread overview]
Message-ID: <496cc373-d7ad-4b06-9f88-1ab2d2ef3e80@broken.deisui.org> (raw)
In-Reply-To: <87skrvgc8f.fsf@xemacs.org> (Stephen J. Turnbull's message of "Sat, 20 Sep 2008 22:48:00 +0900")

>>>>> In <87skrvgc8f.fsf@xemacs.org> 
>>>>>	"Stephen J. Turnbull" <stephen@xemacs.org> wrote:
>  > I'd recommend to use `decode-coding-string' and `insert' instead of
>  > `decode-coding-region', if unsure.

> How does that help if the target buffer is unibyte?

In this context, we can assume the target buffer multibyte.

Pmail uses seperate buffers unlike Rmail, as Paul indicates in
<48D33A10.4040102@pajato.com>.  Let us call the one buffer holding raw
contents of mbox file A, and another displaying a message B.

I think the most straightforward way is to do:

1. set the buffer A unibyte
2. set the buffer B multibyte
3. extract a message body from A into a string
4. decode the string
5. insert it to B

and the only drawback is inefficiency (if it is measurable).

>  > I heard that the reason why FLIM does not use
>  > `{de|en}code-coding-region' is to avoid this confusion.

> A better strategy would be to force reading the mbox file as multibyte
> binary.  It's a little bit inefficient, but not as inefficient as the
> human brain, so who cares?

The term "multibyte binary" looks like an oxymoron for me ;-)

Regards,
-- 
Daiki Ueno




  reply	other threads:[~2008-09-21  0:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 16:02 Need some help with Rmail/mbox Paul Michael Reilly
2008-09-19  3:28 ` Stephen J. Turnbull
2008-09-19  5:35   ` Paul Michael Reilly
2008-09-19  9:32     ` Eli Zaretskii
2008-09-20  7:12     ` Stephen J. Turnbull
2008-09-20 10:04       ` Daiki Ueno
2008-09-20 10:19         ` Eli Zaretskii
2008-09-20 10:46           ` Daiki Ueno
2008-09-20 11:30             ` Eli Zaretskii
2008-09-20 23:33               ` Richard M. Stallman
2008-09-21  3:18                 ` Eli Zaretskii
2008-09-21 13:34               ` Stefan Monnier
2008-09-21 17:59                 ` Eli Zaretskii
2008-09-21 19:26                   ` Stefan Monnier
2008-09-21 20:56                     ` Eli Zaretskii
2008-09-21 22:07                       ` Stefan Monnier
2008-09-22  3:07                         ` Eli Zaretskii
2008-09-22  3:36                           ` Stefan Monnier
2008-09-22  3:41                           ` Daiki Ueno
2008-09-22  3:58                             ` Stefan Monnier
2008-09-22 18:48                               ` Eli Zaretskii
2008-09-22  4:31                         ` Kenichi Handa
2008-09-22 14:10                           ` Stefan Monnier
2008-09-24  0:56                             ` Kenichi Handa
2008-09-24  2:53                               ` Stefan Monnier
2008-09-24  3:48                                 ` Kenichi Handa
2008-09-22 15:24                           ` Paul Michael Reilly
2008-09-20 13:48         ` Stephen J. Turnbull
2008-09-21  0:57           ` Daiki Ueno [this message]
2008-09-22  9:14             ` Stephen J. Turnbull
2008-09-19  4:30 ` Richard M. Stallman
2008-09-19  4:30 ` Richard M. Stallman
2008-09-19  9:12 ` 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=496cc373-d7ad-4b06-9f88-1ab2d2ef3e80@broken.deisui.org \
    --to=ueno@unixuser.org \
    --cc=emacs-devel@gnu.org \
    --cc=pmr@pajato.com \
    --cc=stephen@xemacs.org \
    /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).