Merge branch 'master' of orgmode.org:org-mode

This commit is contained in:
Carsten Dominik 2013-09-28 19:55:15 +02:00
commit 5e8abde993
4 changed files with 18 additions and 11 deletions

View File

@ -2680,11 +2680,7 @@ Fixes a bug in `tramp-handle-call-process-region'."
(defun org-babel-local-file-name (file)
"Return the local name component of FILE."
(if (file-remote-p file)
(let (localname)
(with-parsed-tramp-file-name file nil
localname))
file))
(or (file-remote-p file 'localname) file))
(defun org-babel-process-file-name (name &optional no-quote-p)
"Prepare NAME to be used in an external process.
@ -2694,7 +2690,10 @@ remotely. The file name is then processed by `expand-file-name'.
Unless second argument NO-QUOTE-P is non-nil, the file name is
additionally processed by `shell-quote-argument'"
((lambda (f) (if no-quote-p f (shell-quote-argument f)))
(expand-file-name (org-babel-local-file-name name))))
;; We must apply `expand-file-name' on the whole filename. If we
;; would apply it on the local filename only, undesired effects
;; like prepending a drive letter on MS Windows could happen.
(org-babel-local-file-name (expand-file-name name))))
(defvar org-babel-temporary-directory)
(unless (or noninteractive (boundp 'org-babel-temporary-directory))
@ -2707,6 +2706,11 @@ additionally processed by `shell-quote-argument'"
Used by `org-babel-temp-file'. This directory will be removed on
Emacs shutdown."))
(defcustom org-babel-remote-temporary-directory "/tmp/"
"Directory to hold temporary files on remote hosts."
:group 'org-babel
:type 'string)
(defmacro org-babel-result-cond (result-params scalar-form &rest table-forms)
"Call the code to parse raw string results according to RESULT-PARAMS."
(declare (indent 1)
@ -2736,7 +2740,8 @@ of `org-babel-temporary-directory'."
(if (file-remote-p default-directory)
(let ((prefix
(concat (file-remote-p default-directory)
(expand-file-name prefix temporary-file-directory))))
(expand-file-name
prefix org-babel-remote-temporary-directory))))
(make-temp-file prefix nil suffix))
(let ((temporary-file-directory
(or (and (boundp 'org-babel-temporary-directory)

View File

@ -28,8 +28,7 @@
;;; Code:
(require 'ob)
(defvar org-babel-default-header-args:emacs-lisp
'((:hlines . "yes") (:colnames . "no"))
(defvar org-babel-default-header-args:emacs-lisp nil
"Default arguments for evaluating an emacs-lisp source block.")
(declare-function orgtbl-to-generic "org-table" (table params))

View File

@ -243,6 +243,10 @@ used to limit the exported source code blocks by language."
(if (file-exists-p file-name)
(insert-file-contents file-name))
(goto-char (point-max))
;; Handle :padlines unless first line in file
(unless (or (string= "no" (cdr (assoc :padline (nth 4 spec))))
(= (point) (point-min)))
(insert "\n"))
(insert content)
(write-region nil nil file-name))))
;; if files contain she-bangs, then make the executable
@ -307,7 +311,6 @@ that the appropriate major-mode is set. SPEC has the form:
(body (nth 5 spec))
(comment (nth 6 spec))
(comments (cdr (assoc :comments (nth 4 spec))))
(padline (not (string= "no" (cdr (assoc :padline (nth 4 spec))))))
(link-p (or (string= comments "both") (string= comments "link")
(string= comments "yes") (string= comments "noweb")))
(link-data (mapcar (lambda (el)
@ -327,7 +330,6 @@ that the appropriate major-mode is set. SPEC has the form:
(funcall
insert-comment
(org-fill-template org-babel-tangle-comment-format-beg link-data)))
(when (and padline (not (= (point) (point-min)))) (insert "\n"))
(insert
(format
"%s\n"

View File

@ -170,6 +170,7 @@ included. See the back-end documentation for more information.
:with-inlinetasks `org-export-with-inlinetasks'
:with-latex `org-export-with-latex'
:with-priority `org-export-with-priority'
:with-properties `org-export-with-properties'
:with-smart-quotes `org-export-with-smart-quotes'
:with-special-strings `org-export-with-special-strings'
:with-statistics-cookies' `org-export-with-statistics-cookies'