emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Babel, Python and UTF-8


From: Vincent Beffara
Subject: [Orgmode] Re: Babel, Python and UTF-8
Date: Thu, 02 Dec 2010 02:36:21 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin)

Hi,

> I would suggest just trying it out first and seeing if you get an error
> without such a line.

Well, I do, that's why I'm asking ;-)

> Also, you could try adding the line to the beginning of your code
> block.

I tried like this :

--8<---------------cut here---------------start------------->8---
#+begin_src python
# -*- coding: utf-8 -*-
s = "é"
#+end_src
--8<---------------cut here---------------end--------------->8---

The error message tells me that the error happens on line 4, hence the
coding line ends up on line 3, and python only takes it into account if
it is one of the first two ... so it almost works, but it doesn't.

> 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.

That would be fantastic ! (And possibly useful in other cases as well
...)

Thanks,

        /vincent




reply via email to

[Prev in Thread] Current Thread [Next in Thread]