From 5be372f8185aa8b482f63f182ee1cf252a777c3b Mon Sep 17 00:00:00 2001 From: TEC Date: Tue, 13 Sep 2022 18:55:06 +0800 Subject: [PATCH 1/3] ob-core: Display line number of exec babel blocks * lisp/ob-core.el (org-babel-execute-src-block): When an unnamed babel block is executed, show the line number of the block. This makes it easier to track the execution without having to name every block. --- lisp/ob-core.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 8a963fa8e..0a179f379 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -779,7 +779,11 @@ (defun org-babel-execute-src-block (&optional arg info params) (message "executing %s code block%s..." (capitalize lang) (let ((name (nth 4 info))) - (if name (format " (%s)" name) ""))) + (if name + (format "(%s)" name) + (format "on line %d" + (line-number-at-pos + (or (nth 5 info) org-babel-current-src-block-location)))))) (setq result (let ((r (funcall cmd body params))) (if (and (eq (cdr (assq :result-type params)) 'value) -- 2.37.1