如何在 Windows 上「使用」NTemacs 開啟?

如何在 Windows 上「使用」NTemacs 開啟?

我剛剛安裝ntemacs,我想.txt預設使用它來開啟檔案。它將打開的唯一可執行檔是emacs.exe,但這也會打開一個命令列窗口,如果我可以在沒有命令列窗口的情況下打開它,那就太好了。

答案1

你想要runemacs.exe而不是emacs.exe

答案2

我創建以下 bat 腳本(通常稱為emacsc)並將其與文字檔案等相關聯

@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

我還將它添加到路徑中,以便emacsc從命令行運行。

相關內容