org-element: Fix regexp matching LaTeX environments

* lisp/org-element.el (org-element--current-element): Fix regexp
  matching latex environments.  Discrepancy with regexp used in
  `org-element-latex-environment-parser' introduced matching errors.
org-element: Fix test failure

* lisp/org-element.el (org-element--current-element): Fix regexp.
When editing a table formula, point is not necessarily on its referent.

* org-table.el (org-table-show-reference): Call `set-window-start'
  with the calculated values `min' and `max', not with
  (point-min) and (point-max).

Reported by Luke Crook (http://article.gmane.org/gmane.emacs.orgmode/88610)
	    Thorsten Grothe (http://thread.gmane.org/gmane.emacs.orgmode/88698)
	    and Robert Klein in the latter thread.

Robert Klein bisected it down to 30220ffcdcef45c0237f80a2347d4da19877f64a.
ox-odt: Fix handling of quoted and centered paragraphs

* lisp/ox-odt.el (org-odt--paragraph-style): New function.
(org-odt--format-paragraph): Use new function to get proper style to
apply.

Thanks to Baptiste for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88798
org-clock: Update syntax for indentation in clock tables

* lisp/org-clock.el (org-clocktable-indent-string): Use "\emsp"
  instead of "\__", which is not supported anymore since Org 8.0.

Thanks to Buddy Butterfly for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88842
ox-odt: Silence byte-compiler

* lisp/ox-odt.el (org-odt--format-paragraph): Change signature to
  include info.
(org-odt-footnote-reference, org-odt-paragraph): Apply signature
change.
org-element: Fix object parsing in captions

* lisp/org-element.el (org-element-parse-secondary-string): Clone all
  local variables from current buffer before parsing a secondary
  string.  Small refactoring.
(org-element-object-variables): Remove variable.

* testing/lisp/test-org-element.el (test-org-element/secondary-string-parsing):
  Add test.

Thanks to Thomas S. Dye for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88850
org-element: Fix parsing multi-line links

* lisp/org-element.el (org-element-link-parser): Properly handle
  multi-line links according to RFC 3986 when enclosed within square
  brackets.

* testing/lisp/test-org-element.el (test-org-element/link-parser): Add
  test.
ox: Implement predicate for export blocks

* lisp/ox.el (org-export-raw-special-block-p): New function.

* testing/lisp/test-ox.el (test-org-export/raw-special-block-p): New
  test.

This patch is a forward-compatibility measure since the function is
mandatory for export back-ends in Org 8.3. It makes it easier for
back-end maintainers to provide a back-end compatible with both Org
8.2 and 8.3.
org.texi (Key bindings and useful functions): Fix typos

* org.texi (Key bindings and useful functions): Fix typo.  Use
the correct function's name.

Thanks to Marco Wahl for the suggested fix.
org.el (org-paste-subtree): Fix match subexpression

* org.el (org-paste-subtree): Fix match subexpression.

Thanks to Anders Johansson for reporting this.
ox-latex: Fix defcustoms

* lisp/ox-latex.el (org-latex-table-scientific-notation): Set
  appropriate value.
(org-latex-listings-options): Fix docstring.
org-capture.el (org-capture-fill-template): Small fix

* org-capture.el (org-capture-fill-template): Take
`org-extend-today-until' into account when setting the format
time string.
org-agenda.el (org-agenda-get-sexps): Don't add tags as text properties

* org-agenda.el (org-agenda-get-sexps): Don't add tags as text
properties.

Thanks to Raimund Berger for reporting this.
org-agenda.el (org-agenda-prepare): Reset preset filters

* org-agenda.el (org-agenda-prepare): Reset preset filters
when using sticky agendas.

Thanks to Thomas Morgan for reporting this.
Remove unnecessary invocations of org-mode

* lisp/ox-publish.el: (org-publish-find-title) (org-publish-find-date)
  Fix unnecessary invocations of org-mode with
  org-inhibit-startup.

The functions above call org-mode with org-inhibit-startup in org
buffers that are already open. The result is that these open buffers
lose some crucial local variables during publishing. For instance,
an open buffer will lose its dir-local-variables-alist setting
during publishing. There is no need to call org-mode here, because
org-mode is a) either already initialized in the buffer or b)
initialized via earlier call to find-file-no-select.

This looks to me like a relic of some past time when these functions were
called in temporary buffers that contained copies of the file's contents.
mk/targets.mk: consider only release_* tags for constructing version strings

Cherry-picked from d1692902f1, which was dropped by force-pushing 79873390ed.
Fix docstring of org-agenda-inhibit-startup

* lisp/org.el: org-agenda-inhibit-startup: fix docstring to reflect
  default value
Protect open buffers when publishing sitemap

* lisp/ox-publish.el: (org-publish-find-title) (org-publish-find-date)
  Make sure to call org-export-get-environment in copy of buffer if
  emacs is already visiting. Otherwise, #+bind variables meant for
  export can be set in live buffers.

This patch also optimizes the above functions by inhibiting
org-startup on buffers emacs visits temporarily.
org-element: Fix docstring

* lisp/org-element.el (org-element-headline-parser): Add missing
  `:post-blank' property in docstring.