Hi Ihor, >> - (message “executing %s code block%s…” >> + (message “executing %s %s %s…” >> (capitalize lang) >> + (pcase (org-element-type (org-element-at-point)) >> + (’src-block “code block”) >> + (’babel-call “call”) >> + (’paragraph “inline code block”)) > > This will not work, for example, when inline src block is located inside > a headline. One can think of various other non-paragraph scenarios as well. Good point. Does assuming anything other than a src block or babel call is an inline src block sound reasonable? > Also, even though org-element-at-point should be caching recent calls, > I’d try to test the performance before/after the patch on large number > of src blocks (like in your config). org-element-at-point can add a fair > bit of CPU load in some scenarios where we have fallback to the full > O(Log N) AVL-tree lookup. I’ll see about giving this a shot at some point. Since parsing would be required before this point I assumed the document structure would be cached and this should be fairly cheap. Would `org-element-at-point-no-context' be better potentially? >> + (let ((time-info >> + (if (and exec-time (> (float-time exec-time) 0.05)) >> + (format “ (took %.1fs)” (float-time exec-time)) > > Why 0.05?? Because that’s half the resolution at which the time is displayed at. The idea is to only show the time when it will show something greater than zero. All the best, Timothy