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.

link|improve this question

48% accept rate
feedback

2 Answers

up vote 2 down vote accepted

You want runemacs.exe rather than emacs.exe.

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

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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