technomancy/emacs-starter-kit — pull request #163 by DarwinAwardWinner (2013-11-23 19:07:59+00:00)
Title: Less fragile implementation of esk-eval-and-replace

Instead of killing the sexp first and then reinserting it if evaluation
files, this one doesn't kill the sexp until after *successful*
evaluation, so there's no danger of losing the sexp entirely if it fails
to eval.

Source: http://stackoverflow.com/a/3035574/125921

(I know ESK V2 is not actively developed any more, but I figured you might appreciate the bugfix.)