org.el (org-agenda-prepare-buffers): Fix bugs

* org.el (org-agenda-prepare-buffers): Fix bugs: don't
let-bind `org-tag-alist' to nil and don't append duplicate
tags to `org-tag-alist-for-agenda'.

Thanks to Toby Cubitt for reporting this.
don't interpret single "-" as a number

* lisp/ob-core.el (org-babel-number-p): Don't interpret single "-" as a
  number.
change the default python buffer name

  Working to fix a bug introduced by recent upstream changes in
  python.el in Emacs.

* lisp/ob-python.el (org-babel-python-buffers): Change the default
  python buffer name.
  (org-babel-python-initiate-session-by-key): Pass Python buffer names
  to the new `run-python' command.
fixed ob-python to work with newest Emacs

* lisp/ob-python.el (org-babel-python-with-earmufs): Add earmufs to a
  buffer name.
  (org-babel-python-without-earmufs): Remove earmufs from a buffer name.
  (org-babel-python-initiate-session-by-key): Set the buffer name in a
  way which is understandable by the new python.el
actually setting new session names

* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Actually
  setting new session names.
org.el (orgstruct-make-binding): Keep modifiers when translating keys

* org.el (orgstruct-make-binding): Keep modifiers when
translating keys.
Add "-i" to the python command on windows sessions

 Thanks to Gary Oberbrunner for showing how to do this, and noticing
 that it was required, and even for submitting a patch which I
 unfortunately didn't notice until it had already been overcome by
 events.

* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Add "-i"
  to the python command on windows sessions
ox: Handle BIND keywords in SETUPFILE files

* lisp/ox.el (org-export-get-environment): Update comment.
(org-export--install-letbind-maybe): Go into SETUPFILE files and
handle BIND keywords there.
* testing/examples/setupfile.org: Update test file.
* testing/lisp/test-ox.el: Add tests.
fixed a bug pointed out by Gary Oberbrunner

* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Fixed a
  bug pointed out by Gary Oberbrunner.
cycle tables for :results org and :results wrap

* lisp/ob-core.el (org-babel-insert-result): Cycle tables for :results
  org and :results wrap.
org-capture.el: New capture template option :jump-to-captured

* org-capture.el (org-capture-templates): Document new option
:jump-to-captured in the docstring.  Offer the complete list
of options when customizing.
(org-capture-finalize): Handle :jump-to-captured.

This emulates the behavior triggered by %& in remember templates.

Thanks to Adam Spiers for reporting this.
org.el (org-raise-scripts): Handle scripts like "a_b^c"

* org.el (org-toggle-pretty-entities): Enhance messages.
(org-raise-scripts): Handle scripts like "a_b^c".

Thanks to Jae Hee Lee for reporting this.
org-capture.el (org-capture-import-remember-templates): Take care of adding :jump-to-captured option if needed

* org-capture.el (org-capture-import-remember-templates): Take
care of adding :jump-to-captured option if needed.
org.el (org-sparse-tree-default-date-type): Add an option for closed time-stamps

* org.el (org-sparse-tree-default-date-type): Add an option
for closed time-stamps.
(org-sparse-tree): Allow to check against closed time-stamps.
(org-re-timestamp): Handle closed time-stamps.
(org-closed-in-range): Delete.
ox-latex: Properly escape ~ for export

* lisp/ox-latex.el:
(org-latex-plain-text): Properly escape ~ for LaTeX export

In LaTeX, \~ gives a tilde diacritic (as in ã).  \textasciitilde{} is
the correct escape for a tilde.
ox: Properly transfer bound variables through export process

* lisp/ox.el (org-export--list-bound-variables): Renamed from
  `org-export--install-letbind-maybe'.  Though, only return list of
  bound variables instead of installing them as buffer-local
  variables.
(org-export-get-environment): Use new function.  Take care of the
installation of bound variables.
(org-export--generate-copy-script): Make sure non-Org variables are
also installed in buffer copy.
* testing/lisp/test-ox.el: Add test.
org-macro: Properly handle macros in setup files

* lisp/org-macro.el (org-macro--collect-macros): Fix a bug where
  reading a macro in a setup file would remove other macros read so
  far from template.  Change function signature.
(org-macro-initialize-templates): Apply signature change from function
above.
* testing/lisp/test-org-macro.el: Add test.
ox-taskjuggler: Use task_id property when specified

* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-unique-id):
  Use specified id (TASK_ID property) when possible.
ox-taskjuggler: Fix dependencies resolution

* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-format-dependencies):
  Fix dependencies resolution.
ox-odt: Fix export of footnotes outside subtree during subtree export

* etc/styles/OrgOdtStyles.xml: Define "OrgFootnoteCenter" and
  "OrgFootnoteQuotations" styles.
* lisp/ox-odt.el (org-odt--format-paragraph): New function.
(org-odt-paragraph): Use new function to limit code duplication.
(org-odt-footnote-reference): Change default style for paragraphs when
transcoding a footnote definition.