Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

This commit is contained in:
Carsten Dominik 2010-03-03 12:59:33 +01:00
commit 38f1b209d4
3 changed files with 322 additions and 315 deletions

View File

@ -216,7 +216,7 @@ block."
(cmd (intern (concat "org-babel-execute:" lang)))
(dir (cdr (assoc :dir params)))
(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
(if (boundp 'call-process-region-original) call-process-region-original
(symbol-function 'call-process-region)))
@ -830,10 +830,17 @@ relies on `org-babel-insert-result'."
(point))))
(defun org-babel-result-to-file (result)
"Return an `org-mode' link with the path being the value or
RESULT, and the display being the `file-name-nondirectory' if
non-nil."
(concat "[[file:" result "]]"))
"Convert RESULT into an `org-mode' link. If the
`default-directory' is different from the containing file's
directory then expand relative links."
(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)
"Comment out region using the ': ' org example quote."

View File

@ -301,7 +301,7 @@ line directly before or after the table."
(setf table (delq 'hline (cdr table)))) ;; clean non-data from table
;; collect options
(save-excursion (while (and (equal 0 (forward-line -1))
(looking-at "#\\+"))
(looking-at "[[:space:]]*#\\+"))
(setf params (org-plot/collect-options params))))
;; dump table to datafile (very different for grid)
(case (plist-get params :plot-type)