From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Need some help with Rmail/mbox Date: Fri, 19 Sep 2008 00:30:57 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1221798825 18865 80.91.229.12 (19 Sep 2008 04:33:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2008 04:33:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: pmr@pajato.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 19 06:34:42 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 1KgXhT-0000RU-Jk for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2008 06:34:36 +0200 Original-Received: from localhost ([127.0.0.1]:53463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgXgR-0001IG-Rc for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2008 00:33:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgXfv-00013u-3P for emacs-devel@gnu.org; Fri, 19 Sep 2008 00:32:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgXft-00013D-CW for emacs-devel@gnu.org; Fri, 19 Sep 2008 00:32:58 -0400 Original-Received: from [199.232.76.173] (port=50847 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgXft-000135-80 for emacs-devel@gnu.org; Fri, 19 Sep 2008 00:32:57 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:33776) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KgXfs-00061w-KU for emacs-devel@gnu.org; Fri, 19 Sep 2008 00:32:57 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KgXdx-0005SU-7L; Fri, 19 Sep 2008 00:30:57 -0400 In-reply-to: (message from Paul Michael Reilly on Thu, 18 Sep 2008 12:02:19 -0400) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:103965 Archived-At: As near as I can tell the task is to decode the message body in two steps: first to decode according to the character encoding (e.g. quoted-printable or base64) and then to decode that result to some coding system. That is correct. Something along the lines of: (let (body) (setq body (apply qp or base64 to body of message) You call `mail-unquote-printable-region' or `base64-decode-region'. They operate on the buffer. (decode-coding-string body (detect-coding-string body t)) Use `decode-coding-region'. It operates on the buffer. When operating on large amount of text, don't do it in strings.