From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Michael Reilly Newsgroups: gmane.emacs.devel Subject: Need some help with Rmail/mbox Date: Thu, 18 Sep 2008 12:02:19 -0400 Message-ID: Reply-To: pmr@pajato.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1221754332 19583 80.91.229.12 (18 Sep 2008 16:12:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2008 16:12:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 18 18:13:07 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 1KgM6M-0001Gw-1u for ged-emacs-devel@m.gmane.org; Thu, 18 Sep 2008 18:11:30 +0200 Original-Received: from localhost ([127.0.0.1]:53166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgM5K-0002eZ-Oa for ged-emacs-devel@m.gmane.org; Thu, 18 Sep 2008 12:10:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgLxb-0007q5-UV for emacs-devel@gnu.org; Thu, 18 Sep 2008 12:02:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgLxZ-0007ph-KN for emacs-devel@gnu.org; Thu, 18 Sep 2008 12:02:27 -0400 Original-Received: from [199.232.76.173] (port=55341 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgLxZ-0007pd-Ej for emacs-devel@gnu.org; Thu, 18 Sep 2008 12:02:25 -0400 Original-Received: from mail.pajato.com ([68.191.253.210]:57924 helo=copa.pajato.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KgLxZ-0005Z8-2I for emacs-devel@gnu.org; Thu, 18 Sep 2008 12:02:25 -0400 Original-Received: from lilly (copa.pajato.com [68.191.253.210]) by copa.pajato.com (8.14.1/8.13.8) with ESMTP id m8IG2JoQ015978 for ; Thu, 18 Sep 2008 12:02:19 -0400 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (copa.pajato.com [68.191.253.210]); Thu, 18 Sep 2008 12:02:19 -0400 (EDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:103942 Archived-At: The basic problem I need to solve now is how to map the values of the content-type and content-transfer-encoding headers (either of which could legally be absent) to an Emacs coding system. I am slogging through this task and if anyone has already done it and has either a short "how-to" or even better some code, that would be much appreciated. As Eli helpfully pointed out, rmail-convert-to-babyl-format provides some help. 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. Something along the lines of: (let (body) (setq body (apply qp or base64 to body of message) (decode-coding-string body (detect-coding-string body t)) Am I even in the ballpark? -pmr