Entering Data
*************

The different values in Oleo
============================

A value can be a literal (an immediate value, like "foo", 16, or #TRUE), a function call, or another expression. There are 5 types of values:

  * Integers.

  * Floats, expressed in the usual format: [-]NNN[.NNN][e[-]NNN], e.g., -103.14e-7 or .00000012 or 103.14.

  * Strings, which are surrounded by double quotes.  To include unusual characters, you can either quote them with a backslash (e.g., "This is \"quoted\".") or use an octal escape code: \NNN where NNN is the octal code for the ASCII value of the character.

  * Expressions, such as @sum(A1.B3), or A1 + B2.

  * Errors, which have alphabetic names and start with a # sign.

  * Booleans, which are "error" values of either #TRUE or #FALSE.

Entering values in a cell
=========================

To enter values into an empty cell, simply start typing. To replace the contents of a cell or of all cells in a region, use

=
     Replace the contents of the current cell. (set-cell)

M-=
     Replace the contents of a region. (set-cell-region)

For example, to put the numbers 2,3,...,11 in the  cells from B1 to B10, type

             M-=  B1.B10   RET   @row()+1   RET

Editing in the input line
=========================

When the spreadsheet is reading text input, you can use a few text-editing commands.  Note that there in no history mechanism and no yank command.  If you accidentally type C-u, the text is erased. (This will be improved in the future.)

While the input area is active, the commands that move the cell cursor are disabled.  If you want to move the cell cursor, use the other-window command (C-x o) to leave and later reenter the input area.

M-a
     Insert/over-write an absolute reference to the current cell/region. (insert-abs-ref)

M-r
     Insert/over-write a relative reference to the current cell/region. (insert-rel-ref)

C-e
     Insert/over-write the expression in the current cell into the input area. (insert-cell-expression)

M-e
     Insert/over-write the value (not the formula) of the current cell into the input area. (insert-cell-value)

C-a
     Move the cursor to the beginning of the text. (cursor-begin-line)

C-e
     Move to the end of the text. (cursor-end-line)

C-b
     Move the cursor back a character. (cursor-back-char)

M-b
     Move back a word. (cursor-back-word)

C-f
     Move forward a character. (cursor-fwd-char)

M-f
     Move forward a word. (cursor-fwd-word)

C-d
     Delete the character under the cursor. (delete-next-char)

M-d
     Delete the word under the cursor.  (delete-next-word)

C-?
     Delete the character to the left of the cursor. (delete-prev-char)

M-C-?
     Delete the word to the left of the cursor. (delete-prev-word)

C-k
     Delete from the cursor to the end of the text. (delete-to-end)

C-o
     Move the cursor into the cell area.

The following commands are not bound to any keys

toggle-overwrite
     Toggle between overwrite and insert mode.

delete-to-start
     Deletes from the cursor to the beginning of the line

Almost all editing commands remember what you typed the last time you used that command, and start you up editing a copy of that text.  If you want to type in something completely new, just type C-x (or C-u) and type in your new text.

Moving to the next input cell while editing
===========================================

When you are finished entering data in a cell, you type RET. If you wish to enter data in the cell below, type either C-i or the down-arrow key, and you are placed in the  cell below, waiting for input.  If you type the up-arrow key, you are placed in the cell above, waiting for input. If you type C-j, you move to the right.  The direction of C-i can be changed - the commands are  given below.  For example, if you wish to move upwards when you type C-i, type C-x m ^.

C-i
     Enter the data, and move to next cell.  The tab key also does this. (next-edit)

C-j
     Enter the data, and move to next cell in alternative direction (next-edit-set)

C-x m ^
     auto-move-up

C-x m v
     auto-move-down

C-x m <
     auto-move-left

C-x m >
     auto-move-right

C-x m `
     auto-move-up-left

C-x m '
     auto-move-up-right

C-x m /
     auto-move-down-left

C-x m \
     auto-move-down-right

C-x m
     auto-move-no-motion