[ESS] ESS + Cygwin Emacs

Richard M. Heiberger rmh at temple.edu
Mon Nov 4 19:55:38 CET 2013


Greg,

I don't understand your issue.  I have been using the cygwin shell
under GNU emacs for years.
There are at least two ways to do it.

1. Using cygwin directly with M-x shell
The incantation is to put this in your .emacs or your site-start.el


;;; shell on win95 to bash
;;; shell on windows to bash
(make-local-variable 'cygwin)
(make-local-variable 'cygwin-bin)
(make-local-variable 'cygwin-bash)
(setq cygwin (concat "c:/" "cygwin"))
(setq cygwin-bin (concat cygwin "/bin"))
(setq cygwin-bash (concat cygwin-bin "/bash.exe"))
(setenv "COMSPEC" cygwin-bash)
(setenv "SHELL" cygwin-bash)
(setq shell-file-name cygwin-bash)
(setenv "CVS_RSH" (concat cygwin-bin "/ssh.exe"))
(setenv "CYGWIN" "nodosfilewarning")



2. Using Rtools
Rtools includes much of cygwin.  Therefore from the MSDOS prompt, with
c:\Rtools\bin in the PATH

sh -i


3. You can probably skip cygwin and use something similar to my 1
(above) and make M-x shell start
the Rtools sh.  I haven't tried that.

Rich


On Sat, Nov 2, 2013 at 8:01 PM, Gregory Warnes <greg at warnes.net> wrote:
> Hi All,
>
> I'm trying to get ESS working under Cygwin with Cygwin Emacs (e.g. so I can
> use bash in the shell window and filename completion will work properly).
>
> When I start emacs, I'm getting the message:
>
>      Warning (emacs): None of 'w32-short-file-name, 'win32-short-file-name,
>      or 'mswindows-short-file-name are defined!
>      You will have to manually set   ess-program-files (in ess-custom.el) to
>      the correct "8.3"-style directory name.
>      Warning (initialization): An error occurred while loading
>      `/cygdrive/c/Users/admin/.emacs.d/init.el':
>
>      Symbol's function definition is void: w32-short-file-name
>
> This seems odd because I'm running under cygwin, so ESS shouldn't need the
> name-mangling.
>
> I've tried the suggested remedy of defining
>       (setq ess-program-files "c:/PROGRA~2")
>       (setq ess-program-files-64 "c:/PROGRA~1")
> as well as defining the explicit Rterm program path
>       (setq
> in .emacs.d/init.el, but this doesn't help.
>
> Suggestions?
>
> -Greg
>
> --
> "Whereas true religion and good morals are the only solid foundations of
> public liberty and happiness . . . it is hereby earnestly recommended to
> the several States to take the most effectual measures for the
> encouragement thereof." Continental Congress, 1778
>
>         [[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