Cygwin, emacs and associate it with a file type on Windows

2

I want to use Emacs as and editor and shell. On Windows 7 I installed cygwin , X11 and emacs. In terminal I added to /etc/profile file these lines:

XWin -multiwindow 2> /dev/null&
export DISPLAY=:0.0
sleep 1
emacs 2> /dev/null&

I created a shortcut that execute this command: C:\rhcygwin64\bin\mintty.exe - Now every time I start that shortcut it starts emacs. No problem. My goal is: associate some file types like .txt , .csv and etc with emacs in order when I start foo.txt it'll open in emacs. When I tried to do it 'Set Associtation' control it accepts only file name and it does not take '-'. Hence when I try to open foo.txt it does not work. I tried to create a shortcut to mintty.exe but it didn't work either. Could someone help me to create association in order to start to mintty.exe but rather mintty.exe - ? Thanks in advance P.S. I tried to associate it with C:\rhcygwin64\cygwin.bat and it started emacs for me but not the file I tried to open, just scratch Well ... I totally stuck because my goal was to use emacs for everything including opening a text file ...

susik

Posted 2015-07-11T03:20:39.577

Reputation: 447

Answers

1

I am taking my question off . I realized that my problem is related to subshell issue ... when I try to invoke first cygwin, then emacs under it and etc. I decided that I will not use much Windows Explorer but rather go directly to the file and open it. This way I don't need file association. Please close my ticket. Thanks

susik

Posted 2015-07-11T03:20:39.577

Reputation: 447