[ESS] End of Line type in R documentation

Howard Li dreamingnow at gmail.com
Wed Oct 1 16:38:46 CEST 2014


I found the cause of the problem. Just like Vitalie said, the help 
buffer gets unix encoding.

To deal with Chinese characters in data, I've added the some code to my 
settings, but I don't know why it was set to utf-8-unix, it should be 
chinese-gbk-dos.

(add-hook 'ess-R-post-run-hook
           (lambda ()
             (set-buffer-process-coding-system
              'utf-8-unix 'utf-8-unix)
             ))

After changing utf-8-unix to chinese-gbk-dos, everything works great.

Many thanks to Vitalie and James!

Best wishes,

Yuheng


> Vitalie Spinu <mailto:spinuvit at gmail.com>
> 2014年10月1日 1:33
> That's a strange problem for a windows machine. Somehow your help buffer
> gets unix encoding. Have no idea why that is happening or what is
> causing it.
>
> Do you have configurations that would affect process output encoding?
>
> Vitalie
>
> >>> "James W. MacDonald" on Tue, 30 Sep 2014 13:09:58 -0400 wrote:
>
> > Hi Yuheng,
> > I am not familiar with Prelude Emacs, but that is what you would see 
> if you
> > took a text file with Windows line endings and then opened it up in 
> Emacs
> > on Linux. Anyway, unless you are really fond of Prelude Emacs, I would
> > recommend switching to Vincent Goulet's Emacs bundle (
> > http://vgoulet.act.ulaval.ca/en/emacs/windows/), which doesn't have that
> > problem.
>
> > Best,
>
> > Jim
>
> > On Tue, Sep 30, 2014 at 7:07 AM, Howard Li <dreamingnow at gmail.com> 
> wrote:
>
> >> Hi,
> >>
> >> I'm using ESS 14.09 with R 3.1.1 on windows 7. I have an annoying 
> problem
> >> with the end of line type in help buffers of R.
> >>
> >> "^M" shows at the end of each line of R documentations (see
> >> http://www.screencast.com/t/XXaPiXnlt7x). It also affects the popup doc
> >> when inputing in functions. It should be a problem with the EOL type
> >> (dos/unix) of the help buffer, but I don't know how to fix it.
> >>
> >> Any suggestions? Thank you in advance.
> >>
> >> Best regards,
> >> Yuheng
> >>
> >> [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> ESS-help at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/ess-help>
> James W. MacDonald <mailto:jmacdon at uw.edu>
> 2014年10月1日 1:09
> Hi Yuheng,
>
> I am not familiar with Prelude Emacs, but that is what you would see 
> if you took a text file with Windows line endings and then opened it 
> up in Emacs on Linux. Anyway, unless you are really fond of Prelude 
> Emacs, I would recommend switching to Vincent Goulet's Emacs bundle 
> (http://vgoulet.act.ulaval.ca/en/emacs/windows/), which doesn't have 
> that problem.
>
> Best,
>
> Jim
>
>
>
>
>
>
> -- 
> James W. MacDonald, M.S.
> Biostatistician
> University of Washington
> Environmental and Occupational Health Sciences
> 4225 Roosevelt Way NE, # 100
> Seattle WA 98105-6099
> Howard Li <mailto:dreamingnow at gmail.com>
> 2014年9月30日 19:07
> Hi,
>
> I'm using ESS 14.09 with R 3.1.1 on windows 7.  I have an annoying 
> problem with the end of line type in help buffers of R.
>
> "^M" shows at the end of each line of R documentations (see 
> http://www.screencast.com/t/XXaPiXnlt7x).  It also affects the popup 
> doc when inputing in functions.  It should be a problem with the EOL 
> type (dos/unix) of the help buffer, but I don't know how to fix it.
>
> Any suggestions?  Thank you in advance.
>
> Best regards,
> Yuheng



More information about the ESS-help mailing list