diff options
author | Rasmus <rasmus@gmx.us> | 2018-01-22 15:57:42 +0100 |
---|---|---|
committer | Rasmus <rasmus@gmx.us> | 2018-01-22 16:02:55 +0100 |
commit | bb396a369c93e57b033844003c7ceab61d61aa08 (patch) | |
tree | 31a9ef7d5792d64bf181b17cb8255386efd5d96d /lisp/org/ob-core.el | |
parent | fa582153f7a75e1eaaef4bfd2b381916233dc0a7 (diff) | |
download | emacs-bb396a369c93e57b033844003c7ceab61d61aa08.tar.gz |
Update Org to v9.1.6
Please note this is a bugfix release. See etc/ORG-NEWS for details.
Diffstat (limited to 'lisp/org/ob-core.el')
-rw-r--r-- | lisp/org/ob-core.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index 8a17ee4f1fa..5f378b2173f 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el @@ -74,7 +74,6 @@ (declare-function org-mark-ring-push "org" (&optional pos buffer)) (declare-function org-narrow-to-subtree "org" ()) (declare-function org-next-block "org" (arg &optional backward block-regexp)) -(declare-function org-number-sequence "org-compat" (from &optional to inc)) (declare-function org-open-at-point "org" (&optional in-emacs reference-buffer)) (declare-function org-outline-overlay-data "org" (&optional use-markers)) (declare-function org-previous-block "org" (arg &optional block-regexp)) @@ -82,7 +81,7 @@ (declare-function org-reverse-string "org" (string)) (declare-function org-set-outline-overlay-data "org" (data)) (declare-function org-show-context "org" (&optional key)) -(declare-function org-src-coderef-format "org-src" (element)) +(declare-function org-src-coderef-format "org-src" (&optional element)) (declare-function org-src-coderef-regexp "org-src" (fmt &optional label)) (declare-function org-table-align "org-table" ()) (declare-function org-table-end "org-table" (&optional table-type)) @@ -2476,7 +2475,7 @@ in the buffer." (point)))))) (defun org-babel-result-to-file (result &optional description) - "Convert RESULT into an `org-mode' link with optional DESCRIPTION. + "Convert RESULT into an Org link with optional DESCRIPTION. If the `default-directory' is different from the containing file's directory then expand relative links." (when (stringp result) @@ -2761,22 +2760,27 @@ block but are passed literally to the \"example-block\"." (if org-babel-use-quick-and-dirty-noweb-expansion (while (re-search-forward rx nil t) (let* ((i (org-babel-get-src-block-info 'light)) - (body (org-babel-expand-noweb-references i)) + (body (if (org-babel-noweb-p (nth 2 i) :eval) + (org-babel-expand-noweb-references i) + (nth 1 i))) (sep (or (cdr (assq :noweb-sep (nth 2 i))) "\n")) (full (if comment (let ((cs (org-babel-tangle-comment-links i))) - (concat (funcall c-wrap (car cs)) "\n" - body "\n" - (funcall c-wrap (cadr cs)))) + (concat (funcall c-wrap (car cs)) "\n" + body "\n" + (funcall c-wrap (cadr cs)))) body))) (setq expansion (cons sep (cons full expansion))))) (org-babel-map-src-blocks nil - (let ((i (org-babel-get-src-block-info 'light))) + (let ((i (let ((org-babel-current-src-block-location (point))) + (org-babel-get-src-block-info 'light)))) (when (equal (or (cdr (assq :noweb-ref (nth 2 i))) (nth 4 i)) source-name) - (let* ((body (org-babel-expand-noweb-references i)) + (let* ((body (if (org-babel-noweb-p (nth 2 i) :eval) + (org-babel-expand-noweb-references i) + (nth 1 i))) (sep (or (cdr (assq :noweb-sep (nth 2 i))) "\n")) (full (if comment |