I am trying to convert markdown to html and then use impatient-mode to display it live on browser on the fly.
Impatient mode uses after-change-hook
to detect changes in html. I am using after-change-hook
to detect changes in markdown buffer.
Buffer changes made while executing the
after-change-functions
don't call any before-change or after-change functions. That's becauseinhibit-modification-hooks
is temporarily set non-nil.
As documentation says it won't work.
I can use timer to update every second but I am looking for a better solution.
let
-binding this variable to nil before modifying the html buffer. Just make sure you're not running into an endless loop, which shouldn't happen if the modifications happen in 2 different buffers and the hooks are added locally. – politza Jul 16 '15 at 20:12after-change-function running
after 0 secs, which is like a throw to toplevel. Those are just ideas. Try it, and then post your own answer. – politza Jul 17 '15 at 18:28