From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Can't write accents in R graphics Date: Thu, 5 Dec 2013 13:15:24 -0600 Message-ID: References: <86vbz3si21.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04479f93010dbe04ecce5a13 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoeOZ-0004I1-SW for emacs-orgmode@gnu.org; Thu, 05 Dec 2013 14:15:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoeOU-0003q5-Il for emacs-orgmode@gnu.org; Thu, 05 Dec 2013 14:15:31 -0500 Received: from mail-oa0-x22f.google.com ([2607:f8b0:4003:c02::22f]:55547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoeOU-0003pp-Cq for emacs-orgmode@gnu.org; Thu, 05 Dec 2013 14:15:26 -0500 Received: by mail-oa0-f47.google.com with SMTP id k1so18805223oag.20 for ; Thu, 05 Dec 2013 11:15:24 -0800 (PST) In-Reply-To: <86vbz3si21.fsf@somewhere.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: emacs-orgmode --f46d04479f93010dbe04ecce5a13 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Dec 5, 2013 4:35 AM, "Sebastien Vauban" wrote: > > #+TITLE: ECM Process Coding System > #+PROPERTY: eval yes > #+PROPERTY: exports both > #+PROPERTY: cache no > > * Problem > > I can't write accents in graphic titles (nor legends). > > * Settings > > After Googling (a lot), I always come back to the same set of solutions= : > > - Adding the following in my ~.emacs~ file: > > #+begin_src emacs-lisp > (setq process-coding-system-alist '(("R.*" . utf-8-unix))) > #+end_src > > #+begin_src emacs-lisp > (add-hook 'ess-R-post-run-hook > (lambda () (set-buffer-process-coding-system > 'utf-8-unix 'utf-8-unix))) > #+end_src > > - Setting the process coding system in the =3D*R*=3D buffer: > > #+begin_src emacs-lisp > M-x set-buffer-process-coding-system RET utf-8-unix RET utf-8-unix RE= T > #+end_src > > None of those does work for me, from an Org file... > > * Example > > ** Text > > Print a string does always work, in the Org buffer, and in the export. > > #+begin_src R > print("=C3=89l=C3=A8ve") > #+end_src > > #+results: > : =C3=89l=C3=A8ve > > ** Graph > > But adding a title with accents never does: > > #+header: :file ecm-R-coding-system.png > #+begin_src R :results graphics :width 240 :height 240 > x <- 0:12 > plot(sin(x/2)) > title("=C3=89l=C3=A8ve") > #+end_src > > #+results: > [[file:ecm-R-coding-system.png]] > > * Observations > > You can see a demo of (some of) the tests I made on > http://screencast.com/t/7Nz87zuqiz. > > Maybe the problem is not related neither to Org, nor ESS, as I see that > =3DsessionInfo()=3D outputs French stuff. > > Maybe some of the R users here could share their experience with the "coding > system" configuration? > Can you do it straight from R? Might be a better place to start? If not, I'd look into that first to avoid googling org and ESS stuff in vain! John > Best regards, > Seb > > -- > Sebastien Vauban > > --f46d04479f93010dbe04ecce5a13 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Dec 5, 2013 4:35 AM, "Sebastien Vauban" <sva-news@mygooglest.com> wrote:
>
> #+TITLE: =C2=A0 =C2=A0 ECM Process Coding System
> #+PROPERTY: =C2=A0eval yes
> #+PROPERTY: =C2=A0exports both
> #+PROPERTY: =C2=A0cache no
>
> * Problem
>
> =C2=A0 I can't write accents in graphic titles (nor legends).
>
> * Settings
>
> =C2=A0 After Googling (a lot), I always come back to the same set of s= olutions:
>
> =C2=A0 - Adding the following in my ~.emacs~ file:
>
> =C2=A0 =C2=A0 #+begin_src emacs-lisp
> =C2=A0 =C2=A0 (setq process-coding-system-alist '(("R.*"= . utf-8-unix)))
> =C2=A0 =C2=A0 #+end_src
>
> =C2=A0 =C2=A0 #+begin_src emacs-lisp
> =C2=A0 =C2=A0 (add-hook 'ess-R-post-run-hook
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (lambda () (set-buffe= r-process-coding-system
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 'utf-8-unix 'utf-8-unix)))
> =C2=A0 =C2=A0 #+end_src
>
> =C2=A0 - Setting the process coding system in the =3D*R*=3D buffer: >
> =C2=A0 =C2=A0 #+begin_src emacs-lisp
> =C2=A0 =C2=A0 M-x set-buffer-process-coding-system RET utf-8-unix RET = utf-8-unix RET
> =C2=A0 =C2=A0 #+end_src
>
> =C2=A0 None of those does work for me, from an Org file...
>
> * Example
>
> ** Text
>
> =C2=A0 =C2=A0Print a string does always work, in the Org buffer, and i= n the export.
>
> =C2=A0 =C2=A0#+begin_src R
> =C2=A0 =C2=A0print("=C3=89l=C3=A8ve")
> =C2=A0 =C2=A0#+end_src
>
> =C2=A0 =C2=A0#+results:
> =C2=A0 =C2=A0: =C3=89l=C3=A8ve
>
> ** Graph
>
> =C2=A0 =C2=A0But adding a title with accents never does:
>
> =C2=A0 =C2=A0#+header: :file ecm-R-coding-system.png
> =C2=A0 =C2=A0#+begin_src R :results graphics :width 240 :height 240 > =C2=A0 =C2=A0x <- 0:12
> =C2=A0 =C2=A0plot(sin(x/2))
> =C2=A0 =C2=A0title("=C3=89l=C3=A8ve")
> =C2=A0 =C2=A0#+end_src
>
> =C2=A0 =C2=A0#+results:
> =C2=A0 =C2=A0[[file:ecm-R-coding-system.png]]
>
> * Observations
>
> =C2=A0 You can see a demo of (some of) the tests I made on
> =C2=A0 http://screencas= t.com/t/7Nz87zuqiz.
>
> =C2=A0 Maybe the problem is not related neither to Org, nor ESS, as I = see that
> =C2=A0 =3DsessionInfo()=3D outputs French stuff.
>
> Maybe some of the R users here could share their experience with the &= quot;coding
> system" configuration?
>

Can you do it straight from R? Might be a better place to st= art? If not, I'd look into that first to avoid googling org and ESS stu= ff in vain!

John

> Best regards,
> =C2=A0 Seb
>
> --
> Sebastien Vauban
>
>

--f46d04479f93010dbe04ecce5a13--