Improving Compiler Diagnostics with Overlays in Emacs - EmacsConf 2023
EmacsConf and Emacs hangouts via YouTube
Overview
Syllabus
Introduction
Overlays and what they can do
Simple overlay example - creating an overlay
Adding properties
Deleting an overlay
Setting fonts the right way
More properties
Visibility
Adding text
Custom properties
Notes on properties
Improving C++ compiler output
The problem with C++ error messages
Many standard class templates have default arguments
Some types are aliases for longer things, too
Reporting type information accurately means long lines
Emacs can help - Treat C++ type names as just another kind of balanced expression
Add overlays to improve readability
Create a minor mode that runs during compilation
Parsing types as balanced expressions
Indent and fill with overlays - Use ancient "pretty printing" algorithms"
Overlays can mimic line breaks and indentation
Hiding details - Marking depths with overlays
Hiding to a target depth
Demo
Conclusion
Taught by
EmacsConf and Emacs hangouts