From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Babel, Python and UTF-8 Date: Wed, 01 Dec 2010 18:18:02 -0700 Message-ID: <87fwuhas6t.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=48683 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNxoI-0003jd-Ew for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 20:18:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNxoG-0003p0-Ta for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 20:18:10 -0500 Received: from mail-pv0-f169.google.com ([74.125.83.169]:60510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNxoG-0003od-Kh for emacs-orgmode@gnu.org; Wed, 01 Dec 2010 20:18:08 -0500 Received: by pvc30 with SMTP id 30so3482696pvc.0 for ; Wed, 01 Dec 2010 17:18:07 -0800 (PST) In-Reply-To: (Vincent Beffara's message of "Thu, 02 Dec 2010 00:50:06 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Vincent Beffara Cc: emacs-orgmode@gnu.org Hi Vincent, I would suggest just trying it out first and seeing if you get an error without such a line. Also, you could try adding the line to the beginning of your code block. If there is definitely a problem please reply to this thread and we could easily add a header argument for this case, possibly named ":prefix" which could be used to specify such a code-block-prefix for code evaluation. This header argument could then be set globally or on the file, heading, or code block level. Best -- Eric Vincent Beffara writes: > Hi, > > I am discovering org-mode and org-babel, and wanted to try it out with > python code blocks. My use case would involve text processing, encoded > as UTF-8. Usually a python file has to contain a line to that effect, > saying sth like # -*- coding: utf-8 -*- (without which an error is > raised). > > Is there a way to manage that during org-babel block evaluation ? > > Thanks for your help ! > > /v > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode