I invested a lot of time to get a Windows file association working with cygwin emacsclient-w32. But every "solution" has some dead end that I can't solve. Any help really appreciated.
What I want is a simple file association for .cfg and .txt files to be opened by cygwin emacsclient-w32 (gui-version). The association has to work for local drive pathes and UNC pathes. What command will do the job?
Let's start at the basic. Command
"C:\cygwin64\bin\run.exe" emacsclient-w32 "%1"
Gets me /cygdrive/c/Users/MYUSERNAME/Desktop/C:\Users\MYUSERNAME\Desktop\myfile.cfg
Drag and dropping files works. Doesn't result in the path problem above.
I even tried cygpath. Problem there was that for UNC pathes there was one missing leading slash. When I add it local files were broken. The cygpath try looked like this:
C:\cygwin64\bin\bash.exe -c "emacsclient-w32 $(cygpath -u '%L')"