diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-05-20 13:38:57 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-05-20 13:41:16 +0200 |
commit | 11e2df8091b55471c6a7aec977aea98dbb90b6d2 (patch) | |
tree | 0674da21d4fcdd38a7a37630e923ff5e1e120327 | |
parent | a02fe8e8e3b06965e38fae9df5ed7fc12881d197 (diff) | |
download | org-mode-11e2df8091b55471c6a7aec977aea98dbb90b6d2.tar.gz |
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.
-rw-r--r-- | lisp/ob-exp.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index 7ce1456..5b46114 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -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")) |