Integrate GNU-Emacs into Windows

Installing the GNU-Emacs text editor under Windows could not be simpler:

  1. Uncompress all files in a directory
  2. Run the ADDPM.exe program

But there is still a little improvement to add if you want additional comfort. Everywhere I install this program, I want to ensure that I can open any file with GNU-Emacs just by right-clicking on it (with an additional Emacs edit entry in the menu).

I add an entry in the registry database by running a file containing:

  1. REGEDIT4
  2.  
  3. [HKEY_CLASSES_ROOT\*\shell\open]
  4. @="Emacs"
  5.  
  6. [HKEY_CLASSES_ROOT\*\shell\open\command]
  7. @="\\bin\\emacs-20.7\\bin\\runemacs.exe \"%1\""

The file is ready to use: emacs.reg (but I guess that you would prefer to modify the installation path to adapt to your own GNU-Emacs installation directory – for me it was in \bin\emacs-20.7).