Skip to content

Instantly share code, notes, and snippets.

@Shade30
Created February 17, 2015 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Shade30/b25b849e846f00f2dd45 to your computer and use it in GitHub Desktop.
Save Shade30/b25b849e846f00f2dd45 to your computer and use it in GitHub Desktop.
Cygwin emacs-w32 wrapper. Allows to run emacs with arguments directly from windows.
@echo off
Setlocal EnableDelayedExpansion
set CYGDIR=D:\cygwin64
set CYGBINDIR=%CYGDIR%\bin
set PATH=%PATH%;%CYGBINDIR%;%CYGDIR%\usr\local\bin;%CYGDIR%\usr\bin
cd /d %CYGDIR%\home\%USERNAME%
if [%1]==[] goto BLANK
set VAR=
for /f %%i in ('%CYGBINDIR%\cygpath.exe %*') do set VAR=!VAR! %%i
echo %VAR%
start %CYGBINDIR%\mintty.exe -i /bin/emacs.ico -w hide /bin/emacs %VAR%
goto DONE
:BLANK
start %CYGBINDIR%\mintty.exe -i /bin/emacs.ico -w hide /bin/emacs
goto DONE
:DONE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment