1

I currently have Cygwin Emacs installed on my Windows machine. I am wondering:

Is there a way to open files from Windows Explorer in Emacs (which would be running in terminal mode in Cygwin).

The default is always notepad or all the GUI applications on Windows and I would like to be able to open Cygwin and Emacs and then open the file directly.

On some GUI type editors you can just drag and drop a file into the editor. This obviously doesn't work with Cygwin Emacs.

It seems like there is no .exe file for Cygwin Emacs which means I can't point anything to the binary and indicate "open file with"...

Startec
  • 1,354
  • 1
  • 13
  • 30
  • There is an exe. If I run `ls -la $(which emacs)`, I get: `/usr/local/bin/emacs -> emacs-25.2.50.exe`. I can also drag and drop files from explorer to Emacs. Strange that you can't, did you compile it yourself? Are you using the Windows GUI or X? – nanny Sep 30 '16 at 20:51
  • I didn't compile it myself, I installed it from the Cygwin installer. It is also not a GUI version of emacs as it runs within Cygwin. – Startec Oct 02 '16 at 04:53
  • 1
    You can install the package `emacs-w32` from the Cygwin installer. It installs `/usr/bin/emacs-w32.exe`. That emacs is not compiled with the X GUI but with the Windows GUI. You can use drag and drop with this version. Furthermore, you can associate `c:\cygwin64\bin\emacsclient-w32.exe` with text files. (Adapt `cygwin64` to your setup.) That allows you to open text files with emacs from the windows explorer. Make sure you call `server-start` in the init files of your permanent emacs session. Installing X11 emacs and W32 emacs together did not cause any problems for me. – Tobias Nov 01 '16 at 09:13
  • Hi Startec, This question is bumped to the Emacs SE homepage periodically. How can we stop this? Did you solve your problem? Did you follow my hint to install 'emacs-w32.exe` and register `emacsclient-w32.exe` as application for text files? If that is the case I should post it as solution and you should accept it. – Tobias Feb 24 '18 at 12:43
  • @Tobias go ahead and do that. I "solved" my problem by not using Windows. – Startec Feb 27 '18 at 00:39

0 Answers0