Via Grant Rettke, here is a nice snippet of code from John Kitchin that gives a visual indication of when an org-mode code block is executing. It’s just a defadvice
around org-babel-execute-src-block
so it’s easy to modify to suit your preferences.
Most of my code blocks execute more or less instantly so I would have limited use for this but if, like Kitchin, you have long running processes, it’s a nice hack to let you know the status.
This is another example of how Kitchin is automating his life with Emacs. Happily, the rest of us benefit from his work as well.