Commit 3c8b09ca authored by Bastien Guerry's avatar Bastien Guerry

Merge Org version 8.2.5c.

parent 2b6b4f20
2013-01-07 Rasmus <w530@pank.eu>
* misc/org.texi (Global and local cycling): Fix missing '@'.
2013-01-07 Bastien Guerry <bzg@gnu.org>
* misc/org.texi (Global and local cycling): Mention C-u C-u TAB.
(Include files, The Export Dispatcher)
(Advanced configuration)
(Header arguments in Org mode properties): Spelling fixes.
(Special blocks): Add #+BEGIN_ABSTRACT as another example.
(@LaTeX{} specific attributes): New index entries. Use
#+BEGIN_ABSTRACT in the example.
2013-01-07 Nicolas Goaziou <n.goaziou@gmail.com>
* misc/org.texi (Org export): New section.
(HTML doctypes): Fix whitespace error. Fix display.
(Publishing options): Add missing html publishing options.
2014-01-07 Glenn Morris <rgm@gnu.org>
* efaq.texi (Basic editing, Packages that do not come with Emacs):
......
......@@ -2,7 +2,8 @@
@c %**start of header
@setfilename ../../info/org
@settitle The Org Manual
@set VERSION 8.2.4
@include org-version.inc
@c Use proper quote and backtick for code sections in PDF output
@c Cf. Texinfo manual 14.2
......@@ -280,7 +281,7 @@ modify this GNU manual.''
@dircategory Emacs editing modes
@direntry
* Org Mode: (org). Outline-based notes management and organizer.
* Org Mode: (org). Outline-based notes management and organizer
@end direntry
@titlepage
......@@ -588,6 +589,7 @@ Exporting
* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
* Markdown export:: Exporting to Markdown
* OpenDocument Text export:: Exporting to OpenDocument Text
* Org export:: Exporting to Org
* iCalendar export:: Exporting to iCalendar
* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org
* Export in foreign buffers:: Author tables in lists in Org syntax
......@@ -1283,6 +1285,9 @@ When @kbd{S-@key{TAB}} is called with a numeric prefix argument N, the
CONTENTS view up to headlines of level N will be shown. Note that inside
tables, @kbd{S-@key{TAB}} jumps to the previous field.
@cindex set startup visibility, command
@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility}
Switch back to the startup visibility of the buffer (@pxref{Initial visibility}).
@cindex show all, command
@orgcmd{C-u C-u C-u @key{TAB},show-all}
Show all, including drawers.
......@@ -10313,12 +10318,19 @@ Org syntax includes pre-defined blocks (@pxref{Paragraphs} and @ref{Literal
examples}). It is also possible to create blocks containing raw code
targeted at a specific back-ends (e.g., @samp{#+BEGIN_LATEX}).
Any other block is a @emph{special block}. Each export back-end decides if
they should be exported, and how. When the block is ignored, its contents
are still exported, as if the block were not there. For example, when
exporting a @samp{#+BEGIN_TEST} block, HTML back-end wraps its contents
within @samp{<div name="test">} tag. Refer to back-end specific
documentation for more information.
Any other block is a @emph{special block}.
For example, @samp{#+BEGIN_ABSTRACT} and @samp{#+BEGIN_VIDEO} are special
blocks. The first one is useful when exporting to @LaTeX{}, the second one
when exporting to HTML5.
Each export back-end decides if they should be exported, and how. When the
block is ignored, its contents are still exported, as if the opening and
closing block lines were not there. For example, when exporting a
@samp{#+BEGIN_TEST} block, HTML back-end wraps its contents within a
@samp{<div name="test">} tag.
Refer to back-end specific documentation for more information.
@node Exporting, Publishing, Markup, Top
@chapter Exporting
......@@ -10350,6 +10362,7 @@ in the iCalendar format.
* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
* Markdown export:: Exporting to Markdown
* OpenDocument Text export:: Exporting to OpenDocument Text
* Org export:: Exporting to Org
* iCalendar export:: Exporting to iCalendar
* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org
* Export in foreign buffers:: Author tables in lists in Org syntax
......@@ -10449,6 +10462,7 @@ Built-in back-ends include:
@item man (Man page format)
@item md (Markdown format)
@item odt (OpenDocument Text format)
@item org (Org format)
@item texinfo (Texinfo format)
@end itemize
......@@ -11107,12 +11121,12 @@ Becomes:
@end example
Special blocks that do not correspond to HTML5 elements (see
@code{org-html-html5-elements}) will revert to the usual behavior,
i.e. #+BEGIN_LEDERHOSEN will still export to <div class=''lederhosen''>.
@code{org-html-html5-elements}) will revert to the usual behavior, i.e.,
@code{#+BEGIN_LEDERHOSEN} will still export to @samp{<div class="lederhosen">}.
Headlines cannot appear within special blocks. To wrap a headline and its
contents in e.g. <section> or <article> tags, set the @code{HTML_CONTAINER}
property on the headline itself.
contents in e.g., @samp{<section>} or @samp{<article>} tags, set the
@code{HTML_CONTAINER} property on the headline itself.
@node HTML preamble and postamble, Quoting HTML tags, HTML doctypes, HTML export
@subsection HTML preamble and postamble
......@@ -11791,12 +11805,18 @@ Code that may not fit in a single page.
@subsubheading Special blocks in @LaTeX{} export
@cindex special blocks, in @LaTeX{} export
@cindex abstract, in @LaTeX{} export
@cindex proof, in @LaTeX{} export
In @LaTeX{} back-end, special blocks become environments of the same name.
Value of @code{:options} attribute will be appended as-is to that
environment's opening string. For example:
@example
#+BEGIN_ABSTRACT
We demonstrate how to solve the Syracuse problem.
#+END_ABSTRACT
#+ATTR_LATEX: :options [Proof of important theorem]
#+BEGIN_PROOF
...
......@@ -11808,6 +11828,10 @@ Therefore, any even number greater than 2 is the sum of two primes.
becomes
@example
\begin@{abstract@}
We demonstrate how to solve the Syracuse problem.
\end@{abstract@}
\begin@{proof@}[Proof of important theorem]
...
Therefore, any even number greater than 2 is the sum of two primes.
......@@ -11872,7 +11896,7 @@ that one (@pxref{Export settings}).
@c begin opendocument
@node OpenDocument Text export, iCalendar export, Markdown export, Exporting
@node OpenDocument Text export, Org export, Markdown export, Exporting
@section OpenDocument Text export
@cindex ODT
@cindex OpenDocument
......@@ -12789,7 +12813,28 @@ will take care of updating the @code{rng-schema-locating-files} for you.
@c end opendocument
@node iCalendar export, Other built-in back-ends, OpenDocument Text export, Exporting
@node Org export
@section Org export
@cindex Org export
@code{org} export back-end creates a normalized version of the Org document
in current buffer. In particular, it evaluates Babel code (@pxref{Evaluating
code blocks}) and removes other back-ends specific contents.
@subheading Org export commands
@table @kbd
@orgcmd{C-c C-e O o,org-org-export-to-org}
Export as an Org document. For an Org file, @file{myfile.org}, the resulting
file will be @file{myfile.org.org}. The file will be overwritten without
warning.
@orgcmd{C-c C-e O O,org-org-export-as-org}
Export to a temporary buffer. Do not create a file.
@item C-c C-e O v
Export to an Org file, then open it.
@end table
@node iCalendar export, Other built-in back-ends, Org export, Exporting
@section iCalendar export
@cindex iCalendar export
......@@ -12868,7 +12913,6 @@ On top of the aforementioned back-ends, Org comes with other built-in ones:
@itemize
@item @file{ox-man.el}: export to a man page.
@item @file{ox-texinfo.el}: export to @code{Texinfo} format.
@item @file{ox-org.el}: export to an Org document.
@end itemize
To activate these export back-end, customize @code{org-export-backends} or
......@@ -13314,10 +13358,13 @@ string of these options for details.
@end multitable
@vindex org-html-doctype
@vindex org-html-container-element
@vindex org-html-html5-fancy
@vindex org-html-xml-declaration
@vindex org-html-link-up
@vindex org-html-link-home
@vindex org-html-link-org-files-as-html
@vindex org-html-link-use-abs-url
@vindex org-html-head
@vindex org-html-head-extra
@vindex org-html-inline-images
......@@ -13325,21 +13372,26 @@ string of these options for details.
@vindex org-html-preamble
@vindex org-html-postamble
@vindex org-html-table-default-attributes
@vindex org-html-table-row-tags
@vindex org-html-head-include-default-style
@vindex org-html-head-include-scripts
@multitable @columnfractions 0.32 0.68
@item @code{:html-doctype} @tab @code{org-html-doctype}
@item @code{:html-container} @tab @code{org-html-container-element}
@item @code{:html-html5-fancy} @tab @code{org-html-html5-fancy}
@item @code{:html-xml-declaration} @tab @code{org-html-xml-declaration}
@item @code{:html-link-up} @tab @code{org-html-link-up}
@item @code{:html-link-home} @tab @code{org-html-link-home}
@item @code{:html-link-org-as-html} @tab @code{org-html-link-org-files-as-html}
@item @code{:html-link-use-abs-url} @tab @code{org-html-link-use-abs-url}
@item @code{:html-head} @tab @code{org-html-head}
@item @code{:html-head-extra} @tab @code{org-html-head-extra}
@item @code{:html-inline-images} @tab @code{org-html-inline-images}
@item @code{:html-extension} @tab @code{org-html-extension}
@item @code{:html-preamble} @tab @code{org-html-preamble}
@item @code{:html-postamble} @tab @code{org-html-postamble}
@item @code{:html-table-attributes} @tab @code{org-html-table-default-attributes}
@item @code{:html-table-attributes} @tab @code{org-html-table-default-attributes}
@item @code{:html-table-row-tags} @tab @code{org-html-table-row-tags}
@item @code{:html-head-include-default-style} @tab @code{org-html-head-include-default-style}
@item @code{:html-head-include-scripts} @tab @code{org-html-head-include-scripts}
@end multitable
......
% Reference Card for Org Mode
\def\orgversionnumber{8.2.4}
\def\versionyear{2013} % latest update
\input emacsver.tex
\def\orgversionnumber{8.2}
\def\versionyear{2014} % latest update
\def\year{2014} % latest copyright year
%**start of header
\newcount\columnsperpage
......
2013-01-07 Bastien Guerry <bzg@gnu.org>
* org-clock.el (org-clock-cancel-hook)
(org-clock-leftover-time): Fix typo in docstring.
* ox-odt.el (org-odt--frame): Add a draw:name property to the
draw:frame tag.
(org-odt-format-label): Don't use short-caption at all.
* org-rmail.el (org-rmail-follow-link): Don't raise an error when
no article is matched.
* org.el (org-set-tags): Ignore invisible text when restoring
cursor position.
(org-refile-get-location): Check for a refile position when the
position is not nil, otherwise allow to create the parent node if
the user requests it.
(org-refile-allow-creating-parent-nodes): Fix typo in
docstring.
(org-entry-get): Minor docstring enhancement.
(org-set-startup-visibility): Bugfix.
(org-shiftcontrolup, org-shiftcontroldown): When
`org-support-shift-select' is not `nil', let-bind it to nil if
point is on a clock log. Otherwise throw an error.
* ob-lob.el (org-babel-lob-files): Fix custom type.
(org-babel-lob-ingest): Small docstring fix.
* org-agenda.el (org-cmp-ts): Fix bug: interpret `late' as
`later than any date' instead of `later than today'.
* org.el (org-do-emphasis-faces): Handle false positives by
restarting the re-search one char after the beginning of the
match, not one char before its ending.
(org-entry-put): Check that the value provided is a string. If it
is nil, convert it to the empty string.
* ob-latex.el (org-babel-latex-htlatex-packages): Use repeat
instead of list as the defcustom type.
* ox.el (org-export-with-creator):
* org.el (org-loop-over-headlines-in-active-region)
(org-mouse-1-follows-link, org-provide-todo-statistics):
* org-agenda.el (org-agenda-custom-commands-local-options)
(org-agenda-start-with-log-mode)
(org-agenda-show-inherited-tags): Don't quote const values.
* ox-texinfo.el (org-texinfo-def-table-markup):
* org-inlinetask.el (org-inlinetask-show-first-star):
* ob-maxima.el (org-babel-maxima-command): Add type.
* org-table.el (org-table-fix-formulas): Handle multiple
#+tblfm: lines.
* ox.el (org-export-to-file): Fix typo in docstring.
* org.el (org-self-insert-command)
(orgtbl-self-insert-command): Change the value of the
`delete-selection' property to allow other commands like
`electric-pair-will-use-region' to be run before deletion.
* org-attach.el (vc-git): Require.
(org-attach-commit): Check whether git is installed.
2013-01-07 Nicolas Goaziou <n.goaziou@gmail.com>
* ox-icalendar.el (org-icalendar--combine-files): Make sure
anniversaries do not end up in *Message* buffer instead of the ICS
file.
* ox-html.el: Clean up "FIXME" comments.
* ox-publish.el (org-publish-resolve-external-fuzzy-link): Fix
docstring.
* ox.el (org-export-smart-quotes-regexps): Fix smart quote
detection when it is followed by an open parenthesis syntax class.
* org-element.el (org-element-inline-babel-call-successor): Use
original regexp to stay up-to-date with Babel changes.
(org-element--affiliated-re): Fix affiliated keyword regexp.
* ox-org.el (org-org-identity): Since back-end specific keywords
are stripped from output, also remove attr_backend keywords.
(org-babel-exp-process-buffer): Fix duplicate evaluation with
:wrap src.
(org-babel-exp-non-block-elements): Removed function.
2013-01-07 Ted Wiles <thewiles@wharton.upenn.edu> (tiny change)
* org-habit.el (org-habit-parse-todo): Match all TODO keywords,
not just "TODO".
2013-01-07 U-usuario <rbenit68@yahoo.es> (tiny change)
* ob-gnuplot.el (org-babel-gnuplot-quote-tsv-field): Fix code
typo.
2013-01-07 Vladimir Lomov <lomov.vl@gmail.com> (tiny change)
* ox-html.el (org-html-style-default): New classes caption.t-above
and caption.t-bottom.
(org-html-table): Use new classes.
2013-12-23 Chong Yidong <cyd@gnu.org>
* org.el (orgstruct-make-binding): Call set-transient-map instead
......@@ -150,19 +150,17 @@ this template."
:type 'string)
(defvar org-babel-default-lob-header-args)
(defun org-babel-exp-non-block-elements (start end)
"Process inline source and call lines between START and END for export."
(defun org-babel-exp-process-buffer ()
"Execute all Babel blocks in current buffer."
(interactive)
(save-excursion
(goto-char start)
(unless (markerp end)
(let ((m (make-marker)))
(set-marker m end (current-buffer))
(setq end m)))
(let ((rx (concat "\\(?:" org-babel-inline-src-block-regexp
"\\|" org-babel-lob-one-liner-regexp "\\)")))
(while (re-search-forward rx end t)
(save-excursion
(save-window-excursion
(save-excursion
(let ((case-fold-search t)
(regexp (concat org-babel-inline-src-block-regexp "\\|"
org-babel-lob-one-liner-regexp "\\|"
"^[ \t]*#\\+BEGIN_SRC")))
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(let* ((element (save-excursion
;; If match is inline, point is at its
;; end. Move backward so
......@@ -170,145 +168,117 @@ this template."
;; object, not the following one.
(backward-char)
(save-match-data (org-element-context))))
(type (org-element-type element)))
(when (memq type '(babel-call inline-babel-call inline-src-block))
(let ((beg-el (org-element-property :begin element))
(end-el (org-element-property :end element)))
(case type
(inline-src-block
(let* ((info (org-babel-parse-inline-src-block-match))
(params (nth 2 info)))
(setf (nth 1 info)
(if (and (cdr (assoc :noweb params))
(string= "yes" (cdr (assoc :noweb params))))
(org-babel-expand-noweb-references
info (org-babel-exp-get-export-buffer))
(nth 1 info)))
(goto-char beg-el)
(let ((replacement (org-babel-exp-do-export info 'inline)))
(if (equal replacement "")
;; Replacement code is empty: completely
;; remove inline src block, including extra
;; white space that might have been created
;; when inserting results.
(delete-region beg-el
(progn (goto-char end-el)
(skip-chars-forward " \t")
(point)))
;; Otherwise: remove inline src block but
;; preserve following white spaces. Then
;; insert value.
(delete-region beg-el
(progn (goto-char end-el)
(skip-chars-backward " \t")
(point)))
(insert replacement)))))
((babel-call inline-babel-call)
(let* ((lob-info (org-babel-lob-get-info))
(results
(org-babel-exp-do-export
(list "emacs-lisp" "results"
(apply #'org-babel-merge-params
org-babel-default-header-args
org-babel-default-lob-header-args
(append
(org-babel-params-from-properties)
(list
(org-babel-parse-header-arguments
(org-no-properties
(concat
":var results="
(mapconcat 'identity
(butlast lob-info 2)
" ")))))))
"" (nth 3 lob-info) (nth 2 lob-info))
'lob))
(rep (org-fill-template
org-babel-exp-call-line-template
`(("line" . ,(nth 0 lob-info))))))
;; If replacement is empty, completely remove the
;; object/element, including any extra white space
;; that might have been created when including
;; results.
(if (equal rep "")
(delete-region
beg-el
(progn (goto-char end-el)
(if (not (eq type 'babel-call))
(progn (skip-chars-forward " \t") (point))
(skip-chars-forward " \r\t\n")
(line-beginning-position))))
;; Otherwise, preserve following white
;; spaces/newlines and then, insert replacement
;; string.
(goto-char beg-el)
(type (org-element-type element))
(beg-el (org-element-property :begin element))
(end-el (org-element-property :end element)))
(case type
(inline-src-block
(let* ((info (org-babel-parse-inline-src-block-match))
(params (nth 2 info)))
(setf (nth 1 info)
(if (and (cdr (assoc :noweb params))
(string= "yes" (cdr (assoc :noweb params))))
(org-babel-expand-noweb-references
info (org-babel-exp-get-export-buffer))
(nth 1 info)))
(goto-char beg-el)
(let ((replacement (org-babel-exp-do-export info 'inline)))
(if (equal replacement "")
;; Replacement code is empty: remove inline src
;; block, including extra white space that
;; might have been created when inserting
;; results.
(delete-region beg-el
(progn (goto-char end-el)
(skip-chars-backward " \r\t\n")
(skip-chars-forward " \t")
(point)))
(insert rep)))))))))))))
(defvar org-src-preserve-indentation) ; From org-src.el
(defun org-babel-exp-process-buffer ()
"Execute all blocks in visible part of buffer."
(interactive)
(save-window-excursion
(let ((case-fold-search t)
(pos (point-min)))
(goto-char pos)
(while (re-search-forward "^[ \t]*#\\+BEGIN_SRC" nil t)
(let ((element (save-match-data (org-element-at-point))))
(when (eq (org-element-type element) 'src-block)
(let* ((match-start (copy-marker (match-beginning 0)))
(begin (copy-marker (org-element-property :begin element)))
;; Make sure we don't remove any blank lines after
;; the block when replacing it.
(block-end (save-excursion
(goto-char (org-element-property :end element))
(skip-chars-backward " \r\t\n")
(copy-marker (line-end-position))))
(ind (org-get-indentation))
(headers
(cons
(org-element-property :language element)
(let ((params (org-element-property :parameters element)))
(and params (org-split-string params "[ \t]+"))))))
;; Execute all non-block elements between POS and
;; current block.
(org-babel-exp-non-block-elements pos begin)
;; Take care of matched block: compute replacement
;; string. In particular, a nil REPLACEMENT means the
;; block should be left as-is while an empty string
;; should remove the block.
(let ((replacement (progn (goto-char match-start)
(org-babel-exp-src-block headers))))
(cond ((not replacement) (goto-char block-end))
((equal replacement "")
(delete-region begin
(progn (goto-char block-end)
(skip-chars-forward " \r\t\n")
(if (eobp) (point)
(line-beginning-position)))))
(t
(goto-char match-start)
(delete-region (point) block-end)
(insert replacement)
(if (org-element-property :preserve-indent element)
;; Indent only the code block markers.
(save-excursion (skip-chars-backward " \r\t\n")
(indent-line-to ind)
(goto-char match-start)
(indent-line-to ind))
;; Indent everything.
(indent-rigidly match-start (point) ind)))))
(setq pos (line-beginning-position))
;; Cleanup markers.
(set-marker match-start nil)
(set-marker begin nil)
(set-marker block-end nil)))))
;; Eventually execute all non-block Babel elements between last
;; src-block and end of buffer.
(org-babel-exp-non-block-elements pos (point-max)))))
;; Otherwise: remove inline src block but
;; preserve following white spaces. Then insert
;; value.
(delete-region beg-el
(progn (goto-char end-el)
(skip-chars-backward " \t")
(point)))
(insert replacement)))))
((babel-call inline-babel-call)
(let* ((lob-info (org-babel-lob-get-info))
(results
(org-babel-exp-do-export
(list "emacs-lisp" "results"
(apply #'org-babel-merge-params
org-babel-default-header-args
org-babel-default-lob-header-args
(append
(org-babel-params-from-properties)
(list
(org-babel-parse-header-arguments
(org-no-properties
(concat
":var results="
(mapconcat 'identity
(butlast lob-info 2)
" ")))))))
"" (nth 3 lob-info) (nth 2 lob-info))
'lob))
(rep (org-fill-template
org-babel-exp-call-line-template
`(("line" . ,(nth 0 lob-info))))))
;; If replacement is empty, completely remove the
;; object/element, including any extra white space
;; that might have been created when including
;; results.
(if (equal rep "")
(delete-region
beg-el
(progn (goto-char end-el)
(if (not (eq type 'babel-call))
(progn (skip-chars-forward " \t") (point))
(skip-chars-forward " \r\t\n")
(line-beginning-position))))
;; Otherwise, preserve following white
;; spaces/newlines and then, insert replacement
;; string.
(goto-char beg-el)
(delete-region beg-el
(progn (goto-char end-el)
(skip-chars-backward " \r\t\n")
(point)))
(insert rep))))
(src-block
(let* ((match-start (match-beginning 0))
;; Make sure we don't remove any blank lines
;; after the block when replacing it.
(block-end (save-excursion
(goto-char end-el)
(skip-chars-backward " \r\t\n")
(line-end-position)))
(ind (org-get-indentation))
(headers
(cons
(org-element-property :language element)
(let ((params (org-element-property :parameters element)))
(and params (org-split-string params "[ \t]+"))))))
;; Take care of matched block: compute replacement
;; string. In particular, a nil REPLACEMENT means
;; the block should be left as-is while an empty
;; string should remove the block.
(let ((replacement (progn (goto-char match-start)
(org-babel-exp-src-block headers))))
(cond ((not replacement) (goto-char block-end))
((equal replacement "")
(delete-region beg-el end-el))
(t
(goto-char match-start)
(delete-region (point) block-end)
(insert replacement)
(if (org-element-property :preserve-indent element)
;; Indent only the code block markers.
(save-excursion (skip-chars-backward " \r\t\n")
(indent-line-to ind)
(goto-char match-start)
(indent-line-to ind))
;; Indent everything.
(indent-rigidly match-start (point) ind))))))))))))))
(defun org-babel-in-example-or-verbatim ()
"Return true if point is in example or verbatim code.
......
......@@ -253,7 +253,7 @@ then create one. Return the initialized session. The current
(org-babel-gnuplot-quote-timestamp-field s)
(if (zerop (length s))
(or *org-babel-gnuplot-missing* s)
(if (string-match "[ \"]" "?")
(if (string-match "[ \"]" s)
(concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"")
"\"")
s)))))
......
......@@ -59,7 +59,7 @@
'("[usenames]{color}" "{tikz}" "{color}" "{listings}" "{amsmath}")
"Packages to use for htlatex export."
:group 'org-babel
:type '(list (string)))
:type '(repeat (string)))
(defun org-babel-expand-body:latex (body params)
"Expand BODY according to PARAMS, return the expanded body."
......
......@@ -40,14 +40,13 @@ files to `org-babel-lob-files'.")
To add files to this list use the `org-babel-lob-ingest' command."
:group 'org-babel