[ESS] windows-1252 autoload
Hotmail
givehimpraise at hotmail.com
Thu Jan 17 15:35:17 CET 2013
Hi again!
Yes, the characters are unrecognized (or differently displayed) in
the emacs buffer. (This is not the case if I use the RGui editor.)
I press: 'M x R Ret' to get to the mode I'm talking about so it might well
be
the latter.
I meant 'set-buffer-process-coding-system' (as a command after M x)
I tried to do this automatically by inserting:
(setq buffer-process-coding-system 'windows-1252)
in '.emacs' .
I guess you mean that the code you've provided should be added to the
'.emacs' file and not the 'ess-site.el' file.
I would like to load windows-1252 encoding only when
being in "the R-process" and use utf-8 otherwise,
but I guess "the hooks" will help me do that.
Daniel
-----Ursprungligt meddelande-----
From: Vitalie Spinu
Sent: Thursday, January 17, 2013 3:08 PM
To: Hotmail
Cc: ess-help at r-project.org
Subject: Re: [ESS] windows-1252 autoload
Hi Daniel,
You haven't told us what is your problem precisely and how it relates to
ESS.
Are you characters unrecognized in emacs buffer or while sending it to R
sub process? Also are you sure your problem is in R-mode, or it is the
inferior-ess-mode (aka *R* process).
>From your post I infer that it is the latest. I don't see
buffer-process-coding-system on my emacs 24.91.
Have a look at default-process-coding-system. Setting it to
'(windows-1252 . windows-1252) or similar, might help.
Otherwise you can always use hooks to set necessary variables.
(add-hook 'R-mode-hook 'my-R-options)
(defun ess-options()
(column-number-mode t)
(line-number-mode t)
.... your stuff here ...
)
And for *R* buffer:
(add-hook 'ess-R-post-run-hook 'my-R-inf-options)
You got the point,
HTH,
Vitalie
>> "Hotmail" <givehimpraise at hotmail.com>
>> on Thu, 17 Jan 2013 13:29:28 +0100 wrote:
> Hi!
> I have a question regarding encoding using ESS 12.09-2
> and R x64 2.15.2 in a windows 7 environment and with
> Swedish characters like ¥,¤ and ¶.
> My system locale is windows-1252 while the default for my
> emacs installation is utf-8. Using emacs as editor I have to manually
set the
> €˜buffer-process-coding-system€™ while in R-mode. Is there a way to load
this
> setting automatically? I€™ve tried adding this line in €œess-site.el€:
> (setq buffer-process-coding-system €˜windows-1252)
> ... but it doesn€™t work.
> Thankful for your help!
> Daniel
> [[alternative HTML version deleted]]
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
More information about the ESS-help
mailing list