[ESS-bugs] ess-mode 5.3.5; M-x R messes up RET in new shells

Tim Hesterberg timh at insightful.com
Wed Dec 26 22:51:08 CET 2007


Thanks for trying.  As you probably saw, I sent a note to ess-help

I think it is a combination of:
(1) M-x R causing subsequent new shells to use Windows eol sequences
  carriage return-line feed
(2) bash not accepting windows eol sequences.

The problem still occurs if I remove these three lines from site-start.el:
  (setenv "SHELL" (concat where "cygwin/bin/bash.exe"))
  (setenv "COMSPEC" (concat where "cygwin/bin/bash.exe"))
  (setq shell-file-name (concat where "cygwin/bin/bash.exe"))
and restart emacs with no-init-file; shells started before M-x R work,
and those started afterward do not.  In this case
'M-x getenv SHELL' gives
  d:/emacs/emacs-22.1/bin/cmdproxy.exe
'M-x getenv COMSPEC' and shell-file-name still both give
  d:/cygwin/bin/bash.exe
If I then do
  (setenv "SHELL" "c:/windows/system32/cmd.exe")
  (setenv "COMSPEC" "c:/windows/system32/cmd.exe")
  (setq shell-file-name "c:/windows/system32/cmd.exe")
then M-x shell starts a DOS cmd shell, which works (to the extent
that one can say that a DOS cmd shell works).

>Dear Tim, 
>I just took a quick look at this.  I do not regulary use windows, 
I wish I didn't :-)
>so downloaded R 2.6.1 and the version of Emacs provided by Vicent Goulet
>that comes preinstalled with  ESS (linked to from ess.r-project.org)
>
>In short, I can't reproduce the bug.  I don't have splus on this
>machine so what I did was:
>
>emacs
>
>M-x shell
>
>(checked shell worked okay by "dir"; all fine.)
>(kill shell buffer)
>
>M-x R
>(R 2.6.1 starts fine; getwd() works fine.)
>
>M-x shell
>New shell appears, and "dir" works.
>
>Like Martin has suggested, might this be something to do with bash?
>can you try it without bash working in M-x shell?
>best wishes,
>
>Stephen
>
> > >>>>> "TH" == Tim Hesterberg <timh at insightful.com>
> > >>>>>     on Thu, 20 Dec 2007 15:56:06 -0800 writes:
> > 
> >     TH> I can create a new shell using M-x shell, and it works fine.
> >     TH> If I run
> >     TH> M-x splus80
> >     TH> I can still create a new shell and it works fine.
> >     TH> But, if I now run 
> >     TH> M-x R
> >     TH> then when I start a new shell I can't use it; it seems that at "\r"
> >     TH> is appended to any command that I give:
> > 
> >     TH> $ pwd
> >     TH> bash: $'pwd\r': command not found
> > 
> >     TH> I have reproduced this an an emacs started with -no-init-file
> > 
> > 
> >     TH> [ess-site.el]: ess-customize-alist=nil 
> >     TH> [ess-site.el _2_]: ess-customize-alist=nil 
> >     TH> (Sqpe): ess-sqpe-versions-create making M-x defun splus80 for c:/progra~1/Insightful/splus80 
> >     TH> (R): ess-rterm-versions-create making M-x defuns for c:/Progra~1/R/R-2.5.0/bin/Rterm.exe c:/Progra~1/R/R-2.6.1/bin/Rterm.exe
> >     TH> (R): ess-dialect=nil, buf=*scratch*, start-arg=nil
> >     TH> current-prefix-arg=nil
> >     TH> (inferior-ess 0): ess-start-args=--ess   
> >     TH> ess-setq-vars-default 0: ess-language=Initial, -dialect=nil, buf=nil, comint..echoes=nil, comint..sender=comint-simple-send
> >     TH> ess-setq-vars-default 1: ess-language=S, -dialect=R, buf=nil, comint..echoes=nil, comint..sender=comint-simple-send
> >     TH> (inf-ess 1): lang=S, dialect=R, tmp-dialect=R, buf=*scratch*
> >     TH> (inf-ess 1.1): procname=R temp-dialect=R, buf-name=*R* 
> > 
> > 
> >     TH> Emacs  : GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
> >     TH> of 2007-06-02 on RELEASE
> >     TH> Package: ess-mode 5.3.5
> > 
> >     TH> current state:
> >     TH> ==============
> >     TH> (setq
> >     TH> ess-language "S"
> >     TH> ess-dialect "R"
> >     TH> ess-ask-for-ess-directory t
> >     TH> ess-ask-about-transfile nil
> >     TH> ess-directory nil
> >     TH> ess-keep-dump-files "always"
> >     TH> ess-source-directory "C:\\DOCUME~1\\timh\\LOCALS~1\\Temp"
> >     TH> )
> > 
> >     TH> _______________________________________________
> >     TH> ESS-bugs ESS-bugs at stat.math.ethz.ch
> >     TH> https://stat.ethz.ch/mailman/listinfo/ess-bugs
> > 
> >     TH> _______________________________________________
> >     TH> ESS-core list: https://stat.ethz.ch/mailman/listinfo/ess-core
> > 
> > _______________________________________________
> > ESS-bugs ESS-bugs at stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/ess-bugs
> > 
> > _______________________________________________
> > ESS-core list: https://stat.ethz.ch/mailman/listinfo/ess-core



More information about the ESS-bugs mailing list