I was trying to figure out how Emacs renders so fast in the terminal, especially since I think it might have to redraw a large portion (or all the terminal) most of the time. But I haven't yet dug into the code, but I did compile v25 from source. If there's something specific to look for in the code I'd appreciate the pointer.

Does emacs use ncurses to render in the terminal? (If not, what does it use?)

1 Answer 1


Emacs uses termcap to query for the terminal capabilities (such as what the control codes for positioning the cursor are) and implement something along ncurses with its own optimizations to redraw as little as possible. This might sound familar to you if you've ever queried for terminal capabilities with terminfo, a newer implementation of the same idea.

These days the termcap API is typically provided by ncurses, so don't expect Emacs to be necessarily linked with the termcap library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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