Merge Org version 8.2.5c.

This commit is contained in:
Bastien Guerry 2014-01-07 14:22:53 +01:00
parent 2b6b4f204c
commit 3c8b09ca2e
26 changed files with 485 additions and 364 deletions

View file

@ -1,3 +1,23 @@
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> 2014-01-07 Glenn Morris <rgm@gnu.org>
* efaq.texi (Basic editing, Packages that do not come with Emacs): * efaq.texi (Basic editing, Packages that do not come with Emacs):

View file

@ -2,7 +2,8 @@
@c %**start of header @c %**start of header
@setfilename ../../info/org @setfilename ../../info/org
@settitle The Org Manual @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 Use proper quote and backtick for code sections in PDF output
@c Cf. Texinfo manual 14.2 @c Cf. Texinfo manual 14.2
@ -280,7 +281,7 @@ modify this GNU manual.''
@dircategory Emacs editing modes @dircategory Emacs editing modes
@direntry @direntry
* Org Mode: (org). Outline-based notes management and organizer. * Org Mode: (org). Outline-based notes management and organizer
@end direntry @end direntry
@titlepage @titlepage
@ -588,6 +589,7 @@ Exporting
* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF * @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
* Markdown export:: Exporting to Markdown * Markdown export:: Exporting to Markdown
* OpenDocument Text export:: Exporting to OpenDocument Text * OpenDocument Text export:: Exporting to OpenDocument Text
* Org export:: Exporting to Org
* iCalendar export:: Exporting to iCalendar * iCalendar export:: Exporting to iCalendar
* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org * 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 * 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 CONTENTS view up to headlines of level N will be shown. Note that inside
tables, @kbd{S-@key{TAB}} jumps to the previous field. 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 @cindex show all, command
@orgcmd{C-u C-u C-u @key{TAB},show-all} @orgcmd{C-u C-u C-u @key{TAB},show-all}
Show all, including drawers. 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 examples}). It is also possible to create blocks containing raw code
targeted at a specific back-ends (e.g., @samp{#+BEGIN_LATEX}). 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 Any other block is a @emph{special block}.
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 For example, @samp{#+BEGIN_ABSTRACT} and @samp{#+BEGIN_VIDEO} are special
exporting a @samp{#+BEGIN_TEST} block, HTML back-end wraps its contents blocks. The first one is useful when exporting to @LaTeX{}, the second one
within @samp{<div name="test">} tag. Refer to back-end specific when exporting to HTML5.
documentation for more information.
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 @node Exporting, Publishing, Markup, Top
@chapter Exporting @chapter Exporting
@ -10350,6 +10362,7 @@ in the iCalendar format.
* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF * @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
* Markdown export:: Exporting to Markdown * Markdown export:: Exporting to Markdown
* OpenDocument Text export:: Exporting to OpenDocument Text * OpenDocument Text export:: Exporting to OpenDocument Text
* Org export:: Exporting to Org
* iCalendar export:: Exporting to iCalendar * iCalendar export:: Exporting to iCalendar
* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org * 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 * 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 man (Man page format)
@item md (Markdown format) @item md (Markdown format)
@item odt (OpenDocument Text format) @item odt (OpenDocument Text format)
@item org (Org format)
@item texinfo (Texinfo format) @item texinfo (Texinfo format)
@end itemize @end itemize
@ -11107,12 +11121,12 @@ Becomes:
@end example @end example
Special blocks that do not correspond to HTML5 elements (see Special blocks that do not correspond to HTML5 elements (see
@code{org-html-html5-elements}) will revert to the usual behavior, @code{org-html-html5-elements}) will revert to the usual behavior, i.e.,
i.e. #+BEGIN_LEDERHOSEN will still export to <div class=''lederhosen''>. @code{#+BEGIN_LEDERHOSEN} will still export to @samp{<div class="lederhosen">}.
Headlines cannot appear within special blocks. To wrap a headline and its 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} contents in e.g., @samp{<section>} or @samp{<article>} tags, set the
property on the headline itself. @code{HTML_CONTAINER} property on the headline itself.
@node HTML preamble and postamble, Quoting HTML tags, HTML doctypes, HTML export @node HTML preamble and postamble, Quoting HTML tags, HTML doctypes, HTML export
@subsection HTML preamble and postamble @subsection HTML preamble and postamble
@ -11791,12 +11805,18 @@ Code that may not fit in a single page.
@subsubheading Special blocks in @LaTeX{} export @subsubheading Special blocks in @LaTeX{} export
@cindex 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. In @LaTeX{} back-end, special blocks become environments of the same name.
Value of @code{:options} attribute will be appended as-is to that Value of @code{:options} attribute will be appended as-is to that
environment's opening string. For example: environment's opening string. For example:
@example @example
#+BEGIN_ABSTRACT
We demonstrate how to solve the Syracuse problem.
#+END_ABSTRACT
#+ATTR_LATEX: :options [Proof of important theorem] #+ATTR_LATEX: :options [Proof of important theorem]
#+BEGIN_PROOF #+BEGIN_PROOF
... ...
@ -11808,6 +11828,10 @@ Therefore, any even number greater than 2 is the sum of two primes.
becomes becomes
@example @example
\begin@{abstract@}
We demonstrate how to solve the Syracuse problem.
\end@{abstract@}
\begin@{proof@}[Proof of important theorem] \begin@{proof@}[Proof of important theorem]
... ...
Therefore, any even number greater than 2 is the sum of two primes. 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 @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 @section OpenDocument Text export
@cindex ODT @cindex ODT
@cindex OpenDocument @cindex OpenDocument
@ -12789,7 +12813,28 @@ will take care of updating the @code{rng-schema-locating-files} for you.
@c end opendocument @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 @section iCalendar export
@cindex iCalendar export @cindex iCalendar export
@ -12868,7 +12913,6 @@ On top of the aforementioned back-ends, Org comes with other built-in ones:
@itemize @itemize
@item @file{ox-man.el}: export to a man page. @item @file{ox-man.el}: export to a man page.
@item @file{ox-texinfo.el}: export to @code{Texinfo} format. @item @file{ox-texinfo.el}: export to @code{Texinfo} format.
@item @file{ox-org.el}: export to an Org document.
@end itemize @end itemize
To activate these export back-end, customize @code{org-export-backends} or To activate these export back-end, customize @code{org-export-backends} or
@ -13314,10 +13358,13 @@ string of these options for details.
@end multitable @end multitable
@vindex org-html-doctype @vindex org-html-doctype
@vindex org-html-container-element
@vindex org-html-html5-fancy
@vindex org-html-xml-declaration @vindex org-html-xml-declaration
@vindex org-html-link-up @vindex org-html-link-up
@vindex org-html-link-home @vindex org-html-link-home
@vindex org-html-link-org-files-as-html @vindex org-html-link-org-files-as-html
@vindex org-html-link-use-abs-url
@vindex org-html-head @vindex org-html-head
@vindex org-html-head-extra @vindex org-html-head-extra
@vindex org-html-inline-images @vindex org-html-inline-images
@ -13325,14 +13372,18 @@ string of these options for details.
@vindex org-html-preamble @vindex org-html-preamble
@vindex org-html-postamble @vindex org-html-postamble
@vindex org-html-table-default-attributes @vindex org-html-table-default-attributes
@vindex org-html-table-row-tags
@vindex org-html-head-include-default-style @vindex org-html-head-include-default-style
@vindex org-html-head-include-scripts @vindex org-html-head-include-scripts
@multitable @columnfractions 0.32 0.68 @multitable @columnfractions 0.32 0.68
@item @code{:html-doctype} @tab @code{org-html-doctype} @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-xml-declaration} @tab @code{org-html-xml-declaration}
@item @code{:html-link-up} @tab @code{org-html-link-up} @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-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-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} @tab @code{org-html-head}
@item @code{:html-head-extra} @tab @code{org-html-head-extra} @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-inline-images} @tab @code{org-html-inline-images}
@ -13340,6 +13391,7 @@ string of these options for details.
@item @code{:html-preamble} @tab @code{org-html-preamble} @item @code{:html-preamble} @tab @code{org-html-preamble}
@item @code{:html-postamble} @tab @code{org-html-postamble} @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-default-style} @tab @code{org-html-head-include-default-style}
@item @code{:html-head-include-scripts} @tab @code{org-html-head-include-scripts} @item @code{:html-head-include-scripts} @tab @code{org-html-head-include-scripts}
@end multitable @end multitable

