forked from mirrors/org-mode
Merge branch 'master' of orgmode.org:org-mode
This commit is contained in:
commit
5e8abde993
|
@ -2680,11 +2680,7 @@ Fixes a bug in `tramp-handle-call-process-region'."
|
||||||
|
|
||||||
(defun org-babel-local-file-name (file)
|
(defun org-babel-local-file-name (file)
|
||||||
"Return the local name component of FILE."
|
"Return the local name component of FILE."
|
||||||
(if (file-remote-p file)
|
(or (file-remote-p file 'localname) file))
|
||||||
(let (localname)
|
|
||||||
(with-parsed-tramp-file-name file nil
|
|
||||||
localname))
|
|
||||||
file))
|
|
||||||
|
|
||||||
(defun org-babel-process-file-name (name &optional no-quote-p)
|
(defun org-babel-process-file-name (name &optional no-quote-p)
|
||||||
"Prepare NAME to be used in an external process.
|
"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
|
Unless second argument NO-QUOTE-P is non-nil, the file name is
|
||||||
additionally processed by `shell-quote-argument'"
|
additionally processed by `shell-quote-argument'"
|
||||||
((lambda (f) (if no-quote-p f (shell-quote-argument f)))
|
((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)
|
(defvar org-babel-temporary-directory)
|
||||||
(unless (or noninteractive (boundp '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
|
Used by `org-babel-temp-file'. This directory will be removed on
|
||||||
Emacs shutdown."))
|
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)
|
(defmacro org-babel-result-cond (result-params scalar-form &rest table-forms)
|
||||||
"Call the code to parse raw string results according to RESULT-PARAMS."
|
"Call the code to parse raw string results according to RESULT-PARAMS."
|
||||||
(declare (indent 1)
|
(declare (indent 1)
|
||||||
|
@ -2736,7 +2740,8 @@ of `org-babel-temporary-directory'."
|
||||||
(if (file-remote-p default-directory)
|
(if (file-remote-p default-directory)
|
||||||
(let ((prefix
|
(let ((prefix
|
||||||
(concat (file-remote-p default-directory)
|
(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))
|
(make-temp-file prefix nil suffix))
|
||||||
(let ((temporary-file-directory
|
(let ((temporary-file-directory
|
||||||
(or (and (boundp 'org-babel-temporary-directory)
|
(or (and (boundp 'org-babel-temporary-directory)
|
||||||
|
|
|
@ -28,8 +28,7 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(require 'ob)
|
(require 'ob)
|
||||||
|
|
||||||
(defvar org-babel-default-header-args:emacs-lisp
|
(defvar org-babel-default-header-args:emacs-lisp nil
|
||||||
'((:hlines . "yes") (:colnames . "no"))
|
|
||||||
"Default arguments for evaluating an emacs-lisp source block.")
|
"Default arguments for evaluating an emacs-lisp source block.")
|
||||||
|
|
||||||
(declare-function orgtbl-to-generic "org-table" (table params))
|
(declare-function orgtbl-to-generic "org-table" (table params))
|
||||||
|
|
|
@ -243,6 +243,10 @@ used to limit the exported source code blocks by language."
|
||||||
(if (file-exists-p file-name)
|
(if (file-exists-p file-name)
|
||||||
(insert-file-contents file-name))
|
(insert-file-contents file-name))
|
||||||
(goto-char (point-max))
|
(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)
|
(insert content)
|
||||||
(write-region nil nil file-name))))
|
(write-region nil nil file-name))))
|
||||||
;; if files contain she-bangs, then make the executable
|
;; 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))
|
(body (nth 5 spec))
|
||||||
(comment (nth 6 spec))
|
(comment (nth 6 spec))
|
||||||
(comments (cdr (assoc :comments (nth 4 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")
|
(link-p (or (string= comments "both") (string= comments "link")
|
||||||
(string= comments "yes") (string= comments "noweb")))
|
(string= comments "yes") (string= comments "noweb")))
|
||||||
(link-data (mapcar (lambda (el)
|
(link-data (mapcar (lambda (el)
|
||||||
|
@ -327,7 +330,6 @@ that the appropriate major-mode is set. SPEC has the form:
|
||||||
(funcall
|
(funcall
|
||||||
insert-comment
|
insert-comment
|
||||||
(org-fill-template org-babel-tangle-comment-format-beg link-data)))
|
(org-fill-template org-babel-tangle-comment-format-beg link-data)))
|
||||||
(when (and padline (not (= (point) (point-min)))) (insert "\n"))
|
|
||||||
(insert
|
(insert
|
||||||
(format
|
(format
|
||||||
"%s\n"
|
"%s\n"
|
||||||
|
|
|
@ -170,6 +170,7 @@ included. See the back-end documentation for more information.
|
||||||
:with-inlinetasks `org-export-with-inlinetasks'
|
:with-inlinetasks `org-export-with-inlinetasks'
|
||||||
:with-latex `org-export-with-latex'
|
:with-latex `org-export-with-latex'
|
||||||
:with-priority `org-export-with-priority'
|
:with-priority `org-export-with-priority'
|
||||||
|
:with-properties `org-export-with-properties'
|
||||||
:with-smart-quotes `org-export-with-smart-quotes'
|
:with-smart-quotes `org-export-with-smart-quotes'
|
||||||
:with-special-strings `org-export-with-special-strings'
|
:with-special-strings `org-export-with-special-strings'
|
||||||
:with-statistics-cookies' `org-export-with-statistics-cookies'
|
:with-statistics-cookies' `org-export-with-statistics-cookies'
|
||||||
|
|
Loading…
Reference in New Issue