* lisp/ox-ascii.el (org-ascii--current-text-width): Convert `length'
to `string-width'.
(org-ascii--build-title, org-ascii--build-toc)
(org-ascii--list-listings, org-ascii--list-tables)
(org-ascii-template--document-title)
(org-ascii-inner-template, org-ascii-format-inlinetask-default)
(org-ascii-format-inlinetask-default, org-ascii-item
(org-ascii--table-cell-width, org-ascii-table-cell)
(org-ascii--current-text-width): Likewise.
I've checked all occurrences of the function `length' in ox-ascii.el.
It turns out that the most of them are calculating the width of given
string. To support fullwidth characters, we better use `string-width'
instead of `length'.
Some characters in UCS are categorized as "East Asian Ambiguous"[1].
The return value of `string-width' with those characters depends on
how Emacs is setup. We leave those ambiguous character handling to
Emacs.
Two usages of `length' in `ox-ascii.el' were left as-is, because those
were used for:
- bullet depth calculation in `org-ascii-headline', and
- cell position calculation in `org-ascii--table-cell-width'.
[1]: http://www.unicode.org/reports/tr11/#Ambiguous
* lisp/ox-latex.el (org-latex-headline, org-latex-item): Fix items
starting with a square bracket.
Thanks to Jon Degenhardt, Vladimir Lomov and Eric S Fraga for
contributing to the discussion.
* org.el (org-demote): Ignore invisible text when aligning
tags.
(org-set-tags): When JUST-ALIGN is 'ignore-column, ignore
invisible text when restoring the cursor to the correct
column.
This fixes a bug about demoting hidden headlines.
If org-move-to-column temporarily ignore visibility
specs, this will prevent org-demote to work correctly
in hidden regions.
Thanks to Susan Cragin for reporting this bug.
* lisp/org-table.el (org-table-remote-reference-indirection): Change
the local variable START to a value that will be still valid after
`replace-match'.
* lisp/org.el (org-toggle-item): Do not call `org-list-struct' twice
and fix checkboxes after modifying one of them.
This patch is relative to 213c2a6aa0.
* ob-python.el (org-babel-python-var-to-python): Bugfix: Strip
properties before formatting the results.
Thanks to Daniel Gerber for reporting this and providing a fix,
and to others who contributed.
* org-agenda.el (org-agenda-regexp-filter-preset): Fix
typo in docstring.
(org-agenda-reapply-filters): New function.
(org-agenda-drag-line-forward): Rewrite to fix a bug when used
in filtered agendas.
(org-agenda-drag-line-backward): Rewrite using
`org-agenda-drag-line-forward'.
Thanks to Thomas Morgan for reporting this.
* lisp/org-table.el (org-table-remote-reference-indirection): Use the
optional arg START of `string-match' to improve performance and to
avoid endless loop on user error.
* doc/org.texi (References): Add description for indirection of
NAME-OR-ID.
* lisp/org-table.el (org-table-eval-formula): Make use of
`org-table-remote-reference-indirection'.
(org-table-remote-reference-indirection): New function.
* testing/lisp/test-org-table.el
(test-org-table/remote-reference-indirect): Change to use remote
reference indirection.
* lisp/org.el (org-match-substring-regexp): Simplify syntax when not
using braces. Also make the variable a defconst.
(org-match-substring-with-braces-regexp): Make the variable a defconst
and remove a useless group in regexp.
* lisp/org-element.el (org-element-subscript-parser,
org-element-superscript-parser): Adapt to group changes.
* lisp/org-element.el (org-element--cache-root): New function.
(org-element--cache-sync, org-element-cache-get): Use new function.
This is a workaround for `avl-tree--root' bug before Emacs 24. Thanks
to Daniel Clemente for reporting it.