mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-21 06:55:35 +00:00
ob-exp: Small speed-up
* lisp/ob-exp.el (org-babel-exp-src-block): Refer to block position instead of line. `org-current-line' is costly in large buffers.
This commit is contained in:
parent
a02fe8e8e3
commit
11e2df8091
@ -114,12 +114,12 @@ Assume point is at the beginning of block's starting line."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(let* ((info (org-babel-get-src-block-info 'light))
|
||||
(line (org-current-line))
|
||||
(lang (nth 0 info))
|
||||
(raw-params (nth 2 info)) hash)
|
||||
;; bail if we couldn't get any info from the block
|
||||
(unless noninteractive
|
||||
(message "org-babel-exp process %s at line %d..." lang line))
|
||||
(message "org-babel-exp process %s at position %d..."
|
||||
lang (line-beginning-position)))
|
||||
(when info
|
||||
;; if we're actually going to need the parameters
|
||||
(when (member (cdr (assoc :exports (nth 2 info))) '("both" "results"))
|
||||
|
Loading…
Reference in New Issue
Block a user