It has happened multiple times to me that I edit an Emacs lisp snippet with 
org-edit-special and in the edit buffer have expanded a macro with macrostep 
[1]. If I then save the edit buffer, it writes the expanded macro back into the 
org src block, because macrostep replaces the text in the buffer. Today, I 
wanted to fix that by putting `macrostep-collapse-all' into `before-save-hook' 
or some equivalent for org-src-mode. However, after studying the code, no 
equivalent seems to exist today. Would it make sense to add one? Should 
`org-src-edit-save' and `org-src-edit-save' call `before-save-hook'? Or should 
there be a `org-src-edit-save-hook' or similar?

[1] https://github.com/emacsorphanage/macrostep

Best,
Marten

Reply via email to