forked from mirrors/org-mode
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
This commit is contained in:
commit
38f1b209d4
|
@ -216,7 +216,7 @@ block."
|
||||||
(cmd (intern (concat "org-babel-execute:" lang)))
|
(cmd (intern (concat "org-babel-execute:" lang)))
|
||||||
(dir (cdr (assoc :dir params)))
|
(dir (cdr (assoc :dir params)))
|
||||||
(default-directory
|
(default-directory
|
||||||
(or (and dir (if (string-match "/$" dir) dir (concat dir "/"))) default-directory))
|
(or (and dir (file-name-as-directory dir)) default-directory))
|
||||||
(call-process-region-original
|
(call-process-region-original
|
||||||
(if (boundp 'call-process-region-original) call-process-region-original
|
(if (boundp 'call-process-region-original) call-process-region-original
|
||||||
(symbol-function 'call-process-region)))
|
(symbol-function 'call-process-region)))
|
||||||
|
@ -830,10 +830,17 @@ relies on `org-babel-insert-result'."
|
||||||
(point))))
|
(point))))
|
||||||
|
|
||||||
(defun org-babel-result-to-file (result)
|
(defun org-babel-result-to-file (result)
|
||||||
"Return an `org-mode' link with the path being the value or
|
"Convert RESULT into an `org-mode' link. If the
|
||||||
RESULT, and the display being the `file-name-nondirectory' if
|
`default-directory' is different from the containing file's
|
||||||
non-nil."
|
directory then expand relative links."
|
||||||
(concat "[[file:" result "]]"))
|
(format
|
||||||
|
"[[file:%s]]"
|
||||||
|
(if (and default-directory
|
||||||
|
buffer-file-name
|
||||||
|
(not (string= (expand-file-name default-directory)
|
||||||
|
(expand-file-name (file-name-directory buffer-file-name)))))
|
||||||
|
(expand-file-name result default-directory)
|
||||||
|
result)))
|
||||||
|
|
||||||
(defun org-babel-examplize-region (beg end &optional results-switches)
|
(defun org-babel-examplize-region (beg end &optional results-switches)
|
||||||
"Comment out region using the ': ' org example quote."
|
"Comment out region using the ': ' org example quote."
|
||||||
|
|
|
@ -301,7 +301,7 @@ line directly before or after the table."
|
||||||
(setf table (delq 'hline (cdr table)))) ;; clean non-data from table
|
(setf table (delq 'hline (cdr table)))) ;; clean non-data from table
|
||||||
;; collect options
|
;; collect options
|
||||||
(save-excursion (while (and (equal 0 (forward-line -1))
|
(save-excursion (while (and (equal 0 (forward-line -1))
|
||||||
(looking-at "#\\+"))
|
(looking-at "[[:space:]]*#\\+"))
|
||||||
(setf params (org-plot/collect-options params))))
|
(setf params (org-plot/collect-options params))))
|
||||||
;; dump table to datafile (very different for grid)
|
;; dump table to datafile (very different for grid)
|
||||||
(case (plist-get params :plot-type)
|
(case (plist-get params :plot-type)
|
||||||
|
|
Loading…
Reference in New Issue