What happens when you combine the most advanced, self-documenting, customizable, extensible real-time display editor, Emacs, with nethack, the most elaborate role-playing environment ever invented?
You get the most advanced, elaborate, self-documenting, customizable, extensible, role-playing environment in the world!
All of the Elisp is GPLv3-or-later, and the patches are under the modified 3-clause BSD.
- Customizable keys
 - Customizable colors
 - Macros
 - Event hooks
 - All the beauty that comes with Emacs
 
I am semi-actively adding new features and fixing bugs as of August 2025.
I mostly work on things that affect how I play NetHack (e.g. my nethackrc), so please open an issue/PR if something doesn't work—it's likely I just don't use that feature and never ran into that particular issue.
Important
nethack-el only supports versions 3.6.7 and 3.7.0-WIP of NetHack. Please do not open issues with using nethack-el with versions of NetHack older than 3.6.7.
Previous repo: https://github.com/be11ng/nethack-el
Old website: http://savannah.nongnu.org/projects/nethack-el
These instructions are known to work on *NIX systems and have been lightly tested on Windows.
- 
Install the Elisp sources
- 
Add the
nethack-elfolder to your Emacs load-path. - 
Make sure you have all of your dependencies installed. You'll need
make,gcc,bisonoryacc,flexorlex, and the ncurses-dev library for your system.- On Windows you'll need MSYS2 with 
mingw-w64-ucrt-x86_64-gccandmakeinstalled, and make sureC:\msys64\usr\binis inexec-path. 
 - On Windows you'll need MSYS2 with 
 
 - 
 
Note
nethack-el only supports NetHack 3.7.0 on Windows.
- Play with 
M-x nethack RET. This should automatically detect if NetHack w/ lisp patch is installed, and if not will attempt to build it from source. 
- 
Download either
nethack-367.tgzfrom https://nethack.org orgit clone https://github.com/NetHack/NetHack.git(required for using NetHack-3.7 branch) - 
Untar the package and apply the respective patch
For example, if you were installing 3.6.7, you would do something like:
$ tar xzf nethack-367-src.tgz $ cp enh-367.patch NetHack-NetHack-3.6.7_Released $ cd NetHack-NetHack-3.6.7_Released $ patch -p 1 < enh-367.patch - 
Follow the instructions in
sys/*/Install.*orNewInstall.*- 
This may be as simple as running
sys/unix/setup.shto copy the Makefiles. - 
For the 3.6.7/3.7.0 patch, included is a hints file under
sys/unix/hints/lispbased on the default Linux one, which builds into wherever thePREFIXenvironment variable points to at runtime. You may want to edit thelisphints file before running something along the lines of:$ cd sys/unix $ vi hints/lisp $ sh setup.sh hints/lisp 
 - 
 - 
Compile (from the toplevel)
- 
Following the instructions as outlined so far, that would be:
$ cd ../.. $ make all $ make install 
 - 
 - 
Install the Elisp sources
- 
Edit the Makefile in the
nethack-eldirectory to set the location of your Emacs. - 
Byte compile (not strictly necessary).
$ cd .. # Or wherever nethack-el is located $ make all - 
Place the
*.elcor*.elfiles in your load-path. - 
Add the following lines somewhere inside your
init.el:(autoload 'nethack "nethack" "Play Nethack." t) (setq nethack-program "/PATH/TO/PATCHED/nethack")
 - 
Play with
M-x nethack RET. 
 - 
 
