Commit 613c9a5c authored by Rasmus's avatar Rasmus

Update Org to v9.1.9

Please note this is a bugfix release. See etc/ORG-NEWS for details.
parent 1b075a9e
This diff is collapsed.
This diff is collapsed.
...@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. ...@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
Author: Jambunathan K <kjambunathan at gmail dot com> Author: Jambunathan K <kjambunathan at gmail dot com>
Keywords: outlines, hypermedia, calendar, wp Keywords: outlines, hypermedia, calendar, wp
Homepage: http://orgmode.org Homepage: https://orgmode.org
Commentary: Commentary:
......
% Reference Card for Org Mode % Reference Card for Org Mode
\def\orgversionnumber{9.1.6} \def\orgversionnumber{9.1.9}
\def\versionyear{2018} % latest update \def\versionyear{2018} % latest update
\input emacsver.tex \input emacsver.tex
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Thierry Banel ;; Thierry Banel
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Oleh Krehel ;; Author: Oleh Krehel
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Dan Davison ;; Dan Davison
;; Keywords: literate programming, reproducible research, R, statistics ;; Keywords: literate programming, reproducible research, R, statistics
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;; Author: Joel Boehland, Eric Schulte, Oleh Krehel, Frederick Giasson ;; Author: Joel Boehland, Eric Schulte, Oleh Krehel, Frederick Giasson
;; ;;
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, comint ;; Keywords: literate programming, reproducible research, comint
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Dan Davison ;; Dan Davison
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -980,13 +980,24 @@ with a prefix argument then this is passed on to ...@@ -980,13 +980,24 @@ with a prefix argument then this is passed on to
(defmacro org-babel-do-in-edit-buffer (&rest body) (defmacro org-babel-do-in-edit-buffer (&rest body)
"Evaluate BODY in edit buffer if there is a code block at point. "Evaluate BODY in edit buffer if there is a code block at point.
Return t if a code block was found at point, nil otherwise." Return t if a code block was found at point, nil otherwise."
`(let ((org-src-window-setup 'switch-invisibly)) (declare (debug (body)))
(when (and (org-babel-where-is-src-block-head) `(let* ((element (org-element-at-point))
;; This function is not supposed to move point. However,
;; `org-edit-src-code' always moves point back into the
;; source block. It is problematic if the point was before
;; the code, e.g., on block's opening line. In this case,
;; we want to restore this location after executing BODY.
(outside-position
(and (<= (line-beginning-position)
(org-element-property :post-affiliated element))
(point-marker)))
(org-src-window-setup 'switch-invisibly))
(when (and (org-babel-where-is-src-block-head element)
(org-edit-src-code)) (org-edit-src-code))
(unwind-protect (progn ,@body) (unwind-protect (progn ,@body)
(org-edit-src-exit)) (org-edit-src-exit)
(when outside-position (goto-char outside-position)))
t))) t)))
(def-edebug-spec org-babel-do-in-edit-buffer (body))
(defun org-babel-do-key-sequence-in-edit-buffer (key) (defun org-babel-do-key-sequence-in-edit-buffer (key)
"Read key sequence and execute the command in edit buffer. "Read key sequence and execute the command in edit buffer.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Michael Gauland ;; Author: Michael Gauland
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; Version: 1.00 ;; Version: 1.00
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, comint ;; Keywords: literate programming, reproducible research, comint
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Dan Davison ;; Dan Davison
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, forth ;; Keywords: literate programming, reproducible research, forth
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;; Authors: Sergey Litvinov ;; Authors: Sergey Litvinov
;; Eric Schulte ;; Eric Schulte
;; Keywords: literate programming, reproducible research, fortran ;; Keywords: literate programming, reproducible research, fortran
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
;; ;;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Miro Bezjak ;; Author: Miro Bezjak
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -84,12 +84,12 @@ in BODY as elisp." ...@@ -84,12 +84,12 @@ in BODY as elisp."
(when session (error "Sessions are not (yet) supported for Groovy")) (when session (error "Sessions are not (yet) supported for Groovy"))
(pcase result-type (pcase result-type
(`output (`output
(let ((src-file (org-babel-temp-file "groovy-"))) (let ((src-file (org-babel-temp-file "groovy_")))
(progn (with-temp-file src-file (insert body)) (progn (with-temp-file src-file (insert body))
(org-babel-eval (org-babel-eval
(concat org-babel-groovy-command " " src-file) "")))) (concat org-babel-groovy-command " " src-file) ""))))
(`value (`value
(let* ((src-file (org-babel-temp-file "groovy-")) (let* ((src-file (org-babel-temp-file "groovy_"))
(wrapper (format org-babel-groovy-wrapper-method body))) (wrapper (format org-babel-groovy-wrapper-method body)))
(with-temp-file src-file (insert wrapper)) (with-temp-file src-file (insert wrapper))
(let ((raw (org-babel-eval (let ((raw (org-babel-eval
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Simon Michael ;; Author: Simon Michael
;; Keywords: literate programming, reproducible research, plain text accounting ;; Keywords: literate programming, reproducible research, plain text accounting
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Andrzej Lichnerowicz ;; Author: Andrzej Lichnerowicz
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, js ;; Keywords: literate programming, reproducible research, js
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric Schulte ;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Eric S Fraga ;; Author: Eric S Fraga
;; Keywords: literate programming, reproducible research, accounting ;; Keywords: literate programming, reproducible research, accounting
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Martyn Jago ;; Author: Martyn Jago
;; Keywords: babel language, literate programming ;; Keywords: babel language, literate programming
;; Homepage: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html ;; Homepage: https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
;;; Commentary: ;;; Commentary:
;; Installation, ob-lilypond documentation, and examples are available at ;; Installation, ob-lilypond documentation, and examples are available at
;; http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html ;; https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html
;; ;;
;; Lilypond documentation can be found at ;; Lilypond documentation can be found at
;; http://lilypond.org/manuals.html ;; http://lilypond.org/manuals.html
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
;; Eric Schulte ;; Eric Schulte
;; David T. O'Toole <dto@gnu.org> ;; David T. O'Toole <dto@gnu.org>
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Dan Davison ;; Dan Davison
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: https://orgmode.org
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -79,44 +79,54 @@ if so then run the appropriate source block from the Library." ...@@ -79,44 +79,54 @@ if so then run the appropriate source block from the Library."
(org-babel-execute-src-block nil info) (org-babel-execute-src-block nil info)
t))) t)))
(defun org-babel-lob--src-info (name) (defun org-babel-lob--src-info (ref)
"Return internal representation for Babel data named NAME. "Return internal representation for Babel data referenced as REF.
NAME is a string. This function looks into the current document REF is a string. This function looks into the current document
for a Babel call or source block. If none is found, it looks for a Babel call or source block. If none is found, it looks
after NAME in the Library of Babel. Eventually, if that also after REF in the Library of Babel."
fails, it returns nil." (let ((name ref)
;; During export, look into the pristine copy of the document being (file nil))
;; exported instead of the current one, which could miss some data. ;; Extract the remote file, if specified in the reference.
(with-current-buffer (or org-babel-exp-reference-buffer (current-buffer)) (when (string-match "\\`\\(.+\\):\\(.+\\)\\'" ref)
(org-with-wide-buffer (setq file (match-string 1 ref))
(goto-char (point-min)) (setq name (match-string 2 ref)))
(catch :found ;; During export, look into the pristine copy of the document
(let ((case-fold-search t) ;; being exported instead of the current one, which could miss
(regexp (org-babel-named-data-regexp-for-name name))) ;; some data.
(while (re-search-forward regexp nil t) (with-current-buffer (cond (file (find-file-noselect file t))
(let ((element (org-element-at-point))) (org-babel-exp-reference-buffer)
(when (equal name (org-element-property :name element)) (t (current-buffer)))
(throw :found (org-with-point-at 1
(pcase (org-element-type element) (catch :found
(`src-block (org-babel-get-src-block-info t element)) (let ((case-fold-search t)
(`babel-call (org-babel-lob-get-info element)) (regexp (org-babel-named-data-regexp-for-name name)))
;; Non-executable data found. Since names are (while (re-search-forward regexp nil t)
;; supposed to be unique throughout a document, (let ((element (org-element-at-point)))
;; bail out. (when (equal name (org-element-property :name element))
(_ nil)))))) (throw :found
;; No element named NAME in buffer. Try Library of Babel. (pcase (org-element-type element)
(cdr (assoc-string name org-babel-library-of-babel))))))) (`src-block (org-babel-get-src-block-info t element))
(`babel-call (org-babel-lob-get-info element))
;; Non-executable data found. Since names
;; are supposed to be unique throughout
;; a document, bail out.
(_ nil))))))
(cdr (assoc-string ref org-babel-library-of-babel))))))))
;;;###autoload ;;;###autoload
(defun org-babel-lob-get-info (&optional datum) (defun org-babel-lob-get-info (&optional datum)
"Return internal representation for Library of Babel function call. "Return internal representation for Library of Babel function call.
Consider DATUM, when provided, or element at point. Return nil
when not on an appropriate location. Otherwise return a list Consider DATUM, when provided, or element at point otherwise.
compatible with `org-babel-get-src-block-info', which see."
Return nil when not on an appropriate location. Otherwise return
a list compatible with `org-babel-get-src-block-info', which
see."
(let* ((context (or datum (org-element-context))) (let* ((context (or datum (org-element-context)))
(type (org-element-type context)))