* org-macs.el (org-autoload): Delete.
* org-docview.el ("docview"): Fix declarations and require
doc-view directly.
* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling, org-id-new):
* org-colview.el:
(org-colview-initial-truncate-line-value)
(org-columns-open-link, org-string-to-number):
* org-clock.el:
(org-clock-put-overlay, org-count-quarter, org-clock-loaded):
* org-archive.el (org-get-local-archive-location):
* org-agenda.el (org-agenda-todo-custom-ignore-p):
Autoload.
Those functions were autoloaded from within calls to `org-autoload'
in org.el, we now autoload them from where they live.
* lisp/org-table.el (org-table-convert-region): Interpret string SEPARATOR
as regular expression. Triple `C-u' prefix arg will read a regexp
from the user.
* doc/org.texi: Document that `C-c |' can take a regexp as a separator.
Patch modified from a proposal by Francois.
* org-table.el (org-table-sum): Fix rounding error when
summing times.
Thanks to Paul Stansell for reporting this and to Nick Dokos for
providing the fix.
See http://mid.gmane.org/87ppv2atvf.fsf%40gmail.com for the
discussion of this bug.
* lisp/ob-core.el (org-babel-get-rownames),
lisp/org-table.el (org-table-transpose-table-at-point): Replace the
inadvertent use of mapcar* (from cl) by plain mapcar and direct cons
manipulation.
The error was not caught at compilation time since both source files
require cl during compilation for using cl macros. These were the
only uses of mapcar* in Org, but I didn't check for other cl
_functions_ (as opposed to macros, which would need to be checked if
their implementation uses cl functions).
* lisp/org.el (org-table-clean-did-remove-column),
lisp/org-table.el (org-table-clean-did-remove-column): Move defvar,
this dynamic variable is only used in org-table.
* lisp/org-table.el (org-table-colgroup-info): Remove unused defvar
for `org-table-colgroup-info'.
(org-table-clean-before-export): Let-bind regular expression strings
and remove unused matching group. Use
`org-table-clean-did-remove-column' in cond statement rather than
branching via if to avoid code duplication. Remove the code
associated with the removed `org-table-colgroup-info'.
(orgtbl-export): Remove unused internal function.
* lisp/org-table.el (org-table-get-remote-range): Extend regexp to
match "#+NAME: table" additionally to "#+TBLNAME: table".
* testing/lisp/test-org-table.el: Add test.
* testing/org-test.el (org-test-table-target-expect): Allow several
tables to support testing remote references in the last table.
* org-table.el (org-table-copy-down): Don't move cursor when
getting the field.
This prevents the point from moving when inadvertently calling
S-RET outside of a table.
(org-table-make-reference): A range with only empty fields should lead
to length 0.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.
The range len bugs may lead to wrong calculations for range references
with empty fields when the range len is relevant. Affects typically
Calc vmean on simple range and without format specifier EN. Also
Lisp with e. g. `length' on simple range or with L.
It is worth a small compatibility change: For a range with only empty
fields it is now possible and necessary to choose different behaviors
of vmean by adding the format specifiers E and/or N.
This is a follow-up of commit
764315b3fc.
* org-table.el (org-calc-current-TBLFM): Ensure to remove the
currently inserted TBLFM line, when calling `org-table-recalculate'
returns an error and the processing stops.
* testing/lisp/test-org-table.el: Add test.
When you hit =C-c C-c= at the line of "#+TBLFM: $2=$1*2::$2=$1**2" in
| 1 | |
| 2 | |
#+TBLFM: $2=$1*1
#+TBLFM: $2=$1*2::$2=$1**2
you got:
| 1 | |
| 2 | |
#+TBLFM: $2=$1*2::$2=$1**2
#+TBLFM: $2=$1*1
#+TBLFM: $2=$1*2::$2=$1**2
with the error message of:
user-error: Double definition `$2=' in TBLFM line, please fix by hand
In this case, you expected:
| 1 | |
| 2 | |
#+TBLFM: $2=$1*1
#+TBLFM: $2=$1*2::$2=$1**2
* org-table.el (org-calc-current-TBLFM): New function to
re-calculate the table by applying the #+TBLFM in the line
where the point is.
* org.el (org-ctrl-c-ctrl-c): Call `org-calc-current-TBLFM' when
point is in the #+TBLFM line.
* testing/lisp/test-org-table.el: Add test.
* lisp/org-table.el (org-table-eval-formula): Work-around for
calc-eval regression.
Calc-eval can no longer be called without initializing the
*Calculator* buffer first.
* org-table.el (orgtbl-to-generic): New parameter `backend' to
export cells content using a specific backend.
(orgtbl-to-latex, orgtbl-to-texinfo): Export cells to LaTeX
and Texinfo before sending the table.
Thanks to Luca Sabbatini for reporting a problem that led to this change.
* org.el (org-set-regexps-and-options): Use
`org-table-set-constants'.
* org-table.el (org-table-set-constants): New function.
(orgtbl-ctrl-c-ctrl-c): Use it.
Thanks to Oliver Večerník for reporting problems here.
* lisp/org-table.el (org-table-eval-formula): The condition-case to
check for must be "error", not "user-error".
This fixes these test failures:
4 unexpected results:
FAILED test-org-table/references/format-specifier-E
FAILED test-org-table/references/format-specifier-EL
FAILED test-org-table/references/format-specifier-L
FAILED test-org-table/references/format-specifier-none
Reported in:
http://permalink.gmane.org/gmane.emacs.orgmode/67450http://permalink.gmane.org/gmane.emacs.orgmode/67503
* org.el (org-move-subtree-down, org-forward-element)
(org-backward-element):
* org-table.el (org-table-previous-field)
(org-table-move-column, org-table-move-row):
* org-list.el (org-move-item-down, org-move-item-up)
(org-cycle-item-indentation): Use `user-error' when moving or
modifying the element at point is not possible.
* org-table.el (org-table-align): Only set the window start
when table alignment is performed in the selected window.
Thanks to Michael Brand for reporting this.
When opening an .org file from another .org file, org-mode
is initialized in the second one while the window is not yet
selected. So, functions run during org-mode's initialization
need to check if the org-mode window is the selected one before
manipulating the "current window".
* contrib/lisp/org-mime.el (org-mime-htmlize, org-mime-compose): Use
new exporter.
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new
exporter.
* lisp/ob-latex.el (org-babel-execute:latex): Use new exporter.
* lisp/ob-org.el (org-babel-execute:org): Use new exporter.
* lisp/org-agenda.el (org-agenda-menu, org-agenda-write): Use new
iCalendar export back-end.
* lisp/org-table.el (org-table-export, orgtbl-export): Remove
dependency on `org-exp' library.
(org-table-clean-before-export): New function.
(org-table-colgroup-info): New variable.
(orgtbl-to-html): Use to new HTML export back-end.
* lisp/org.el (org-modules): Remove modules relative to obsolete
export framework and add those relative to the new one.
(org-create-formula-image-with-dvipng, org-format-latex
org-create-formula-image-with-imagemagick): Use new exporter.
(org-indent-line): INCLUDE keywords are indented like regular
keywords.
(org-mode-map): Bind C-c C-e to new export dispatcher.
(org-menu): Install new exporter in menu.
* doc/org.texi (Formula syntax for Calc): Add explanation and example
for empty field.
* lisp/org-table.el (org-table-eval-formula): Use `keep-empty' in more
places.
(org-table-make-reference): Use nan (not a number) for empty fields in
Calc formulas.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.
(test-org-table/empty-field): New examples dealing with empty fields.
(test-org-table/copy-field): New ert-deftest with examples dealing with
empty fields.
This makes it possible to write spreadsheet Calc formulas that check
for empty fields: To sum the first two columns unless one or both
empty:
$3 = if("$1" = "nan" || "$2" = "nan", string(""), $1 + $2); E
* lisp/org-table.el (org-table-eval-formula): Keep empty fields during
preprocessing.
(org-table-make-reference): A range with only empty fields should not
always return 0 but also empty string, consistent with field reference
of an empty field. Use future design for nan but replicate current
behavior.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.
The range len bugs may lead to wrong calculations for range references
with empty fields when the range len is relevant. Affects typically
Calc vmean on simple range and without format specifier EN. Also
Lisp with e. g. `length' on simple range or with L.
* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Use `org-delete-backward-char'
instead of `backward-delete-char'.
* org.el (org-delete-backward-char, org-delete-char): Save
match data.