[ESS] windows-1252 autoload

Vitalie Spinu spinuvit at gmail.com
Thu Jan 17 15:40:04 CET 2013


  >> "Hotmail" <givehimpraise at hotmail.com>
  >> on Thu, 17 Jan 2013 15:35:17 +0100 wrote:

  > 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.

Ok,  I see,  it is inferior-ess-mode, aka *R* buffer.

  > I guess you mean that the code you've provided should be added to the
  > '.emacs' file and not the 'ess-site.el' file.

Yes, 


  > 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.

Yes, something along this lines (I haven't tried):

(add-hook 'ess-R-post-run-hook
          (lambda () (set-buffer-process-coding-system
                      'windows-1252 'windows-1252)))

    Vitalie



More information about the ESS-help mailing list