Complete fix 369e3d77
org-agenda.el (org-agenda-finalize): Filter by top headline

* org-agenda.el (org-agenda-finalize): Filter by top headline
if `org-agenda-top-headline-filter' is set.

Thanks to Brady Trainor for reporting this.
ox-icalendar: Use `org-icalendar-with-timestamps'

* lisp/ox-icalendar.el (org-icalendar-entry): Use
  `org-icalendar-with-timestamps'.

We cannot simply rely on ignored timestamps in communication channels,
as regular `org-export-with-timestamps' only applies to isolated
timestamps.

Thanks to Greg Troxel for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/85387
ox-icalendar: Tiny fixes

* lisp/ox-icalendar.el (org-icalendar-include-sexps,
org-icalendar-blocked-headline-p): Fix docstrings.
(org-icalendar-clear-blank-lines): Fix docstring and regexp.
org-element: Fix docstring

* lisp/org-element.el (org-element-timestamp-parser): Fix docstring.
Fix bug introduced in commit fdb4b54e

Thanks to Leonard Randall for reporting it.
ox-ascii: Tiny fix

* lisp/ox-ascii.el (org-ascii--indent-string): Fix regexp to avoid
  stack overflow in regexp matcher on very long lines.
Fix BBDB link completion

lisp/org-bbdb.el (org-bbdb-complete-link): Fix link completion with
newer versions of BBDB.

Newer versions of BBDB seem to be returning atomic values from
`bbdb-completing-read-record', we should be prepared for both atoms
and lists.
org-capture.el (org-capture-fill-template): Fix bug

* org-capture.el (org-capture-fill-template): Deactivate
region while trying to align tags on the current headline.

Thanks to Alex Kosorukoff for reporting this.
Merge branch 'maint' of orgmode.org:org-mode into maint
doc/texinfo.tex: Update to stable version 5.2
Fix commit fdb4b54e
org-agenda.el: Fix some type strings

* org-agenda.el (org-agenda-max-todos, org-agenda-max-tags)
(org-agenda-max-effort): Fix type strings.
ob-tangle: do not run make-directory with nil argument

* lisp/ob-tangle.el (org-babel-tangle): When `file-name-directory'
  returns nil, do not run make-directory.  Remove superfluous when
  clauses by using short-circuiting `and' instead.

Thanks to R. Michael Weylandt for reporting the problem and offering a
patch.

http://permalink.gmane.org/gmane.emacs.orgmode/85749
http://permalink.gmane.org/gmane.emacs.orgmode/85774
don't use predictable temp files in ob-screen

* lisp/ob-screen.el (org-babel-screen-session-write-temp-file):
  Unpredictable temp file name, fixes bug 17416.
ob-screen, use unpredictable temp file name

* lisp/ob-screen.el (org-babel-screen-test): Use unpredictable name
  for temporary file.
Make superscripts produce a ^ in the output, instead of _

	* ox-ascii.el (org-ascii-superscript): Change _ to ^ in the output.

Reported by Suvayu Ali: http://thread.gmane.org/gmane.emacs.orgmode/86014
Update org-mime to current export functions

* /contrib/lisp/org-mime.el (org-mime-send-buffer):

This function was using `org-export-grab-title-from-buffer', which no
longer exists.
ox: Fix Wrong type argument error with empty footnotes

* lisp/ox.el (org-export-data): Always return a string, as specified
  by the docstring.

Thanks to kuanyui for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86183
ox-html: Fix spurious "figure" divs on empty paragraphs

* lisp/ox-html.el (org-html-standalone-image-p): Ensure paragraph
  contains at least a link before return a non-nil value.  Clarify
  docstring.

Thanks to Fabrice Popineau for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86314