From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.devel Subject: Re: Need some help with Rmail/mbox Date: Sun, 21 Sep 2008 09:57:49 +0900 Message-ID: <496cc373-d7ad-4b06-9f88-1ab2d2ef3e80@broken.deisui.org> References: <87y71o4xw6.fsf@xemacs.org> <48D33A10.4040102@pajato.com> <871vzfi93y.fsf@xemacs.org> <03b276ff-e070-465e-9486-c02e4725a3e0@broken.deisui.org> <87skrvgc8f.fsf@xemacs.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221958692 10514 80.91.229.12 (21 Sep 2008 00:58:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Sep 2008 00:58:12 +0000 (UTC) Cc: Paul Michael Reilly , emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 21 02:59:09 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KhDI2-0001qh-Vy for ged-emacs-devel@m.gmane.org; Sun, 21 Sep 2008 02:59:07 +0200 Original-Received: from localhost ([127.0.0.1]:41961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhDH1-0003bT-EE for ged-emacs-devel@m.gmane.org; Sat, 20 Sep 2008 20:58:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KhDGu-0003ag-Td for emacs-devel@gnu.org; Sat, 20 Sep 2008 20:57:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KhDGt-0003aQ-8X for emacs-devel@gnu.org; Sat, 20 Sep 2008 20:57:56 -0400 Original-Received: from [199.232.76.173] (port=60450 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhDGt-0003aN-2c for emacs-devel@gnu.org; Sat, 20 Sep 2008 20:57:55 -0400 Original-Received: from ti-out-0910.google.com ([209.85.142.186]:8480) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KhDGs-0002Dn-7o for emacs-devel@gnu.org; Sat, 20 Sep 2008 20:57:54 -0400 Original-Received: by ti-out-0910.google.com with SMTP id u5so556842tia.10 for ; Sat, 20 Sep 2008 17:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type :sender; bh=RvUv1z+7qNJ0x4k4ZjSYED4WLTR3C4OqMfqQcXZrdJg=; b=s1iyO1Cet+N0MiHO72issjHKP4hqMasZA4ccCATtDoXK26d85emHi4zIeoS0CHlx3Y 0sxCC3YjTK1tWHE96OEuO0RFRieEIJo5VoT806WewuSTBVqCPz7+QlTLrnlbPxOzoKtv 52ONnZ1Qona87p26aToh1nd6QXvdtE0eFXfo0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:sender; b=jQmdOhOSDwTHnxMrL4nK5m7vT+fJQNNbhBgaxEYFtOD3bnI6QoPRIAkgFKPEt+hVGh nhv4FT8E9uv5qy2QUVKMR8m43iv5J3lIHgdoCM6IK5OoUw1UdSBZ4BUVIe0AeLAIw/qL kRZLgjPaazaqea5y+xYK5nuUbYgFzKYY1l/kM= Original-Received: by 10.110.109.12 with SMTP id h12mr2876186tic.34.1221958672482; Sat, 20 Sep 2008 17:57:52 -0700 (PDT) Original-Received: from chilled ( [221.255.76.222]) by mx.google.com with ESMTPS id d1sm7741990tid.11.2008.09.20.17.57.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Sep 2008 17:57:51 -0700 (PDT) In-Reply-To: <87skrvgc8f.fsf@xemacs.org> (Stephen J. Turnbull's message of "Sat, 20 Sep 2008 22:48:00 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104005 Archived-At: >>>>> In <87skrvgc8f.fsf@xemacs.org> >>>>> "Stephen J. Turnbull" 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