* lisp/org-table.el (org-table--align-field): New function.
(org-table-align): Use new function. Refactor code.
(org-table-justify-field-maybe): Use new function.
(org-table-get-remote-range): Remove duplicate bindings.
* doc/org.texi (Column width and alignment): Remove footnote.
* testing/lisp/test-org-table.el (test-org-table/align): New test.
* lisp/org-table.el (org-table-sort-lines): Fix regexp. Also test
durations.
* testing/lisp/test-org-table.el (test-org-table/sort-lines): Update
tests. Add a new one.
* lisp/org-table.el (org-table-duration-custom-format): Add new
HH:MM format.
(org-table-duration-hour-zero-padding): New option.
(org-table-eval-formula): Select second-less format if
requested.
(org-table-time-seconds-to-string): Implement formats without
seconds and without zero-padding for hours.
* testing/lisp/test-org-table.el (test-org-table/duration):
New test for second-less durations.
* doc/org.texi (Formula syntax for Calc)
(Durations and time values): Document the U mode switch.
* lisp/org-table.el (org-table-get-field): Do not return
`beginning-of-buffer' error when called at beginning of buffer.
* testing/lisp/test-org-table.el (test-org-table/get-field): New test.
* lisp/org-table.el (org-table-eval-formula): Result is not always a string.
* testing/lisp/test-org-table.el (test-org-table/copy-field): Update
test.
* lisp/org-table.el (org-table-recalculate-buffer-tables): Align all
tables in a buffer.
(org-table-iterate-buffer-tables): Align a table only once, align all
tables in a buffer.
* lisp/org-table.el (org-table-insert-row): Fix inserting a new row when
the buffer doesn't end with a newline character. Tiny refactoring.
* testing/lisp/test-org-table.el (test-org-table/next-field): New test.
* lisp/org-table.el (org-table-eval-formula): Fix calculations with
locale specific time-stamps.
* testing/lisp/test-org-table.el (test-org-table/time-stamps): New test.
Reported-by: "Ulrich J. Herter" <ujh@posteo.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/108165>
* testing/lisp/test-org-table.el:
(test-org-table/org-table-convert-refs-to-an/1):
(test-org-table/org-table-convert-refs-to-rc/1): Row and column number
different.
* lisp/org-table.el (org-table-recalculate): Expand "$<" without
returning an error. Small refactoring.
* testing/lisp/test-org-table.el (test-org-table/first-rc): New test.
Reported-by: Stefan Nobis <stefan-ml@snobis.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/103693>
* lisp/org-table.el (org-table-eval-formula): Properly parse named
fields when indentation of current line ends with a TAB character.
* testing/lisp/test-org-table.el (test-org-table/tab-indent): New test.
Reported-by: Piotr Gajewski <pg7@outlook.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103290>
* lisp/org-table.el (org-table-analyze): Fix incorrect replacement for
"$>" reference when the table ends on a hline.
* testing/lisp/test-org-table.el (test-org-table/end-on-hline): New
test.
* lisp/org-table.el (orgtbl-to-generic): Export macros as-is, even if
they are undefined.
* testing/lisp/test-org-table.el (test-org-table/to-generic): Add test.
Radio tables are now using a minimal set-up for export. In particular,
no macro is expanded, and no Babel code is executed. If any of these is
needed, use `org-export-string-as' or `org-export-region-as' instead.
Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100621>
* lisp/org.el (org-do-sort): Properly reverse results when ?F and
a compare function is provided. Small refactoring.
* testing/lisp/test-org-table.el (test-org-table/sort-lines): New
test.
* testing/lisp/test-org-table.el (test-org-table/field-formula-outside-table):
Older Emaacsen throw an 'error instead of 'user-error. Catch both
condition names to avoid spurious test failures when that happens.
* org-table.el (org-table-formula-create-columns): New variable.
(org-table-recalculate): Use the new org-table-formula-make-new-cols
customization to control whether org creates new columns when
a formula explicitly targets them.
* lisp/org-table.el (org-table--to-generic-cell): Use
`org-element-interpret' data when parameter :raw is non-nil so
pseudo elements and objects are not ignored.
* testing/lisp/test-org-table.el (test-org-table/to-latex): Add test.
Thanks to Giuseppe Lipari for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/91559
* 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.