How to write an emacs major-mode like dired

1k views Asked by At

I've found a bunch of information (like this) on writing a major-mode for a language, but... I'd like to write a mode along the lines of dired or tetris - modes that use the buffer as a GUI.

In the "Major Modes" section of the manual, the "Basic Major Modes" page implies it should base the mode on special-mode, but I couldn't find any more useful information

Is there any good tutorials on writing a special-mode derived mode? Any good basic "hello world"-level examples of such a thing?

2

There are 2 answers

0
Oleg Pavliv On

Take a look on undo-tree-visualizer-mode in UndoTree.

It's pretty small and is not based on a language.

0
Ryan Tarpine On

Zachary Kanfer once gave a talk titled Writing Games with Emacs, where he live-coded a simple tictactoe-mode. You can find it on YouTube here, and he uploaded his code here.

I found it a great introduction to writing my own special mode.