[ESS] ESS + Cygwin Emacs

Vitalie Spinu spinuvit at gmail.com
Sun Nov 3 01:47:12 CET 2013


What is the value of the window-system under cygwin?

It comes down to wrong diagnostic:


     ;; FIXME:  When emacs is started from Cygwin shell in Windows,
     ;;         we have (equal window-system 'x) -and should use "--ess" in *d-r.el
     (defvar ess-microsoft-p (or (equal window-system 'w32)
                                 ;; XEmacs only...
     ;;;                         (equal (console-type) 'pc)
     ;;;                         (equal (console-type) 'mswindows)
                                 (equal window-system 'win32)
                                 (equal window-system 'mswindows))
       "Value is t if the OS is one of Microsoft's, nil otherwise.")

This code doesn't do what it says IMO. It should check sysstem-type and
not window-system.

 >>> Gregory Warnes on Sat, 2 Nov 2013 20:01:15 -0400 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

What does this function do? Can we do without it? I think most of the
compatibility code for windows and xemacs can now be drooped, as we
support emacs 23 and higher. Richard?

It is used in a couple of places only:
     
     /lisp/ess-sp6w-d.el:191:      (cd (w32-short-file-name (directory-file-name default-directory)))
     /lisp/ess-sp6w-d.el:192:      (setenv "S_PROJ" (w32-short-file-name default-directory))
     /lisp/ess-sp6w-d.el:395:      (cd (w32-short-file-name (directory-file-name default-directory)))
     /lisp/ess-sp6w-d.el:396:      (setenv "S_PROJ" (w32-short-file-name default-directory))
     /lisp/ess-r-d.el:541:                (replace-match (w32-short-file-name (cdr version)) t t)))
     /lisp/ess-r-d.el:617:                     (concat (if ess-microsoft-p (w32-short-file-name rver) rver)
     /lisp/ess-custom.el:1204:          (w32-short-file-name (getenv "ProgramFiles(x86)"));; always 32 on 64 bit OS
     /lisp/ess-custom.el:1205:        (w32-short-file-name (getenv "ProgramFiles")))      ;; always 32 on 32 bit OS
     /lisp/ess-custom.el:1213:      (w32-short-file-name (getenv "ProgramW6432"))
     /lisp/ess-compat.el:242:         (not (fboundp 'w32-short-file-name)))
     /lisp/ess-compat.el:244:           (fset 'w32-short-file-name 'win32-short-file-name))
     /lisp/ess-compat.el:246:           (fset 'w32-short-file-name 'mswindows-short-file-name))
     /lisp/ess-compat.el:248:           (warn "None of 'w32-short-file-name, 'win32-short-file-name,
     /lisp/ess-r-gui.el:161:      (cd (w32-short-file-name (directory-file-name default-directory)))
     /lisp/ess-sp4-d.el:155:      (cd (w32-short-file-name (directory-file-name default-directory)))
     /lisp/ess-sp4-d.el:320:      (cd (w32-short-file-name (directory-file-name default-directory)))


   Vitalie



More information about the ESS-help mailing list