Undo will now remove up to 20 characters typed consecutively, just
like Emacs normally does. We need a special implementation for this
because Org has its own self-insert command.
The code for doing this is a patch by Martin Pohlack.
Formulas can now refer to fields and regions in other tables, be it in
the same file or even in different files.
This also opens the door for more interesting R support, because
arbitrary tables in a file can now be accessed with appropriate
commands.
Finally, this commit also introduces a convenience for creating
references in tables. For the purpose of references, it will always
be *assumed* that there is another hline at the end if each table. So
for example in a table that has only a single hline, to separate
header from data, you can now access all of column two with
"@I$2..@II$2".
In a recent patch we have introduced names for all fields in the last
row. This has lead to a bug, that Org thinks there might be a field
formula associated with those fields. Now we check if there really is
one, and only in this case ask to overwrite it with a column formula.
Report by Henry Atting.
After the failed implementation of `@0' as a reference for the last
line, this is a second attempt to provide such references. I would
have liked to allow `@last' as the reference, that would have been
beautiful. However, too many regular expressions directly search for
`@' followed by a number, so this is too hard to implement.
Therefore, I am now turning the last row into a row of implicitly
named fields. From now on, $LR1, $LR2,... can be used to refer to
fields in the last row. These names may also appear on the left hand
side of formulas.
Exporting tables to LaTeX suffered from the problem that Org tables
are often long, but that the tabular environment in LaTeX cannot
handle long tables. This patch fixes this issue.
LaTeX export can now deal with very long tables, by setting an option
in the "ATTR_LaTeX:" line. Also, you can specify the alignment by
hand. Here is an example:
Also, table export now correctly deals with tables that start with a
hline. In such a case, also the LaTeX version will have this extra
hline before the first line.
The last data line in a table is often a line with important data, for
example sums of a column. In tables with varying length, the row
number of this line is constantly changing, which makes it hard to
write programs creating tables and then installing formulas.
This patch introduces @0 as a special reference to the last row, so
that @0$3 would be the field in the last row, 3rd column.
Tassilo Horn asked for this, because he finds the default behavior of
silently choosing a different row too confusing. I actually do agree.
The main use of this feature was running averages, if you need this
feature, you can customize the variable
`org-table-error-on-row-ref-crossing-hline'.
This key needs special treatment, because it needs to work *outside*
tables. The patch introduces a special command to call the
creation/conversion function if there is no conflicting binding to
`C-c |' outside of orgtbl-mode.
S-SPC did lead to an error in orgtbl-mode, because there is no binding
to this key. Now orgtbl-self-insert-command falls back on calling
self-insert-command for such cases.
RET did fail in orgtbl-mode, if the cursor was at the beginning of the
buffer. Now it opens a new line whenever the cursor is at the
beginning of a line, and that includes the beginning of the buffer.....
These are changes that where made in the Emacs CVS.
The change in org-publish is not final, it is still being
discussed - however, the current change should make it possible
to compile and run the code with the latest CVS version of Emacs.
So far, Org used either `fit-window-to-buffer' or
`shrink-window-if-larger-than-buffer' without any further checks when
displaying one of its many help and selection buffers. This can cause
problems if the user has set up Emacs to split windows horizontally
rather than vertically, because the window being shrunken then may be
side-by-side with another window, and shrinking the height of one will
also change the other.
With this patch, shrinking a window always goes through the new
function `org-fit-window-to-buffer' which only acts if the current
window spans the whole width of the frame.
Furthermore, this function also helps with compatibility, because it
falls back to `shrink-window-if-larger-than-buffer' if
`fit-window-to-buffer' does not exist, as is the case on older version
of Emacs and XEmacs.
The *orgtbl-default-fmt* is a hook for orgtbl transformations to
ensure a destination-sensible default for columns not present in
a fmt plist. The leaving the value at nil changes no existing
behavior.
Signed-off-by: Jason Riedy <jason@acm.org>
Conflicts:
ChangeLog
Passing explicit nils to leave out start and end strings feels
natural. Also, transforming org-mode tables into other org-mode
tables can use :tstart and :tend to specify directives, so I
don't want to change the default splice setting for those.
Signed-off-by: Jason Riedy <jason@acm.org>
Conflicts:
ChangeLog
There is an old XEmacs bug with indentation in the presence of
an extent with an invisibility property. We work around this now
by turning the invisibility property off, temporarily.
You can slice a single table full of calculations in different ways
into separate destinations. Or you can format the table differently.
There are many fun and exciting possible uses.
A fancier implementation would scan the document *once* for the
set of destinations. That could help implement another function
to update all destinations from all sources.
Refactor orgtbl-to-generic; explicitly separate heading from body.
Support last-line specializers.
Allow functions for some orgtbl parameters.
Add a :remove-nil-lines parameter to orgtbl-to-generic.
There was a problem that complex fields need a pair of parenthesis
around them. For example, if one field is "a a" and another field
is "a+b", multiplication of the two gave "a^3+b" instead of "a^3+a^2 b".
Now variable replacement puts extra parenthesis around values.