Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just installed ntemacs and I would like to open .txt files with it by default. The only executable that it will open with is emacs.exe, but this open a command line window as well and it would be good if I can just get it to open without the command line window.

share|improve this question
up vote 2 down vote accepted

You want runemacs.exe rather than emacs.exe.

share|improve this answer
    
Ah I thought it didn't work, so I tried again and it does – Eddy Aug 17 '11 at 11:29

I create the following bat script (usually called emacsc) and associate it with text files and the like

@echo off
if "%~1"=="" goto noargs
"%~dp0\emacs-24.0.50\bin\emacsclientw.exe" -na "%~dp0\emacs-24.0.50\bin\runemacs.exe" %*
goto exit
:noargs
"%~dp0\emacs-24.0.50\bin\emacsclientw.exe" -na "%~dp0\emacs-24.0.50\bin\runemacs.exe" -e *scratch*

:exit

I also add it to the path so that if I run emacsc from the command line.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .