Notepad++ automatically adds a shell shortcut so that when you’re in Windows Explorer, you can right-click on a file and select ‘edit with Notepad++’. How can I do the same with emacs? I am using GNU Emacs 22.3 for Windows.
Notepad++ automatically adds a shell shortcut so that when you’re in Windows Explorer, you
Share
Here’s what I have – similar to some other answer. Create a new text file somewhere called emacs-conextmenu.reg (or anything-you-want.reg) and paste the following in:
Change the path to your emacs installation path; remember to escape the ‘\’ (whenever you have \, change that to \\).
Now all you need to do is double-click this *.reg file in the explorer and you shall have a context menu entry for emacs for any file and any directory (if you are a dired fan!).
Note that for this to work, emacs has to be started and emacs-server also has to be started (M-x server-start). I would suggest starting emacs with Windows and put (server-start) in your .emacs file.
As a bonus, the following snippet for autohotkey (http://www.autohotkey.com/) will start the file selected in emacs when you press ctrl-shift-enter in windows explorer. This might be more handy if you edit lots of files in emacs but does not necessarily want to navigate to the file in emacs itself.