REM Myles REM This script launches Cygwin's emacs with Windows based filenames. REM It exists so that files can be dropped on this script and correctly opened REM in Cygwin's Emacs. SET PATH=c:\cygwin\bin;c:\cygwin\usr\X11R6\bin;%PATH% REM Perform the path conversion to cygwin format and save the output. FOR /F "tokens=*" %%a IN ('C:\cygwin\bin\cygpath -a %1 %2 %3 %4 %5 %6 %7 %8 %9') DO ( IF %%a == "" GOTO noArgumentsSpecified set convertedName=%%a GOTO ArgumentsSpecified ) :noArgumentsSpecified C:\cygwin\usr\X11R6\bin\run.exe emacs -display 127.0.0.1:0.0 -fn 10x20 GOTO end :ArgumentsSpecified C:\cygwin\usr\X11R6\bin\run.exe emacs -display 127.0.0.1:0.0 -fn 10x20 "%convertedName%" GOTO end :end