…work in progress…
Macros are small programs or functions written in Klipper gcode. They're defined in printer.cfg (or files that it includes) and are loaded when Klipper performs a soft or hard restart (RESTART or FIRMWARE_RESTART respectively), which reads printer.cfg.
Macros can be called from:
See print_start_macro.
It is called in addition or in conjunction with your slicer's machine print finish gcode. It is called be default in certain earlier versions of Klipper which shipped with the N4.
This macro performs machine specific post-print activities and also normally called after CANCEL_PRINT. It is called in addition or in conjunction with your slicer's machine print finish gcode.