Re: [O] [babel] Can't write accented characters in R graphics

2013-12-11 Thread Sebastien Vauban
Christian Moe wrote:
 Sebastien Vauban writes:

 Fixed with:

 --8---cut here---start-8---
 ;; accented characters on graphics
 (setq org-babel-R-command
   (concat org-babel-R-command  --encoding=UTF-8)))
 --8---cut here---end---8---

 That looked promising, but when I tried it, I got the following
 *Org-Babel Error Output*, which shows Babel choking on the first
 non-ascii character at the start of the xlab string:

 Error: unexpected '/' in:
 plot(1:10, 1:10, xlab=dev.off()
 }}(),transfer.file=/var/folders/JV/JVNxBfnMGkWC9Aw0BZa8Kk+++TI/-Tmp-/
 Execution halted

 Still baffled,

Maybe try with variations of the above encoding, such as latin1 or so.

Pay attention:

- Different installations have different expectations (the Windows R binary
  does not behave the same as the Cygwin R for the default encoding).

- The encoding name is not spelled the same between the Windows R binary and
  the Cygwin R one: UTF-8 passes both tests, utf8 only for the Windows
  binary...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [babel] Can't write accented characters in R graphics

2013-12-10 Thread Sebastien Vauban
Sebastien Vauban wrote:
 John Hendy wrote:
 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!

 The 1'42 demo on http://screencast.com/t/A9q6CQlLY6 clearly shows that:

 - It (now [1]) works from the R terminal

 - It works from the Org edit buffer (via C-c '), when sending the commands to
   the iESS process

 - It does not work from the Org file itself...

Fixed with:

--8---cut here---start-8---
;; accented characters on graphics
(setq org-babel-R-command
  (concat org-babel-R-command  --encoding=UTF-8)))
--8---cut here---end---8---

 Environment:
 - Microsoft Windows 8

 [1] I've added the following code in my .emacs to make it work:

 #+begin_src emacs-lisp
 (setq process-coding-system-alist
   '((R.* . iso-latin-1)))
 #+end_src

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [babel] Can't write accented characters in R graphics

2013-12-10 Thread Christian Moe

Sebastien Vauban writes:

 Fixed with:

 --8---cut here---start-8---
 ;; accented characters on graphics
 (setq org-babel-R-command
   (concat org-babel-R-command  --encoding=UTF-8)))
 --8---cut here---end---8---

That looked promising, but when I tried it, I got the following
*Org-Babel Error Output*, which shows Babel choking on the first
non-ascii character at the start of the xlab string:

Error: unexpected '/' in:
plot(1:10, 1:10, xlab=dev.off()
}}(),transfer.file=/var/folders/JV/JVNxBfnMGkWC9Aw0BZa8Kk+++TI/-Tmp-/
Execution halted

Still baffled,

Christian