Hi Vincent and Eric, Vincent Beffara wrote: >> 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 : > > #+begin_src python > # -*- coding: utf-8 -*- > s = "é" > #+end_src
I'm not sure to understand your problem. In fact, the problem is not about "inserting a prefix to the block", it's about the coding system itself, I guess. Your "é" in your Org buffer, how is it encoded? Is your Org buffer an UTF-8 one, or a Latin-1? In the first case, I don't see why: - it would fail - it would even need to be specified In the second, you want an ISO Latin 1 block of text to be tangled or executed as UTF-8. Is this right? > 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. Isn't such a prefix already available through the "shebang" option: can't it be multiline? Anyway, I don't think it's the problem here... Best regards, Seb -- Sébastien Vauban _______________________________________________ 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