Commit 8223b1d2 authored by Bastien Guerry's avatar Bastien Guerry

Sync Org 7.9.2 from the commit tagged "release_7.9.2" in Org's Git repo.

parent 16322789
2012-09-30 Achim Gratz <Stromeko@Stromeko.DE>
* org.texi: Add description of ORG_ADD_CONTRIB to info
documentation. Add link to Worg for more details.
* org.texi: Clarify installation procedure. Provide link to the
build system description on Worg.
* org.texi: Remove reference to utils/, x11idle.c is now in
contrib/scripts.
* org.texi: Re-normalize to "Org mode" in manual.
* org.texi (Installation): Adapt documentation to new build
system. Mention GNU ELPA (since it needs to be handled like Emacs
built-in Org).
* org.texi: Include "org-version.inc" instead of
"git-describe.texi".
* org.texi: Remove @set for VERSION and DATE and do an @include
git-describe.texi instead.
2012-09-30 Adam Spiers <orgmode@adamspiers.org> (tiny change)
* org.texi: Fix typo in description of the 'Hooks' section.
* org.texi: Add ID to the list of special properties.
2012-09-30 Andrew Hyatt <ahyatt@gmail.com> (tiny change)
* org.texi (Moving subtrees): Document the ability to archive to a
datetree.
2012-09-30 Bastien Guerry <bzg@altern.org>
* org.texi (Installation, Feedback, Batch execution): Use
(add-to-list 'load-path ... t) for the contrib dir.
* org.texi (results): Update documentation for ":results drawer"
and ":results org".
* org.texi (Column width and alignment): Fix typo.
* org.texi (Activation): Point to the "Conflicts" section.
* org.texi (Conflicts): Mention filladapt.el in the list of
conflicting packages.
* org.texi (Activation): Adding org-mode to `auto-mode-alist' is
not needed for versions of Emacs > 22.1.
* org.texi (History and Acknowledgments): Fix typo.
* org.texi (History and Acknowledgments): Add my own
acknowledgments.
* org.texi (Agenda commands): Document the new command and the new
option.
* org.texi (Agenda commands): Delete `org-agenda-action' section.
(Agenda commands): Reorder. Document `*' to toggle persistent
marks.
* org.texi (Agenda dispatcher): Mention
`org-toggle-agenda-sticky'.
(Agenda commands, Exporting Agenda Views): Fix typo.
* org.texi (Templates in contexts, Setting Options): Update to
reflect changes in how contexts options are processed.
* org.texi (Templates in contexts): Document the new structure of
the variables `org-agenda-custom-commands-contexts' and
`org-capture-templates-contexts'.
* org.texi (Templates in contexts): Document the new option
`org-capture-templates-contexts'.
(Storing searches): Document the new option
`org-agenda-custom-commands-contexts'.
* org.texi (Formula syntax for Lisp): Reformat.
* org.texi (Special properties, Column attributes)
(Agenda column view): Document the new special property
CLOCKSUM_T.
* org.texi (Template expansion): Document the new %l template.
* org.texi (Fast access to TODO states): Fix documentation about
allowed characters for fast todo selection.
* org.texi (Weekly/daily agenda): Mention APPT_WARNTIME and its
use in `org-agenda-to-appt'.
* org.texi (Comment lines): Update wrt comments.
* org.texi (Resolving idle time): Document new keybinding.
* org.texi (Clocking commands): Document the use of S-M-<up/down>
on clock timestamps.
* org.texi (Fast access to TODO states): Explicitely says only
letters are supported as fast TODO selection keys.
* org.texi (Link abbreviations): Illustrate the use of the "%h"
specifier. Document the new "%(my-function)" specifier.
* org.texi (Clocking commands): New cindex.
(Clocking commands): Update documentation for `org-clock-in'.
Document `org-clock-in-last'. Mention `org-clock-out' and
`org-clock-in-last' as commands that can be globally bound.
(Resolving idle time): Document continuous clocking.
* org.texi (Top, Introduction): Fix formatting.
(Activation): Add index entries.
(Conventions): Update section.
(Embedded @LaTeX{}): Fix formatting.
* org.texi (Visibility cycling): Document `show-children'.
* org.texi (Using capture): Mention the `org-capture-last-stored'
bookmark as a way to jump to the last stored capture.
* org.texi (Uploading files): Fix typo.
* org.texi (Using capture): Document `C-0' as a prefix argument
for `org-capture'.
* org.texi (Agenda commands): Document persistent marks.
* org.texi (Template expansion): Update doc to reflect change.
* org.texi (Radio tables): Document the :no-escape parameter.
* org.texi (Repeated tasks): Document repeat cookies for years,
months, weeks, days and hours.
* org.texi (Export options): State that you can use the d: option
by specifying a list of drawers.
* org.texi (HTML preamble and postamble): Small doc improvement.
2012-09-30 Brian van den Broek <vanden@gmail.com> (tiny change)
* org.texi: The sections in the Exporting section of the manual
left out articles in the description of the org-export-as-*
commands, among other places. This patch adds them, adds a few
missing prepositions, and switches instances of "an HTML" to "a
html" for internal consistency.
* org.texi: Alter several examples of headings with timestamps in
them to include the timestamps in the body instead of the heading.
2012-09-30 Carsten Dominik <carsten.dominik@gmail.com>
* org.texi (Agenda dispatcher): Document sticky agenda views and
the new key for them.
2012-09-30 Charles <millarc@verizon.net> (tiny change)
* org.texi (Advanced features): Fix error in table.
2012-09-30 Feng Shu <tumashu@gmail.com>
* org.texi (@LaTeX{} fragments): Document imagemagick as an
alternative to dvipng.
2012-09-30 François Allisson <francois@allisson.co> (tiny change)
* org.texi: Remove extra curly bracket.
2012-09-30 Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> (tiny change)
* org.texi (org-clock-in-last and org-clock-cancel): Update the
defkeys.
2012-09-30 Ippei FURUHASHI <top.tuna+orgmode@gmail.com> (tiny change)
* org.texi (Agenda commands): Fix two typos by giving
corresponding function names, according to
`org-agenda-view-mode-dispatch'.
2012-09-30 Jan Bäcker <jan.boecker@jboecker.de>
* org.texi (The spreadsheet): Fix typo.
2012-09-30 Memnon Anon <gegendosenfleisch@gmail.com> (tiny change)
* org.texi (Tracking your habits): Point to the "Tracking TODO
state changes" section.
2012-09-30 Nicolas Goaziou <n.goaziou@gmail.com>
* org.texi (Literal examples): Remove reference to unknown
`org-export-latex-minted' variable. Also simplify footnote since
`org-export-latex-listings' documentation is exhaustive already.
* org.texi (Plain lists): Remove reference to now hard-coded
`bullet' automatic rule.
2012-09-30 Toby S. Cubitt <tsc25@cantab.net>
* org.texi: Updated documentation accordingly.
2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
* texinfo.tex: Merge from gnulib.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -256,6 +256,7 @@
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
<text:sequence-decl text:display-outline-level="0" text:name="Equation"/>
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
<text:sequence-decl text:display-outline-level="0" text:name="Listing"/>
</text:sequence-decls>
</office:text>
</office:body>
......
......@@ -319,6 +319,11 @@
<style:style style:name="Table" style:family="paragraph" style:parent-style-name="Caption" style:class="extra">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
</style:style>
<style:style style:name="Listing" style:family="paragraph" style:parent-style-name="Caption" style:class="extra">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" fo:keep-with-next="always">
<style:tab-stops/>
</style:paragraph-properties>
</style:style>
<style:style style:name="Horizontal_20_Line" style:display-name="Horizontal Line" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="html">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.499cm" style:border-line-width-bottom="0.002cm 0.035cm 0.002cm" fo:padding="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.039cm double #808080" text:number-lines="false" text:line-number="0" style:join-border="false"/>
<style:text-properties fo:font-size="6pt" style:font-size-asian="6pt" style:font-size-complex="6pt"/>
......
This diff was suppressed by a .gitattributes entry.
% Reference Card for Org Mode
\def\orgversionnumber{7.8.11}
\def\orgversionnumber{7.9}
\def\versionyear{2012} % latest update
\input emacsver.tex
......
This diff is collapsed.
......@@ -88,9 +88,7 @@ or `org-babel-execute:C++'."
(cond
((equal org-babel-c-variant 'c) ".c")
((equal org-babel-c-variant 'cpp) ".cpp"))))
(tmp-bin-file (org-babel-temp-file
"C-bin-"
(if (equal system-type 'windows-nt) ".exe" "")))
(tmp-bin-file (org-babel-temp-file "C-bin-" org-babel-exeext))
(cmdline (cdr (assoc :cmdline params)))
(flags (cdr (assoc :flags params)))
(full-body (org-babel-C-expand body params))
......
......@@ -39,24 +39,48 @@
(declare-function ess-make-buffer-current "ext:ess-inf" ())
(declare-function ess-eval-buffer "ext:ess-inf" (vis))
(declare-function org-number-sequence "org-compat" (from &optional to inc))
(defconst org-babel-header-arg-names:R
'(width height bg units pointsize antialias quality compression
res type family title fonts version paper encoding
pagecentre colormodel useDingbats horizontal)
(declare-function org-remove-if-not "org" (predicate seq))
(defconst org-babel-header-args:R
'((width . :any)
(height . :any)
(bg . :any)
(units . :any)
(pointsize . :any)
(antialias . :any)
(quality . :any)
(compression . :any)
(res . :any)
(type . :any)
(family . :any)
(title . :any)
(fonts . :any)
(version . :any)
(paper . :any)
(encoding . :any)
(pagecentre . :any)
(colormodel . :any)
(useDingbats . :any)
(horizontal . :any)
(results . ((file list vector table scalar verbatim)
(raw org html latex code pp wrap)
(replace silent append prepend)
(output value graphics))))
"R-specific header arguments.")
(defvar org-babel-default-header-args:R '())
(defvar org-babel-R-command "R --slave --no-save"
"Name of command to use for executing R code.")
(defcustom org-babel-R-command "R --slave --no-save"
"Name of command to use for executing R code."
:group 'org-babel
:version "24.1"
:type 'string)
(defvar ess-local-process-name)
(defvar ess-local-process-name) ; dynamically scoped
(defun org-babel-edit-prep:R (info)
(let ((session (cdr (assoc :session (nth 2 info)))))
(when (and session (string-match "^\\*\\(.+?\\)\\*$" session))
(save-match-data (org-babel-R-initiate-session session nil))
(setq ess-local-process-name (match-string 1 session)))))
(save-match-data (org-babel-R-initiate-session session nil)))))
(defun org-babel-expand-body:R (body params &optional graphics-file)
"Expand BODY according to PARAMS, return the expanded body."
......@@ -120,7 +144,7 @@ This function is called by `org-babel-execute-src-block'."
;; helper functions
(defun org-babel-variable-assignments:R (params)
"Return list of R statements assigning the block's variables"
"Return list of R statements assigning the block's variables."
(let ((vars (mapcar #'cdr (org-babel-get-header params :var))))
(mapcar
(lambda (pair)
......@@ -146,25 +170,45 @@ This function is called by `org-babel-execute-src-block'."
(defun org-babel-R-assign-elisp (name value colnames-p rownames-p)
"Construct R code assigning the elisp VALUE to a variable named NAME."
(if (listp value)
(let ((transition-file (org-babel-temp-file "R-import-")))
(let ((max (apply #'max (mapcar #'length (org-remove-if-not
#'sequencep value))))
(min (apply #'min (mapcar #'length (org-remove-if-not
#'sequencep value))))
(transition-file (org-babel-temp-file "R-import-")))
;; ensure VALUE has an orgtbl structure (depth of at least 2)
(unless (listp (car value)) (setq value (list value)))
(with-temp-file transition-file
(insert (orgtbl-to-tsv value '(:fmt org-babel-R-quote-tsv-field)))
(insert "\n"))
(format "%s <- read.table(\"%s\", header=%s, row.names=%s, sep=\"\\t\", as.is=TRUE)"
name (org-babel-process-file-name transition-file 'noquote)
(if (or (eq (nth 1 value) 'hline) colnames-p) "TRUE" "FALSE")
(if rownames-p "1" "NULL")))
(insert
(orgtbl-to-tsv value '(:fmt org-babel-R-quote-tsv-field))
"\n"))
(let ((file (org-babel-process-file-name transition-file 'noquote))
(header (if (or (eq (nth 1 value) 'hline) colnames-p)
"TRUE" "FALSE"))
(row-names (if rownames-p "1" "NULL")))
(if (= max min)
(format "%s <- read.table(\"%s\",
header=%s,
row.names=%s,
sep=\"\\t\",
as.is=TRUE)" name file header row-names)
(format "%s <- read.table(\"%s\",
header=%s,
row.names=%s,
sep=\"\\t\",
as.is=TRUE,
fill=TRUE,
col.names = paste(\"V\", seq_len(%d), sep =\"\"))"
name file header row-names max))))
(format "%s <- %s" name (org-babel-R-quote-tsv-field value))))
(defvar ess-ask-for-ess-directory nil)
(defvar ess-ask-for-ess-directory) ; dynamically scoped
(defun org-babel-R-initiate-session (session params)
"If there is not a current R process then create one."
(unless (string= session "none")
(let ((session (or session "*R*"))
(ess-ask-for-ess-directory
(and ess-ask-for-ess-directory (not (cdr (assoc :dir params))))))
(and (and (boundp 'ess-ask-for-ess-directory) ess-ask-for-ess-directory)
(not (cdr (assoc :dir params))))))
(if (org-babel-comint-buffer-livep session)
session
(save-window-excursion
......@@ -177,7 +221,6 @@ This function is called by `org-babel-execute-src-block'."
(buffer-name))))
(current-buffer))))))
(defvar ess-local-process-name nil)
(defun org-babel-R-associate-session (session)
"Associate R code buffer with an R session.
Make SESSION be the inferior ESS process associated with the
......@@ -219,7 +262,7 @@ current code buffer."
(setq args (mapconcat
(lambda (pair)
(if (member (car pair) allowed-args)
(format ",%s=%s"
(format ",%s=%S"
(substring (symbol-name (car pair)) 1)
(cdr pair)) ""))
params ""))
......
......@@ -88,7 +88,7 @@ Asymptote does not support sessions"
(error "Asymptote does not support sessions"))
(defun org-babel-variable-assignments:asymptote (params)
"Return list of asymptote statements assigning the block's variables"
"Return list of asymptote statements assigning the block's variables."
(mapcar #'org-babel-asymptote-var-to-asymptote
(mapcar #'cdr (org-babel-get-header params :var))))
......
......@@ -33,6 +33,7 @@
;;; Code:
(require 'ob)
(require 'ob-eval)
(require 'org-compat)
(eval-when-compile (require 'cl))
(declare-function org-babel-ref-resolve "ob-ref" (ref))
......@@ -96,13 +97,13 @@ called by `org-babel-execute-src-block'"
(defun org-babel-awk-var-to-awk (var &optional sep)
"Return a printed value of VAR suitable for parsing with awk."
(flet ((echo-var (v) (if (stringp v) v (format "%S" v))))
(let ((echo-var (lambda (v) (if (stringp v) v (format "%S" v)))))
(cond
((and (listp var) (listp (car var)))
(orgtbl-to-generic var (list :sep (or sep "\t") :fmt #'echo-var)))
(orgtbl-to-generic var (list :sep (or sep "\t") :fmt echo-var)))
((listp var)
(mapconcat #'echo-var var "\n"))
(t (echo-var var)))))
(mapconcat echo-var var "\n"))
(t (funcall echo-var var)))))
(defun org-babel-awk-table-or-string (results)
"If the results look like a table, then convert them into an
......
......@@ -71,16 +71,16 @@
(cond
((numberp res) res)
((math-read-number res) (math-read-number res))
((listp res) (error "calc error \"%s\" on input \"%s\""
((listp res) (error "Calc error \"%s\" on input \"%s\""
(cadr res) line))
(t (replace-regexp-in-string
"'\\[" "["
"'" ""
(calc-eval
(math-evaluate-expr
;; resolve user variables, calc built in
;; variables are handled automatically
;; upstream by calc
(mapcar #'ob-calc-maybe-resolve-var
(mapcar #'org-babel-calc-maybe-resolve-var
;; parse line into calc objects
(car (math-read-exprs line)))))))))
(calc-eval line))))))))
......@@ -91,14 +91,14 @@
(calc-eval (calc-top 1)))))
(defvar var-syms) ; Dynamically scoped from org-babel-execute:calc
(defun ob-calc-maybe-resolve-var (el)
(defun org-babel-calc-maybe-resolve-var (el)
(if (consp el)
(if (and (equal 'var (car el)) (member (cadr el) var-syms))
(progn
(calc-recall (cadr el))
(prog1 (calc-top 1)
(calc-pop 1)))
(mapcar #'ob-calc-maybe-resolve-var el))
(mapcar #'org-babel-calc-maybe-resolve-var el))
el))
(provide 'ob-calc)
......
......@@ -45,7 +45,7 @@
(add-to-list 'org-babel-tangle-lang-exts '("clojure" . "clj"))
(defvar org-babel-default-header-args:clojure '())
(defvar org-babel-header-arg-names:clojure '(package))
(defvar org-babel-header-args:clojure '((package . :any)))
(defun org-babel-expand-body:clojure (body params)
"Expand BODY according to PARAMS, return the expanded body."
......
......@@ -31,6 +31,7 @@
;;; Code:
(require 'ob)
(require 'org-compat)
(require 'comint)
(eval-when-compile (require 'cl))
(declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body))
......@@ -50,7 +51,7 @@ executed inside the protection of `save-excursion' and
`(save-excursion
(save-match-data
(unless (org-babel-comint-buffer-livep ,buffer)
(error "buffer %s doesn't exist or has no process" ,buffer))
(error "Buffer %s does not exist or has no process" ,buffer))
(set-buffer ,buffer)
,@body)))
(def-edebug-spec org-babel-comint-in-buffer (form body))
......@@ -74,10 +75,10 @@ or user `keyboard-quit' during execution of body."
(full-body (cadr (cdr (cdr meta)))))
`(org-babel-comint-in-buffer ,buffer
(let ((string-buffer "") dangling-text raw)
(flet ((my-filt (text)
(setq string-buffer (concat string-buffer text))))
;; setup filter
(add-hook 'comint-output-filter-functions 'my-filt)
(setq comint-output-filter-functions
(cons (lambda (text) (setq string-buffer (concat string-buffer text)))
comint-output-filter-functions))
(unwind-protect
(progn
;; got located, and save dangling text
......@@ -106,7 +107,8 @@ or user `keyboard-quit' during execution of body."
(goto-char (process-mark (get-buffer-process (current-buffer))))
(insert dangling-text))
;; remove filter
(remove-hook 'comint-output-filter-functions 'my-filt)))
(setq comint-output-filter-functions
(cdr comint-output-filter-functions)))
;; remove echo'd FULL-BODY from input
(if (and ,remove-echo ,full-body
(string-match
......@@ -145,7 +147,7 @@ statement (not large blocks of code)."
Don't return until FILE exists. Code in STRING must ensure that
FILE exists at end of evaluation."
(unless (org-babel-comint-buffer-livep buffer)
(error "buffer %s doesn't exist or has no process" buffer))
(error "Buffer %s does not exist or has no process" buffer))
(if (file-exists-p file) (delete-file file))
(process-send-string
(get-buffer-process buffer)
......
......@@ -34,15 +34,28 @@
;; 3) we are adding the "file" and "cmdline" header arguments
;;
;; 4) there are no variables (at least for now)
;;
;; 5) it depends on a variable defined in org-exp-blocks (namely
;; `org-ditaa-jar-path') so be sure you have org-exp-blocks loaded
;;; Code:
(require 'ob)
(defvar org-ditaa-jar-path) ;; provided by org-exp-blocks
(defvar org-babel-default-header-args:ditaa
'((:results . "file") (:exports . "results") (:java . "-Dfile.encoding=UTF-8"))
'((:results . "file")
(:exports . "results")
(:java . "-Dfile.encoding=UTF-8"))
"Default arguments for evaluating a ditaa source block.")
(defvar org-ditaa-jar-path)
(defcustom org-ditaa-jar-option "-jar"
"Option for the ditaa jar file.
Do not leave leading or trailing spaces in this string."
:group 'org-babel
:version "24.1"
:type 'string)
(defun org-babel-execute:ditaa (body params)
"Execute a block of Ditaa code with org-babel.
This function is called by `org-babel-execute-src-block'."
......@@ -55,7 +68,7 @@ This function is called by `org-babel-execute-src-block'."
(cmdline (cdr (assoc :cmdline params)))
(java (cdr (assoc :java params)))
(in-file (org-babel-temp-file "ditaa-"))
(cmd (concat "java " java " -jar "
(cmd (concat "java " java " " org-ditaa-jar-option " "
(shell-quote-argument
(expand-file-name org-ditaa-jar-path))
" " cmdline
......
......@@ -64,7 +64,8 @@
"Execute a block of Dot code with org-babel.
This function is called by `org-babel-execute-src-block'."
(let* ((result-params (cdr (assoc :result-params params)))
(out-file (cdr (assoc :file params)))
(out-file (cdr (or (assoc :file params)
(error "You need to specify a :file parameter"))))
(cmdline (or (cdr (assoc :cmdline params))
(format "-T%s" (file-name-extension out-file))))
(cmd (or (cdr (assoc :cmd params)) "dot"))
......
......@@ -32,10 +32,18 @@
(defvar org-current-export-file)
(defvar org-babel-lob-one-liner-regexp)
(defvar org-babel-ref-split-regexp)
(defvar org-list-forbidden-blocks)
(declare-function org-babel-lob-get-info "ob-lob" ())
(declare-function org-babel-eval-wipe-error-buffer "ob-eval" ())
(add-to-list 'org-export-interblocks '(src org-babel-exp-non-block-elements))
(declare-function org-heading-components "org" ())
(declare-function org-link-search "org" (s &optional type avoid-pos stealth))
(declare-function org-fill-template "org" (template alist))
(declare-function org-in-verbatim-emphasis "org" ())
(declare-function org-in-block-p "org" (names))
(declare-function org-between-regexps-p "org" (start-re end-re &optional lim-up lim-down))
(add-to-list 'org-export-interblocks '(src org-babel-exp-non-block-elements))
(org-export-blocks-add-block '(src org-babel-exp-src-block nil))
(defcustom org-export-babel-evaluate t
......@@ -47,28 +55,33 @@ process."
:type 'boolean)
(put 'org-export-babel-evaluate 'safe-local-variable (lambda (x) (eq x nil)))
(defun org-babel-exp-get-export-buffer ()
"Return the current export buffer if possible."
(cond
((bufferp org-current-export-file) org-current-export-file)
(org-current-export-file (get-file-buffer org-current-export-file))
('otherwise
(error "Requested export buffer when `org-current-export-file' is nil"))))
(defmacro org-babel-exp-in-export-file (lang &rest body)
(declare (indent 1))
`(let* ((lang-headers (intern (concat "org-babel-default-header-args:" ,lang)))
(heading (nth 4 (ignore-errors (org-heading-components))))
(link (when org-current-export-file
(org-make-link-string