What is the right way to perform hierarchical logging in Emacs Lisp?
As a representative example…
(scoped-message "baking cake" (progn (scoped-message "making batter" (progn (scoped-message "whisking eggs" (whisk-eggs)) …)) …)) I would like to see something like baking cake → making batter → whisking eggs in the Messages butter and in the mode line.
Is there a library, macro, or standard idiom that makes this easy?
The library straight.el does this when building dependent libraries (e.g. building org-drill → org-contrib), but it's built in a very custom way. Is there a standard solution available?
let-binding:(let ((scoped-message "baking cake")) (let ((scoped-message (concat scoped-message " → making batter"))) (message (concat scoped-message " → whisking eggs"))))Pityingly the line ends are lost in the comment and therefore the structure information associated with the line ends is lost. Nevertheless it is more a comment instead of an answer...