Re: [O] [OT] Encoding error when calling a ruby script from Emacs using shell-command

2012-09-01 Thread Achim Gratz
Marcelo de Moraes Serpa writes: So, I did this: (defun test ()   (setenv LANG en_US.UTF-8)   (setenv LC_ALL en_US.UTF-8)   (setenv LC_CTYPE en_US.UTF-8)         (shell-command  /Users/myself/.rvm/bin/rvm ruby-1.9.3-p194 do /usr/bin/rubyscript)         ) This is nonsense, may I suggest

Re: [O] [OT] Encoding error when calling a ruby script from Emacs using shell-command

2012-09-01 Thread Nick Dokos
Achim Gratz strom...@nexgo.de wrote: Marcelo de Moraes Serpa writes: So, I did this: (defun test () (setenv LANG en_US.UTF-8) (setenv LC_ALL en_US.UTF-8) (setenv LC_CTYPE en_US.UTF-8) (shell-command /Users/myself/.rvm/bin/rvm ruby-1.9.3-p194 do /usr/bin/rubyscript)) This

Re: [O] [OT] Encoding error when calling a ruby script from Emacs using shell-command

2012-09-01 Thread Marcelo de Moraes Serpa
This is nonsense, may I suggest you read locale (1p)? If you set LC_ALL, this overrides the other two settings no matter what they are set to (and you may prevent some scripts trying to set LC_COLLATE or something like that from functioning correctly). Unless you really need such a big

Re: [O] [OT] Encoding error when calling a ruby script from Emacs using shell-command

2012-08-31 Thread Nick Dokos
Marcelo de Moraes Serpa celose...@gmail.com wrote: Hey list, I've tried posting on help-gnu-emacs mailing list first, but not luck so far, so I thought I'd try here, as I know there are many savvy emacs users around. I have a small Ruby CLI program that I want to call from emacs. This

Re: [O] [OT] Encoding error when calling a ruby script from Emacs using shell-command

2012-08-31 Thread Marcelo de Moraes Serpa
Alright, I solved it. The problem is that emacs' shell-command doesn't use the same environment, so it wasn't picking up the value of those three vars: ✗ export | grep UTF LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 So, I did this: (defun test () (setenv LANG

[O] [OT] Encoding error when calling a ruby script from Emacs using shell-command

2012-08-30 Thread Marcelo de Moraes Serpa
Hey list, I've tried posting on help-gnu-emacs mailing list first, but not luck so far, so I thought I'd try here, as I know there are many savvy emacs users around. I have a small Ruby CLI program that I want to call from emacs. This script simply opens an emacs orgmode file from a specific