The GNU Emacs Architecture: Unlocking the Core
2026 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE credits
Student thesis
Abstract [en]
The GNU Emacs text editor is a part of the GNU Operating System and has been in development since the 1980s. Emacs is known for its user-extensible and self-documenting design that ties back to the free software philosophy that advocates for the users freedoms to run, study, change and distribute computer programs. While there is much documentation on the editors programming language Emacs Lisp, there is a lack of accessible documentation which covers the internal architecture. This significantly complicates effort of introducing new developers the Emacs core, restricting the users freedom to study Emacs. The recent introduction of Lisp threads brought a limited form of concurrency to Emacs, is forced to use a Global Interpreter Lock (GIL) to function with the single-threaded architecture of GNU Emacs. This thesis aims to aid future work in modernizing Emacs by providing a foundation of a comprehensive and accessible documentation covering the internal architecture of GNU Emacs, focusing on components related to concurrency and parallel processing. The documentation is paired with a summarizing analysis covering the architectural limitations of the GNU Emacs core related to concurrent and parallel processing. This work hopes to initiate discussion regarding the single-threaded nature of the core and to act as a foundation for future documentation to expand upon. The documentation covers the GNU Emacs source code and build process, including architectural components such as the Command Loop and Lisp Environment while highlighting features related to concurrency such as variable binding, processes and threads. The analysis addresses the constraints of the cooperative concurrency model, summarizing the workarounds used in contemporary Lisp libraries and possible improvements such as the addition of a preemptive thread scheduler, illustrating the complicated task of removing the GIL. The GNU Emacs core relies heavily on shared state, requiring large changes in its most fundamental systems such as the memory allocator and the Lisp environment.
Place, publisher, year, edition, pages
2026. , p. 58
Series
IT ; kDV 25 034
Keywords [en]
Emacs, GNU, Concurrency, Architecture, Emacs Lisp, Elisp, Interpreter, Programming, GNU Emacs
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:uu:diva-584277OAI: oai:DiVA.org:uu-584277DiVA, id: diva2:2052282
Educational program
Bachelor Programme in Computer Science
Supervisors
Examiners
2026-04-202026-04-112026-04-20Bibliographically approved