From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Need some help with Rmail/mbox Date: Sun, 21 Sep 2008 23:58:49 -0400 Message-ID: References: <87y71o4xw6.fsf@xemacs.org> <48D33A10.4040102@pajato.com> <871vzfi93y.fsf@xemacs.org> <03b276ff-e070-465e-9486-c02e4725a3e0@broken.deisui.org> <1bd9e4e5-9349-438b-92af-c2a6293491e7@broken.deisui.org> <7706e34f-1555-4a18-b3b7-ce4a9ec5cbf8@broken.deisui.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222055952 30479 80.91.229.12 (22 Sep 2008 03:59:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2008 03:59:12 +0000 (UTC) Cc: pmr@pajato.com, Eli Zaretskii , stephen@xemacs.org, emacs-devel@gnu.org To: Daiki Ueno Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 22 06:00:08 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 1Khcak-0002EM-RR for ged-emacs-devel@m.gmane.org; Mon, 22 Sep 2008 06:00:07 +0200 Original-Received: from localhost ([127.0.0.1]:59544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhcZj-0004yQ-1V for ged-emacs-devel@m.gmane.org; Sun, 21 Sep 2008 23:59:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KhcZf-0004yB-6q for emacs-devel@gnu.org; Sun, 21 Sep 2008 23:58:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KhcZc-0004xz-SQ for emacs-devel@gnu.org; Sun, 21 Sep 2008 23:58:57 -0400 Original-Received: from [199.232.76.173] (port=52654 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhcZc-0004xw-N3 for emacs-devel@gnu.org; Sun, 21 Sep 2008 23:58:56 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:37495) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KhcZW-0001m7-CF; Sun, 21 Sep 2008 23:58:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhYFADu01kjO+KDT/2dsb2JhbACBXbJ5gWaBBA X-IronPort-AV: E=Sophos;i="4.32,443,1217822400"; d="scan'208";a="27211334" Original-Received: from 206-248-160-211.dsl.teksavvy.com (HELO ceviche.home) ([206.248.160.211]) by ironport2-out.teksavvy.com with ESMTP; 21 Sep 2008 23:58:49 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 700A3B40B1; Sun, 21 Sep 2008 23:58:49 -0400 (EDT) In-Reply-To: <7706e34f-1555-4a18-b3b7-ce4a9ec5cbf8@broken.deisui.org> (Daiki Ueno's message of "Mon, 22 Sep 2008 12:41:04 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:104024 Archived-At: >> That would mean Rmail/mbox will need to use another unibyte scratch >> buffer for decoding MIME-encoded text: first qp- or b64-decode it into >> another unibyte buffer, then decode-coding-region from there to the >> (multibyte) display buffer. > Since the output of qp- or b64-decode is unibyte (unlike > decode-coding-region), we can reuse the same source buffer. Actually, better not: the real source buffer is the actual mbox file buffer, i.e. multi-megabyte and that shouldn't be changed unless you really mean to. I.e. you could do it in-place, but unless you want to then save the mbox file back using "content-transfer-encoding: 8bit", you'd have to be careful to undo the base64/qp decoding afterwards and make sure that the buffer cannot be saved in the mean time. Stefan