countvajhula / mindstream

Start writing (or coding), stay focused, don't worry.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Iterate session on save-buffer

countvajhula opened this issue · comments

Currently, the session iterates when racket-run is invoked. This is considered a meaningful action identifying buffer states of interest at a higher level than the details of editing operations that might be traversed using normal undo/redo. It is even more high level than Vim's command-bounded changes in that it identifies functional states of the buffer rather than just a semantic series of edits.

But racket-run is specific to Racket. A more general option here is to iterate the session on calls to save-buffer (which racket-run invokes, in some form).

I did try this a while ago but ran into some issues where I wasn't able to identify which low-level Emacs function(s) to advise in order to both avoid redundant iteration and also completely capture all ways of saving the buffer.