View file

@ -1,7 +1,7 @@
% Reference Card for Org Mode % Reference Card for Org Mode
\def\orgversionnumber{8.2.4} \def\orgversionnumber{8.2}
\def\versionyear{2013} % latest update \def\versionyear{2014} % latest update
\input emacsver.tex \def\year{2014} % latest copyright year
%**start of header %**start of header
\newcount\columnsperpage \newcount\columnsperpage

View file

@ -1,3 +1,107 @@
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> 2013-12-23 Chong Yidong <cyd@gnu.org>
* org.el (orgstruct-make-binding): Call set-transient-map instead * org.el (orgstruct-make-binding): Call set-transient-map instead

View file

@ -150,19 +150,17 @@ this template."
:type 'string) :type 'string)
(defvar org-babel-default-lob-header-args) (defvar org-babel-default-lob-header-args)
(defun org-babel-exp-non-block-elements (start end) (defun org-babel-exp-process-buffer ()
"Process inline source and call lines between START and END for export." "Execute all Babel blocks in current buffer."
(interactive) (interactive)
(save-window-excursion
(save-excursion (save-excursion
(goto-char start) (let ((case-fold-search t)
(unless (markerp end) (regexp (concat org-babel-inline-src-block-regexp "\\|"
(let ((m (make-marker))) org-babel-lob-one-liner-regexp "\\|"
(set-marker m end (current-buffer)) "^[ \t]*#\\+BEGIN_SRC")))
(setq end m))) (goto-char (point-min))
(let ((rx (concat "\\(?:" org-babel-inline-src-block-regexp (while (re-search-forward regexp nil t)
"\\|" org-babel-lob-one-liner-regexp "\\)")))
(while (re-search-forward rx end t)
(save-excursion
(let* ((element (save-excursion (let* ((element (save-excursion
;; If match is inline, point is at its ;; If match is inline, point is at its
;; end. Move backward so ;; end. Move backward so
@ -170,9 +168,8 @@ this template."
;; object, not the following one. ;; object, not the following one.
(backward-char) (backward-char)
(save-match-data (org-element-context)))) (save-match-data (org-element-context))))
(type (org-element-type element))) (type (org-element-type element))
(when (memq type '(babel-call inline-babel-call inline-src-block)) (beg-el (org-element-property :begin element))
(let ((beg-el (org-element-property :begin element))
(end-el (org-element-property :end element))) (end-el (org-element-property :end element)))
(case type (case type
(inline-src-block (inline-src-block
@ -187,17 +184,17 @@ this template."
(goto-char beg-el) (goto-char beg-el)
(let ((replacement (org-babel-exp-do-export info 'inline))) (let ((replacement (org-babel-exp-do-export info 'inline)))
(if (equal replacement "") (if (equal replacement "")
;; Replacement code is empty: completely ;; Replacement code is empty: remove inline src
;; remove inline src block, including extra ;; block, including extra white space that
;; white space that might have been created ;; might have been created when inserting
;; when inserting results. ;; results.
(delete-region beg-el (delete-region beg-el
(progn (goto-char end-el) (progn (goto-char end-el)
(skip-chars-forward " \t") (skip-chars-forward " \t")
(point))) (point)))
;; Otherwise: remove inline src block but ;; Otherwise: remove inline src block but
;; preserve following white spaces. Then ;; preserve following white spaces. Then insert
;; insert value. ;; value.
(delete-region beg-el (delete-region beg-el
(progn (goto-char end-el) (progn (goto-char end-el)
(skip-chars-backward " \t") (skip-chars-backward " \t")
@ -246,49 +243,30 @@ this template."
(progn (goto-char end-el) (progn (goto-char end-el)
(skip-chars-backward " \r\t\n") (skip-chars-backward " \r\t\n")
(point))) (point)))
(insert rep))))))))))))) (insert rep))))
(src-block
(defvar org-src-preserve-indentation) ; From org-src.el (let* ((match-start (match-beginning 0))
(defun org-babel-exp-process-buffer () ;; Make sure we don't remove any blank lines
"Execute all blocks in visible part of buffer." ;; after the block when replacing it.
(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 (block-end (save-excursion
(goto-char (org-element-property :end element)) (goto-char end-el)
(skip-chars-backward " \r\t\n") (skip-chars-backward " \r\t\n")
(copy-marker (line-end-position)))) (line-end-position)))
(ind (org-get-indentation)) (ind (org-get-indentation))
(headers (headers
(cons (cons
(org-element-property :language element) (org-element-property :language element)
(let ((params (org-element-property :parameters element))) (let ((params (org-element-property :parameters element)))
(and params (org-split-string params "[ \t]+")))))) (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 ;; Take care of matched block: compute replacement
;; string. In particular, a nil REPLACEMENT means the ;; string. In particular, a nil REPLACEMENT means
;; block should be left as-is while an empty string ;; the block should be left as-is while an empty
;; should remove the block. ;; string should remove the block.
(let ((replacement (progn (goto-char match-start) (let ((replacement (progn (goto-char match-start)
(org-babel-exp-src-block headers)))) (org-babel-exp-src-block headers))))
(cond ((not replacement) (goto-char block-end)) (cond ((not replacement) (goto-char block-end))
((equal replacement "") ((equal replacement "")
(delete-region begin (delete-region beg-el end-el))
(progn (goto-char block-end)
(skip-chars-forward " \r\t\n")
(if (eobp) (point)
(line-beginning-position)))))
(t (t
(goto-char match-start) (goto-char match-start)
(delete-region (point) block-end) (delete-region (point) block-end)
@ -300,15 +278,7 @@ this template."
(goto-char match-start) (goto-char match-start)
(indent-line-to ind)) (indent-line-to ind))
;; Indent everything. ;; Indent everything.
(indent-rigidly match-start (point) ind))))) (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)))))
(defun org-babel-in-example-or-verbatim () (defun org-babel-in-example-or-verbatim ()
"Return true if point is in example or verbatim code. "Return true if point is in example or verbatim code.

View file

@ -253,7 +253,7 @@ then create one. Return the initialized session. The current
(org-babel-gnuplot-quote-timestamp-field s) (org-babel-gnuplot-quote-timestamp-field s)
(if (zerop (length s)) (if (zerop (length s))
(or *org-babel-gnuplot-missing* s) (or *org-babel-gnuplot-missing* s)
(if (string-match "[ \"]" "?") (if (string-match "[ \"]" s)
(concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"")
"\"") "\"")
s))))) s)))))

View file

@ -59,7 +59,7 @@
'("[usenames]{color}" "{tikz}" "{color}" "{listings}" "{amsmath}") '("[usenames]{color}" "{tikz}" "{color}" "{listings}" "{amsmath}")
"Packages to use for htlatex export." "Packages to use for htlatex export."
:group 'org-babel :group 'org-babel
:type '(list (string))) :type '(repeat (string)))
(defun org-babel-expand-body:latex (body params) (defun org-babel-expand-body:latex (body params)
"Expand BODY according to PARAMS, return the expanded body." "Expand BODY according to PARAMS, return the expanded body."

View file

@ -40,14 +40,13 @@ files to `org-babel-lob-files'.")
To add files to this list use the `org-babel-lob-ingest' command." To add files to this list use the `org-babel-lob-ingest' command."
:group 'org-babel :group 'org-babel
:version "24.1" :version "24.1"
:type 'list) :type '(repeat file))
(defvar org-babel-default-lob-header-args '((:exports . "results")) (defvar org-babel-default-lob-header-args '((:exports . "results"))
"Default header arguments to use when exporting #+lob/call lines.") "Default header arguments to use when exporting #+lob/call lines.")
(defun org-babel-lob-ingest (&optional file) (defun org-babel-lob-ingest (&optional file)
"Add all named source-blocks defined in FILE to "Add all named source blocks defined in FILE to `org-babel-library-of-babel'."
`org-babel-library-of-babel'."
(interactive "fFile: ") (interactive "fFile: ")
(let ((lob-ingest-count 0)) (let ((lob-ingest-count 0))
(org-babel-map-src-blocks file (org-babel-map-src-blocks file

View file

@ -43,7 +43,8 @@
(defcustom org-babel-maxima-command (defcustom org-babel-maxima-command
(if (boundp 'maxima-command) maxima-command "maxima") (if (boundp 'maxima-command) maxima-command "maxima")
"Command used to call maxima on the shell." "Command used to call maxima on the shell."
:group 'org-babel) :group 'org-babel
:type 'string)
(defun org-babel-maxima-expand (body params) (defun org-babel-maxima-expand (body params)
"Expand a block of Maxima code according to its header arguments." "Expand a block of Maxima code according to its header arguments."

View file

@ -328,11 +328,11 @@ the daily/weekly agenda, see `org-agenda-skip-function'.")
(string)) (string))
(list :tag "Number of days in agenda" (list :tag "Number of days in agenda"
(const org-agenda-span) (const org-agenda-span)
(choice (const :tag "Day" 'day) (choice (const :tag "Day" day)
(const :tag "Week" 'week) (const :tag "Week" week)
(const :tag "Fortnight" 'fortnight) (const :tag "Fortnight" fortnight)
(const :tag "Month" 'month) (const :tag "Month" month)
(const :tag "Year" 'year) (const :tag "Year" year)
(integer :tag "Custom"))) (integer :tag "Custom")))
(list :tag "Fixed starting date" (list :tag "Fixed starting date"
(const org-agenda-start-day) (const org-agenda-start-day)
@ -390,32 +390,32 @@ the daily/weekly agenda, see `org-agenda-skip-function'.")
(repeat :inline t :tag "Conditions for skipping" (repeat :inline t :tag "Conditions for skipping"
(choice (choice
:tag "Condition type" :tag "Condition type"
(list :tag "Regexp matches" :inline t (const :format "" 'regexp) (regexp)) (list :tag "Regexp matches" :inline t (const :format "" regexp) (regexp))
(list :tag "Regexp does not match" :inline t (const :format "" 'notregexp) (regexp)) (list :tag "Regexp does not match" :inline t (const :format "" notregexp) (regexp))
(list :tag "TODO state is" :inline t (list :tag "TODO state is" :inline t
(const 'todo) (const todo)
(choice (choice
(const :tag "any not-done state" 'todo) (const :tag "any not-done state" todo)
(const :tag "any done state" 'done) (const :tag "any done state" done)
(const :tag "any state" 'any) (const :tag "any state" any)
(list :tag "Keyword list" (list :tag "Keyword list"
(const :format "" quote) (const :format "" quote)
(repeat (string :tag "Keyword"))))) (repeat (string :tag "Keyword")))))
(list :tag "TODO state is not" :inline t (list :tag "TODO state is not" :inline t
(const 'nottodo) (const nottodo)
(choice (choice
(const :tag "any not-done state" 'todo) (const :tag "any not-done state" todo)
(const :tag "any done state" 'done) (const :tag "any done state" done)
(const :tag "any state" 'any) (const :tag "any state" any)
(list :tag "Keyword list" (list :tag "Keyword list"
(const :format "" quote) (const :format "" quote)
(repeat (string :tag "Keyword"))))) (repeat (string :tag "Keyword")))))
(const :tag "scheduled" 'scheduled) (const :tag "scheduled" scheduled)
(const :tag "not scheduled" 'notscheduled) (const :tag "not scheduled" notscheduled)
(const :tag "deadline" 'deadline) (const :tag "deadline" deadline)
(const :tag "no deadline" 'notdeadline) (const :tag "no deadline" notdeadline)
(const :tag "timestamp" 'timestamp) (const :tag "timestamp" timestamp)
(const :tag "no timestamp" 'nottimestamp)))))) (const :tag "no timestamp" nottimestamp))))))
(list :tag "Non-standard skipping condition" (list :tag "Non-standard skipping condition"
:value (org-agenda-skip-function) :value (org-agenda-skip-function)
(const org-agenda-skip-function) (const org-agenda-skip-function)
@ -1357,12 +1357,12 @@ explanations on the possible values."
:group 'org-agenda-startup :group 'org-agenda-startup
:group 'org-agenda-daily/weekly :group 'org-agenda-daily/weekly
:type '(choice (const :tag "Don't show log items" nil) :type '(choice (const :tag "Don't show log items" nil)
(const :tag "Show only log items" 'only) (const :tag "Show only log items" only)
(const :tag "Show all possible log items" 'clockcheck) (const :tag "Show all possible log items" clockcheck)
(repeat :tag "Choose among possible values for `org-agenda-log-mode-items'" (repeat :tag "Choose among possible values for `org-agenda-log-mode-items'"
(choice (const :tag "Show closed log items" 'closed) (choice (const :tag "Show closed log items" closed)
(const :tag "Show clocked log items" 'clock) (const :tag "Show clocked log items" clock)
(const :tag "Show all logged state changes" 'state))))) (const :tag "Show all logged state changes" state)))))
(defcustom org-agenda-start-with-clockreport-mode nil (defcustom org-agenda-start-with-clockreport-mode nil
"The initial value of clockreport-mode in a newly created agenda window." "The initial value of clockreport-mode in a newly created agenda window."
@ -1805,7 +1805,7 @@ When set to nil, never show inherited tags in agenda lines."
:version "24.3" :version "24.3"
:type '(choice :type '(choice
(const :tag "Show inherited tags when available" t) (const :tag "Show inherited tags when available" t)
(const :tag "Always show inherited tags" 'always) (const :tag "Always show inherited tags" always)
(repeat :tag "Show inherited tags only in selected agenda types" (repeat :tag "Show inherited tags only in selected agenda types"
(symbol :tag "Agenda type")))) (symbol :tag "Agenda type"))))
@ -7003,7 +7003,7 @@ When TYPE is \"scheduled\", \"deadline\", \"timestamp\" or
\"timestamp_ia\", compare within each of these type. When TYPE \"timestamp_ia\", compare within each of these type. When TYPE
is the empty string, compare all timestamps without respect of is the empty string, compare all timestamps without respect of
their type." their type."
(let* ((def (if org-sort-agenda-notime-is-late 9901 -1)) (let* ((def (if org-sort-agenda-notime-is-late most-positive-fixnum -1))
(ta (or (and (string-match type (or (get-text-property 1 'type a) "")) (ta (or (and (string-match type (or (get-text-property 1 'type a) ""))
(get-text-property 1 'ts-date a)) def)) (get-text-property 1 'ts-date a)) def))
(tb (or (and (string-match type (or (get-text-property 1 'type b) "")) (tb (or (and (string-match type (or (get-text-property 1 'type b) ""))

View file

@ -41,8 +41,7 @@
(require 'cl)) (require 'cl))
(require 'org-id) (require 'org-id)
(require 'org) (require 'org)
(require 'vc-git)
(declare-function vc-git-root "vc-git" (file))
(defgroup org-attach nil (defgroup org-attach nil
"Options concerning entry attachments in Org-mode." "Options concerning entry attachments in Org-mode."
@ -266,7 +265,7 @@ This checks for the existence of a \".git\" directory in that directory."
(let* ((dir (expand-file-name org-attach-directory)) (let* ((dir (expand-file-name org-attach-directory))
(git-dir (vc-git-root dir)) (git-dir (vc-git-root dir))
(changes 0)) (changes 0))
(when git-dir (when (and git-dir (executable-find "git"))
(with-temp-buffer (with-temp-buffer
(cd dir) (cd dir)
(let ((have-annex (let ((have-annex

View file

@ -63,19 +63,19 @@
;; with the same name as the link; then, if unsuccessful, ask the user if ;; with the same name as the link; then, if unsuccessful, ask the user if
;; he/she wants to rebuild the 'TAGS' database and try again; then ask if ;; he/she wants to rebuild the 'TAGS' database and try again; then ask if
;; the user wishes to append 'tag' as a new toplevel heading at the end of ;; the user wishes to append 'tag' as a new toplevel heading at the end of
;; the buffer; and finally, defer to org's default behavior which is to ;; the buffer; and finally, defer to org's default behaviour which is to
;; search the entire text of the current buffer for 'tag'. ;; search the entire text of the current buffer for 'tag'.
;; ;;
;; This behavior can be modified by changing the value of ;; This behaviour can be modified by changing the value of
;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my ;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my
;; .emacs, which describes the same behavior as the above paragraph with ;; .emacs, which describes the same behaviour as the above paragraph with
;; one difference: ;; one difference:
;; ;;
;; (setq org-ctags-open-link-functions ;; (setq org-ctags-open-link-functions
;; '(org-ctags-find-tag ;; '(org-ctags-find-tag
;; org-ctags-ask-rebuild-tags-file-then-find-tag ;; org-ctags-ask-rebuild-tags-file-then-find-tag
;; org-ctags-ask-append-topic ;; org-ctags-ask-append-topic
;; org-ctags-fail-silently)) ; <-- prevents org default behavior ;; org-ctags-fail-silently)) ; <-- prevents org default behaviour
;; ;;
;; ;;
;; Usage ;; Usage

View file

@ -239,19 +239,6 @@ application to open them.")
By default, all keywords setting attributes (i.e. \"ATTR_LATEX\") By default, all keywords setting attributes (i.e. \"ATTR_LATEX\")
are affiliated keywords and need not to be in this list.") are affiliated keywords and need not to be in this list.")
(defconst org-element--affiliated-re
(format "[ \t]*#\\+%s:"
;; Regular affiliated keywords.
(format "\\(%s\\|ATTR_[-_A-Za-z0-9]+\\)\\(?:\\[\\(.*\\)\\]\\)?"
(regexp-opt org-element-affiliated-keywords)))
"Regexp matching any affiliated keyword.
Keyword name is put in match group 1. Moreover, if keyword
belongs to `org-element-dual-keywords', put the dual value in
match group 2.
Don't modify it, set `org-element-affiliated-keywords' instead.")
(defconst org-element-keyword-translation-alist (defconst org-element-keyword-translation-alist
'(("DATA" . "NAME") ("LABEL" . "NAME") ("RESNAME" . "NAME") '(("DATA" . "NAME") ("LABEL" . "NAME") ("RESNAME" . "NAME")
("SOURCE" . "NAME") ("SRCNAME" . "NAME") ("TBLNAME" . "NAME") ("SOURCE" . "NAME") ("SRCNAME" . "NAME") ("TBLNAME" . "NAME")
@ -298,6 +285,31 @@ This list is checked after translations have been applied. See
Any keyword in this list will have its value parsed and stored as Any keyword in this list will have its value parsed and stored as
a secondary string.") a secondary string.")
(defconst org-element--affiliated-re
(format "[ \t]*#\\+\\(?:%s\\):\\(?: \\|$\\)"
(concat
;; Dual affiliated keywords.
(format "\\(?1:%s\\)\\(?:\\[\\(.*\\)\\]\\)?"
(regexp-opt org-element-dual-keywords))
"\\|"
;; Regular affiliated keywords.
(format "\\(?1:%s\\)"
(regexp-opt
(org-remove-if
#'(lambda (keyword)
(member keyword org-element-dual-keywords))
org-element-affiliated-keywords)))
"\\|"
;; Export attributes.
"\\(?1:ATTR_[-_A-Za-z0-9]+\\)"))
"Regexp matching any affiliated keyword.
Keyword name is put in match group 1. Moreover, if keyword
belongs to `org-element-dual-keywords', put the dual value in
match group 2.
Don't modify it, set `org-element-affiliated-keywords' instead.")
(defconst org-element-object-restrictions (defconst org-element-object-restrictions
(let* ((standard-set (let* ((standard-set
(remq 'plain-link (remq 'table-cell org-element-all-successors))) (remq 'plain-link (remq 'table-cell org-element-all-successors)))
@ -2906,12 +2918,8 @@ CONTENTS is nil."
Return value is a cons cell whose CAR is `inline-babel-call' and Return value is a cons cell whose CAR is `inline-babel-call' and
CDR is beginning position." CDR is beginning position."
(save-excursion (save-excursion
;; Use a simplified version of (when (re-search-forward org-babel-inline-lob-one-liner-regexp nil t)
;; `org-babel-inline-lob-one-liner-regexp'. (cons 'inline-babel-call (match-end 1)))))
(when (re-search-forward
"call_\\([^()\n]+?\\)\\(?:\\[.*?\\]\\)?([^\n]*?)\\(\\[.*?\\]\\)?"
nil t)
(cons 'inline-babel-call (match-beginning 0)))))
;;;; Inline Src Block ;;;; Inline Src Block

View file

@ -200,7 +200,9 @@ This list represents a \"habit\" for the rest of this module."
(count 0)) (count 0))
(unless reversed (goto-char end)) (unless reversed (goto-char end))
(while (and (< count maxdays) (while (and (< count maxdays)
(funcall search "- State \"DONE\".*\\[\\([^]]+\\)\\]" limit t)) (funcall search (format "- State \"%s\".*\\[\\([^]]+\\)\\]"
(regexp-opt org-done-keywords))
limit t))
(push (time-to-days (push (time-to-days
(org-time-string-to-time (match-string-no-properties 1))) (org-time-string-to-time (match-string-no-properties 1)))
closed-dates) closed-dates)

View file

@ -103,7 +103,8 @@ the value of this variable."
"Non-nil means display the first star of an inline task as additional marker. "Non-nil means display the first star of an inline task as additional marker.
When nil, the first star is not shown." When nil, the first star is not shown."
:tag "Org Inline Tasks" :tag "Org Inline Tasks"
:group 'org-structure) :group 'org-structure
:type 'boolean)
(defvar org-odd-levels-only) (defvar org-odd-levels-only)
(defvar org-keyword-time-regexp) (defvar org-keyword-time-regexp)

View file

@ -95,7 +95,10 @@
(defun org-rmail-follow-link (folder article) (defun org-rmail-follow-link (folder article)
"Follow an Rmail link to FOLDER and ARTICLE." "Follow an Rmail link to FOLDER and ARTICLE."
(require 'rmail) (require 'rmail)
(setq article (org-add-angle-brackets article)) (cond ((null article) (setq article ""))
((stringp article)
(setq article (org-add-angle-brackets article)))
(t (user-error "Wrong RMAIL link format")))
(let (message-number) (let (message-number)
(save-excursion (save-excursion
(save-window-excursion (save-window-excursion
@ -105,8 +108,7 @@
(rmail-widen) (rmail-widen)
(goto-char (point-max)) (goto-char (point-max))
(if (re-search-backward (if (re-search-backward
(concat "^Message-ID:\\s-+" (regexp-quote (concat "^Message-ID:\\s-+" (regexp-quote article))
(or article "")))
nil t) nil t)
(rmail-what-message)))))) (rmail-what-message))))))
(if message-number (if message-number

View file

@ -2274,7 +2274,9 @@ KEY is \"@\" or \"$\". REPLACE is an alist of numbers to replace.
For all numbers larger than LIMIT, shift them by DELTA." For all numbers larger than LIMIT, shift them by DELTA."
(save-excursion (save-excursion
(goto-char (org-table-end)) (goto-char (org-table-end))
(when (let ((case-fold-search t)) (looking-at "[ \t]*#\\+tblfm:")) (let ((case-fold-search t)
(s-end (save-excursion (re-search-forward "^\\S-*$\\|\\'" nil t))))
(while (re-search-forward "[ \t]*#\\+tblfm:" s-end t)
(let ((msg "The formulas in #+TBLFM have been updated") (let ((msg "The formulas in #+TBLFM have been updated")
(re (concat key "\\([0-9]+\\)")) (re (concat key "\\([0-9]+\\)"))
(re2 (re2
@ -2300,7 +2302,7 @@ For all numbers larger than LIMIT, shift them by DELTA."
(message msg)) (message msg))
((and limit (> n limit)) ((and limit (> n limit))
(replace-match (concat key (int-to-string (+ n delta))) t t) (replace-match (concat key (int-to-string (+ n delta))) t t)
(message msg))))))))) (message msg))))))))))
(defun org-table-get-specials () (defun org-table-get-specials ()
"Get the column names and local parameters for this table." "Get the column names and local parameters for this table."

View file

@ -5,13 +5,13 @@
(defun org-release () (defun org-release ()
"The release version of org-mode. "The release version of org-mode.
Inserted by installing org-mode or when a release is made." Inserted by installing org-mode or when a release is made."
(let ((org-release "8.2.3a")) (let ((org-release "8.2.5c"))
org-release)) org-release))
;;;###autoload ;;;###autoload
(defun org-git-version () (defun org-git-version ()
"The Git version of org-mode. "The Git version of org-mode.
Inserted by installing org-mode or when a release is made." Inserted by installing org-mode or when a release is made."
(let ((org-git-version "release_8.2.3a")) (let ((org-git-version "release_8.2.5c"))
org-git-version)) org-git-version))
;;;###autoload ;;;###autoload
(defvar org-odt-data-dir "/usr/share/emacs/etc/org" (defvar org-odt-data-dir "/usr/share/emacs/etc/org"

View file

@ -602,7 +602,7 @@ The list of commands is: `org-schedule', `org-deadline',
already archived entries." already archived entries."
:type '(choice (const :tag "Don't loop" nil) :type '(choice (const :tag "Don't loop" nil)
(const :tag "All headlines in active region" t) (const :tag "All headlines in active region" t)
(const :tag "In active region, headlines at the same level than the first one" 'start-level) (const :tag "In active region, headlines at the same level than the first one" start-level)
(string :tag "Tags/Property/Todo matcher")) (string :tag "Tags/Property/Todo matcher"))
:version "24.1" :version "24.1"
:group 'org-todo :group 'org-todo
@ -1741,7 +1741,7 @@ Needs to be set before org.el is loaded."
:version "24.4" :version "24.4"
:package-version '(Org . "8.3") :package-version '(Org . "8.3")
:type '(choice :type '(choice
(const :tag "A double click follows the link" 'double) (const :tag "A double click follows the link" double)
(const :tag "Unconditionally follow the link with mouse-1" t) (const :tag "Unconditionally follow the link with mouse-1" t)
(integer :tag "mouse-1 click does not follow the link if longer than N ms" 450))) (integer :tag "mouse-1 click does not follow the link if longer than N ms" 450)))
@ -2246,7 +2246,7 @@ fast, while still showing the whole path to the entry."
"Non-nil means allow to create new nodes as refile targets. "Non-nil means allow to create new nodes as refile targets.
New nodes are then created by adding \"/new node name\" to the completion New nodes are then created by adding \"/new node name\" to the completion
of an existing node. When the value of this variable is `confirm', of an existing node. When the value of this variable is `confirm',
new node creation must be confirmed by the user (recommended) new node creation must be confirmed by the user (recommended).
When nil, the completion must match an existing entry. When nil, the completion must match an existing entry.
Note that, if the new heading is not seen by the criteria Note that, if the new heading is not seen by the criteria
@ -2428,7 +2428,7 @@ current entry each time a todo state is changed."
:group 'org-todo :group 'org-todo
:type '(choice :type '(choice
(const :tag "Yes, only for TODO entries" t) (const :tag "Yes, only for TODO entries" t)
(const :tag "Yes, including all entries" 'all-headlines) (const :tag "Yes, including all entries" all-headlines)
(repeat :tag "Yes, for TODOs in this list" (repeat :tag "Yes, for TODOs in this list"
(string :tag "TODO keyword")) (string :tag "TODO keyword"))
(other :tag "No TODO statistics" nil))) (other :tag "No TODO statistics" nil)))
@ -5693,7 +5693,7 @@ The time stamps may be either active or inactive.")
'(invisible org-link)) '(invisible org-link))
(add-text-properties (match-beginning 3) (match-end 3) (add-text-properties (match-beginning 3) (match-end 3)
'(invisible org-link))))) '(invisible org-link)))))
(backward-char 1)) (goto-char (1+ (match-beginning 0))))
rtn)) rtn))
(defun org-emphasize (&optional char) (defun org-emphasize (&optional char)
@ -6827,10 +6827,12 @@ With a numeric prefix, show all headlines up to that level."
"Set the visibility required by startup options and properties." "Set the visibility required by startup options and properties."
(cond (cond
((eq org-startup-folded t) ((eq org-startup-folded t)
(org-cycle '(4))) (org-overview))
((eq org-startup-folded 'content) ((eq org-startup-folded 'content)
(let ((this-command 'org-cycle) (last-command 'org-cycle)) (org-content))
(org-cycle '(4)) (org-cycle '(4))))) ((or (eq org-startup-folded 'showeverything)
(eq org-startup-folded nil))
(show-all)))
(unless (eq org-startup-folded 'showeverything) (unless (eq org-startup-folded 'showeverything)
(if org-hide-block-startup (org-hide-block-all)) (if org-hide-block-startup (org-hide-block-all))
(org-set-visibility-according-to-property 'no-cleanup) (org-set-visibility-according-to-property 'no-cleanup)
@ -6910,7 +6912,6 @@ With numerical argument N, show content up to level N."
(show-branches)) (show-branches))
(if (bobp) (throw 'exit nil)))))) (if (bobp) (throw 'exit nil))))))
(defun org-optimize-window-after-visibility-change (state) (defun org-optimize-window-after-visibility-change (state)
"Adjust the window after a change in outline visibility. "Adjust the window after a change in outline visibility.
This function is the default value of the hook `org-cycle-hook'." This function is the default value of the hook `org-cycle-hook'."
@ -11704,9 +11705,9 @@ this is used for the GOTO interface."
(setq answ (funcall cfunc prompt tbl nil (not new-nodes) (setq answ (funcall cfunc prompt tbl nil (not new-nodes)
nil 'org-refile-history (or cdef (car org-refile-history)))) nil 'org-refile-history (or cdef (car org-refile-history))))
(setq pa (or (assoc answ tbl) (assoc (concat answ "/") tbl))) (setq pa (or (assoc answ tbl) (assoc (concat answ "/") tbl)))
(org-refile-check-position pa)
(if pa (if pa
(progn (progn
(org-refile-check-position pa)
(when (or (not org-refile-history) (when (or (not org-refile-history)
(not (eq old-hist org-refile-history)) (not (eq old-hist org-refile-history))
(not (equal (car pa) (car org-refile-history)))) (not (equal (car pa) (car org-refile-history))))
@ -14556,7 +14557,7 @@ With prefix ARG, realign all tags in headings in the current buffer."
(and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point))) (and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point)))
tags) tags)
(t (error "Tags alignment failed"))) (t (error "Tags alignment failed")))
(org-move-to-column col) (org-move-to-column col nil nil t)
(unless just-align (unless just-align
(run-hooks 'org-after-tags-change-hook)))))) (run-hooks 'org-after-tags-change-hook))))))
@ -15289,6 +15290,8 @@ in `org-use-property-inheritance' selects PROPERTY for inheritance.
If the property is present but empty, the return value is the empty string. If the property is present but empty, the return value is the empty string.
If the property is not present at all, nil is returned. If the property is not present at all, nil is returned.
Return the value as a string.
If LITERAL-NIL is set, return the string value \"nil\" as a string, If LITERAL-NIL is set, return the string value \"nil\" as a string,
do not interpret it as the list atom nil. This is used for inheritance do not interpret it as the list atom nil. This is used for inheritance
when a \"nil\" value can supersede a non-nil value higher up the hierarchy." when a \"nil\" value can supersede a non-nil value higher up the hierarchy."
@ -15454,14 +15457,19 @@ Each hook function should accept two arguments, the name of the property
and the new value.") and the new value.")
(defun org-entry-put (pom property value) (defun org-entry-put (pom property value)
"Set PROPERTY to VALUE for entry at point-or-marker POM." "Set PROPERTY to VALUE for entry at point-or-marker POM.
If the value is `nil', it is converted to the empty string.
If it is not a string, an error is raised."
(cond ((null value) (setq value ""))
((not (stringp value))
(error "Properties values should be strings.")))
(org-with-point-at pom (org-with-point-at pom
(org-back-to-heading t) (org-back-to-heading t)
(let ((beg (point)) (end (save-excursion (outline-next-heading) (point))) (let ((beg (point)) (end (save-excursion (outline-next-heading) (point)))
range) range)
(cond (cond
((equal property "TODO") ((equal property "TODO")
(when (and (stringp value) (string-match "\\S-" value) (when (and (string-match "\\S-" value)
(not (member value org-todo-keywords-1))) (not (member value org-todo-keywords-1)))
(user-error "\"%s\" is not a valid TODO state" value)) (user-error "\"%s\" is not a valid TODO state" value))
(if (or (not value) (if (or (not value)
@ -15470,7 +15478,7 @@ and the new value.")
(org-todo value) (org-todo value)
(org-set-tags nil 'align)) (org-set-tags nil 'align))
((equal property "PRIORITY") ((equal property "PRIORITY")
(org-priority (if (and value (stringp value) (string-match "\\S-" value)) (org-priority (if (and value (string-match "\\S-" value))
(string-to-char value) ?\ )) (string-to-char value) ?\ ))
(org-set-tags nil 'align)) (org-set-tags nil 'align))
((equal property "CLOCKSUM") ((equal property "CLOCKSUM")
@ -19489,8 +19497,14 @@ because, in this case the deletion might narrow the column."
(org-fix-tags-on-the-fly)))) (org-fix-tags-on-the-fly))))
;; Make `delete-selection-mode' work with org-mode and orgtbl-mode ;; Make `delete-selection-mode' work with org-mode and orgtbl-mode
(put 'org-self-insert-command 'delete-selection t) (put 'org-self-insert-command 'delete-selection
(put 'orgtbl-self-insert-command 'delete-selection t) (lambda ()
(not (run-hook-with-args-until-success
'self-insert-uses-region-functions))))
(put 'orgtbl-self-insert-command 'delete-selection
(lambda ()
(not (run-hook-with-args-until-success
'self-insert-uses-region-functions))))
(put 'org-delete-char 'delete-selection 'supersede) (put 'org-delete-char 'delete-selection 'supersede)
(put 'org-delete-backward-char 'delete-selection 'supersede) (put 'org-delete-backward-char 'delete-selection 'supersede)
(put 'org-yank 'delete-selection 'yank) (put 'org-yank 'delete-selection 'yank)
@ -20025,21 +20039,19 @@ Depending on context, this does one of the following:
"Change timestamps synchronously up in CLOCK log lines. "Change timestamps synchronously up in CLOCK log lines.
Optional argument N tells to change by that many units." Optional argument N tells to change by that many units."
(interactive "P") (interactive "P")
(cond ((and (not org-support-shift-select) (if (and (org-at-clock-log-p) (org-at-timestamp-p t))
(org-at-clock-log-p) (let (org-support-shift-select)
(org-at-timestamp-p t))
(org-clock-timestamps-up n)) (org-clock-timestamps-up n))
(t (org-shiftselect-error)))) (user-error "Not at a clock log")))
(defun org-shiftcontroldown (&optional n) (defun org-shiftcontroldown (&optional n)
"Change timestamps synchronously down in CLOCK log lines. "Change timestamps synchronously down in CLOCK log lines.
Optional argument N tells to change by that many units." Optional argument N tells to change by that many units."
(interactive "P") (interactive "P")
(cond ((and (not org-support-shift-select) (if (and (org-at-clock-log-p) (org-at-timestamp-p t))
(org-at-clock-log-p) (let (org-support-shift-select)
(org-at-timestamp-p t))
(org-clock-timestamps-down n)) (org-clock-timestamps-down n))
(t (org-shiftselect-error)))) (user-error "Not at a clock log")))
(defun org-ctrl-c-ret () (defun org-ctrl-c-ret ()
"Call `org-table-hline-and-move' or `org-insert-heading' dep. on context." "Call `org-table-hline-and-move' or `org-insert-heading' dep. on context."

View file

@ -279,6 +279,8 @@ for the JavaScript code in this tag.
pre.src-sql:before { content: 'SQL'; } pre.src-sql:before { content: 'SQL'; }
table { border-collapse:collapse; } table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; } td, th { vertical-align:top; }
th.right { text-align: center; } th.right { text-align: center; }
th.left { text-align: center; } th.left { text-align: center; }
@ -580,7 +582,7 @@ The function must accept two parameters:
The function should return the string to be exported. The function should return the string to be exported.
For example, the variable could be set to the following function For example, the variable could be set to the following function
in order to mimic default behavior: in order to mimic default behaviour:
The default value simply returns the value of CONTENTS." The default value simply returns the value of CONTENTS."
:group 'org-export-html :group 'org-export-html
@ -3255,8 +3257,8 @@ contextual information."
(if (equal attributes "") "" (concat " " attributes)) (if (equal attributes "") "" (concat " " attributes))
(if (not caption) "" (if (not caption) ""
(format (if org-html-table-caption-above (format (if org-html-table-caption-above
"<caption align=\"above\">%s</caption>" "<caption class=\"t-above\">%s</caption>"
"<caption align=\"bottom\">%s</caption>") "<caption class=\"t-bottom\">%s</caption>")
(concat (concat
"<span class=\"table-number\">" "<span class=\"table-number\">"
(format (org-html--translate "Table %d:" info) number) (format (org-html--translate "Table %d:" info) number)
@ -3438,21 +3440,6 @@ Return output file name."
org-html-extension "html")) org-html-extension "html"))
plist pub-dir)) plist pub-dir))
;;; FIXME
;;;; org-format-table-html
;;;; org-format-org-table-html
;;;; org-format-table-table-html
;;;; org-table-number-fraction
;;;; org-table-number-regexp
;;;; org-html-inline-image-extensions
;;;; org-export-preferred-target-alist
;;;; class for anchors
;;;; org-export-mark-todo-in-toc
;;;; org-html-format-org-link
;;;; (caption (and caption (org-xml-encode-org-text caption)))
;;;; alt = (file-name-nondirectory path)
(provide 'ox-html) (provide 'ox-html)

View file

@ -964,9 +964,7 @@ files to build the calendar from."
;; BBDB anniversaries. ;; BBDB anniversaries.
(when (and org-icalendar-include-bbdb-anniversaries (when (and org-icalendar-include-bbdb-anniversaries
(require 'org-bbdb nil t)) (require 'org-bbdb nil t))
(with-temp-buffer (with-output-to-string (org-bbdb-anniv-export-ical)))))))
(org-bbdb-anniv-export-ical)
(buffer-string)))))))
(run-hook-with-args 'org-icalendar-after-save-hook (run-hook-with-args 'org-icalendar-after-save-hook
org-icalendar-combined-agenda-file)) org-icalendar-combined-agenda-file))
(org-release-buffers org-agenda-new-buffers))) (org-release-buffers org-agenda-new-buffers)))

View file

@ -998,7 +998,9 @@ See `org-odt--build-date-styles' for implementation details."
(if width (format " svg:width=\"%0.2fcm\"" width) "") (if width (format " svg:width=\"%0.2fcm\"" width) "")
(if height (format " svg:height=\"%0.2fcm\"" height) "") (if height (format " svg:height=\"%0.2fcm\"" height) "")
extra extra
(format " text:anchor-type=\"%s\"" (or anchor-type "paragraph"))))) (format " text:anchor-type=\"%s\"" (or anchor-type "paragraph"))
(format " draw:name=\"%s\""
(car (org-odt-add-automatic-style "Frame"))))))
(format (format
"\n<draw:frame draw:style-name=\"%s\"%s>\n%s\n</draw:frame>" "\n<draw:frame draw:style-name=\"%s\"%s>\n%s\n</draw:frame>"
style frame-attrs style frame-attrs
@ -2120,45 +2122,9 @@ SHORT-CAPTION are strings."
;; Get label and caption. ;; Get label and caption.
(label (org-element-property :name caption-from)) (label (org-element-property :name caption-from))
(caption (org-export-get-caption caption-from)) (caption (org-export-get-caption caption-from))
(short-caption (org-export-get-caption caption-from t))
;; Transcode captions.
(caption (and caption (org-export-data caption info))) (caption (and caption (org-export-data caption info)))
;; Currently short caption are sneaked in as object names. ;; FIXME: We don't use short-caption for now
;; (short-caption nil))
;; The advantages are:
;;
;; - Table Of Contents: Currently, there is no support for
;; building TOC for figures, listings and tables. See
;; `org-odt-keyword'. User instead has to rely on
;; external application for building such indices. Within
;; LibreOffice, building an "Illustration Index" or "Index
;; of Tables" will create a table with long captions (only)
;; and building a table with "Object names" will create a
;; table with short captions.
;;
;; - Easy navigation: In LibreOffice, object names are
;; offered via the navigation bar. This way one can
;; quickly locate and jump to object of his choice in the
;; exported document.
;;
;; The main disadvantage is that there cannot be any markups
;; within object names i.e., one cannot embolden, italicize
;; or underline text within short caption. So suppress
;; generation of <text:span >...</text:span> and other
;; markups by overriding the default translators. We
;; probably shouldn't be suppressing translators for all
;; elements in `org-element-all-objects', but for now this
;; will do.
(short-caption
(let ((short-caption (or short-caption caption))
(backend (org-export-create-backend
:parent (org-export-backend-name
(plist-get info :back-end))
:transcoders
(mapcar (lambda (type) (cons type (lambda (o c i) c)))
org-element-all-objects))))
(when short-caption
(org-export-data-with-backend short-caption backend info)))))
(when (or label caption) (when (or label caption)
(let* ((default-category (let* ((default-category
(case (org-element-type element) (case (org-element-type element)

View file

@ -22,15 +22,8 @@
;;; Commentary: ;;; Commentary:
;; This library implements an Org back-end for Org exporter.
;;
;; It introduces two interactive functions, `org-org-export-as-org'
;; and `org-org-export-to-org', which export, respectively, to
;; a temporary buffer and to a file.
;;
;; A publishing function is also provided: `org-org-publish-to-org'.
;;; Code: ;;; Code:
(require 'ox) (require 'ox)
(declare-function htmlize-buffer "htmlize" (&optional buffer)) (declare-function htmlize-buffer "htmlize" (&optional buffer))
@ -121,7 +114,10 @@ setting of `org-html-htmlize-output-type' is 'css."
(defun org-org-identity (blob contents info) (defun org-org-identity (blob contents info)
"Transcode BLOB element or object back into Org syntax. "Transcode BLOB element or object back into Org syntax.
CONTENTS is its contents, as a string or nil. INFO is ignored." CONTENTS is its contents, as a string or nil. INFO is ignored."
(org-export-expand blob contents t)) (let ((case-fold-search t))
(replace-regexp-in-string
"^[ \t]*#\\+ATTR_[-_A-Za-z0-9]+:\\(?: .*\\)?\n" ""
(org-export-expand blob contents t))))
(defun org-org-headline (headline contents info) (defun org-org-headline (headline contents info)
"Transcode HEADLINE element back into Org syntax. "Transcode HEADLINE element back into Org syntax.

View file

@ -228,7 +228,7 @@ If you create a site-map file, adjust the sorting like this:
`:sitemap-sort-files' `:sitemap-sort-files'
The site map is normally sorted alphabetically. You can The site map is normally sorted alphabetically. You can
change this behavior setting this to `anti-chronologically', change this behaviour setting this to `anti-chronologically',
`chronologically', or nil. `chronologically', or nil.
`:sitemap-ignore-case' `:sitemap-ignore-case'
@ -1072,7 +1072,7 @@ publishing directory."
Return value is a list of numbers, or nil. This function allows Return value is a list of numbers, or nil. This function allows
to resolve external fuzzy links like: to resolve external fuzzy links like:
[[file.org::*fuzzy][description]" [[file.org::*fuzzy][description]]"
(when org-publish-cache (when org-publish-cache
(cdr (assoc (org-split-string (cdr (assoc (org-split-string
(if (eq (aref fuzzy 0) ?*) (substring fuzzy 1) fuzzy)) (if (eq (aref fuzzy 0) ?*) (substring fuzzy 1) fuzzy))

View file

@ -288,7 +288,9 @@ When nil, no transformation is made."
(const :tag "No formatting"))) (const :tag "No formatting")))
(defcustom org-texinfo-def-table-markup "@samp" (defcustom org-texinfo-def-table-markup "@samp"
"Default setting for @table environments.") "Default setting for @table environments."
:group 'org-export-texinfo
:type 'string)
;;; Text markup ;;; Text markup

View file

@ -362,7 +362,7 @@ If the value is `comment' insert it as a comment."
:group 'org-export-general :group 'org-export-general
:type '(choice :type '(choice
(const :tag "No creator sentence" nil) (const :tag "No creator sentence" nil)
(const :tag "Sentence as a comment" 'comment) (const :tag "Sentence as a comment" comment)
(const :tag "Insert the sentence" t))) (const :tag "Insert the sentence" t)))
(defcustom org-export-with-date t (defcustom org-export-with-date t
@ -493,7 +493,7 @@ t Allow export of math snippets."
"The last level which is still exported as a headline. "The last level which is still exported as a headline.
Inferior levels will usually produce itemize or enumerate lists Inferior levels will usually produce itemize or enumerate lists
when exported, but back-end behavior may differ. when exported, but back-end behaviour may differ.
This option can also be set with the OPTIONS keyword, This option can also be set with the OPTIONS keyword,
e.g. \"H:2\"." e.g. \"H:2\"."
@ -1726,13 +1726,13 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored."
(t (t
;; Options in `org-export-options-alist'. ;; Options in `org-export-options-alist'.
(dolist (property (funcall find-properties key)) (dolist (property (funcall find-properties key))
(let ((behavior (nth 4 (assq property options)))) (let ((behaviour (nth 4 (assq property options))))
(setq plist (setq plist
(plist-put (plist-put
plist property plist property
;; Handle value depending on specified ;; Handle value depending on specified
;; BEHAVIOR. ;; BEHAVIOR.
(case behavior (case behaviour
(space (space
(if (not (plist-get plist property)) (if (not (plist-get plist property))
(org-trim val) (org-trim val)
@ -4955,7 +4955,7 @@ If no translation is found, the quote character is left as-is.")
(defconst org-export-smart-quotes-regexps (defconst org-export-smart-quotes-regexps
(list (list
;; Possible opening quote at beginning of string. ;; Possible opening quote at beginning of string.
"\\`\\([\"']\\)\\(\\w\\|\\s.\\|\\s_\\)" "\\`\\([\"']\\)\\(\\w\\|\\s.\\|\\s_\\|\\s(\\)"
;; Possible closing quote at beginning of string. ;; Possible closing quote at beginning of string.
"\\`\\([\"']\\)\\(\\s-\\|\\s)\\|\\s.\\)" "\\`\\([\"']\\)\\(\\s-\\|\\s)\\|\\s.\\)"
;; Possible apostrophe at beginning of string. ;; Possible apostrophe at beginning of string.
@ -5612,7 +5612,7 @@ a registered back-end. FILE is the name of the output file, as
a string. a string.
A non-nil optional argument ASYNC means the process should happen A non-nil optional argument ASYNC means the process should happen
asynchronously. The resulting buffer file then be accessible asynchronously. The resulting buffer will then be accessible
through the `org-export-stack' interface. through the `org-export-stack' interface.
Optional arguments SUBTREEP, VISIBLE-ONLY, BODY-ONLY and Optional arguments SUBTREEP, VISIBLE-ONLY, BODY-ONLY and