Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jefftrull/tspew

Template Spew Mode for C++ adds features for friendlier error viewing to compilation-mode
https://github.com/jefftrull/tspew

Last synced: 7 days ago
JSON representation

Template Spew Mode for C++ adds features for friendlier error viewing to compilation-mode

Awesome Lists containing this project

README

        

#+TITLE: tspew
#+OPTIONS: TOC:nil

* An Emacs minor mode for template-related errors in C++
~tspew~ addresses the "template spew" problem for C++ coders.
This minor mode runs during compilation of C++ code and reformats long error messages to be easier to read.
It indents template type names according to their hierarchy, adding newlines as required
to eliminate run-on lines.
It also provides functions to "fold" expressions to hide or reveal lower level details, for readability.

* Usage
** Installation
*** Install tspew.el somewhere in your ~load-path~
*** In your init file:
- ~(require 'tspew)~ or otherwise specify it should be loaded (e.g. with ~use-package~)
- Ensure it runs during compilation with ~(add-hook 'compilation-mode-hook 'tspew-mode)~
** Displaying formatted types and functions within error messages
- Formatting occurs as compilation results arrive and are complete when the compile finishes
- To remove all formatting, exit the minor mode with ~M-x tspew-mode~
** Reducing detail in types
- The command ~tspew-fold~, when run with a numeric argument, will replace text around point that is at or below that depth in parentheses (or brackets) with ellipses =...= A ~nil~ argument will restore everything.
- The text within quotes at that point will be reformatted
- You can incrementally increase or decrease the detail shown using ~tspew-increase-detail~ (bound to ~C-c +~) and ~tspew-decrease-detail~ (bound to ~C-c -~)

* Example

#+CAPTION: Before
[[./before.png]]

Becomes:

#+CAPTION: After
[[./after.png]]

* License

Template Spew Mode for C++ adds features for friendlier error viewing to compilation-mode

Copyright (C) 2023 Jeff Trull and contributors

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see .