Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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