How do I achieve that files opened from Explorer with emacs are always opened in a new frame?

I tried making a link that has the target <path/to/emacs/bin>/emacsclientw.exe --create-frame. When I run that from cmd with a file argument it always opens a new frame as I expect it too.

However, when opening a file from the file explorer, either by the 'open-with' dialog on the link or by associating it with the link , emacs does create a new frame only if none exists at the moment. If a frame is already open every file I open after that gets opened in this frame, displaying the buffer of this file instead of the file buffer that was shown before.

My expected behavior of --create-frame would be that new frames are opened for each file when called from file explorer. How can I achieve that?


1 Answer 1


The comment of demo contains the answer. According to the article by @shynur, to change the arguments of emacs when opening a file with it, one has to change the registry key in HKEY_CLASSES_ROOT\Applications\emacsclientw.exe\shell\open\command as described in the Windows documentation Verbs and File Associations. So to add the --create-frame argument to the open action one needs to:

  1. Open any file with emacsclientw.exe to create the registry entry
  2. Add --create-frame to the HKEY_CLASSES_ROOT\Applications\emacsclientw.exe\shell\open\command default key, changing it from

"C:\Users\evilsetg\Desktop\emacs\bin\emacsclientw.exe" "%1"


"C:\Users\evilsetg\Desktop\emacs\bin\emacsclientw.exe" "--create-frame" "%1"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.