Promoting and Demoting
Demotion is the act of moving a tree down one or more levels in the outline. The new tree will become either the successor/sibling or the first child of the cell which precedes it in the outline. Promotion is the inverse operation. Note that trees (cells and their entire substructure) are promoted and demoted, not individual cells.
There are many key bindings for demoting and promoting trees. The easiest to type that works regardless of the setting of kotl-mode:tab-flag is {C-c C-.} for demoting the current tree and {C-c C-,} for promoting it. Org-compatible keys {C-c C->} or {M-<left>} and {C-c C-<} or {M-<right>} also work.
Use {C-c [} to toggle the function of TAB and {S-TAB} to demote and promote trees. These also refill the text of each cell not marked with a no-fill property. To override the no-fill property and refill all promoted/demoted cells, use {M-0 TAB} and {M-0 M-TAB}. See Filling. A positive or negative prefix argument to these commands promotes or demotes the tree up to a maximum of that number of levels, depending on what the outline allows at any given point. The same prefix argument works on any of the key bindings for these commands.
Below is a table of all standard key bindings for demotion/promotion of Koutliner trees:
|---------------------------------+-----------------------------|
| Demotion Outside Org Table | Promotion Outside Org Table |
|---------------------------------+-----------------------------|
| C-c C-. | C-c C-, |
| C-c C-> | C-c C-< |
| M-<right> | M-<left> |
| M-S-<right> | M-S-<left> |
| TAB (kotl-mode:tab-flag = nil) | S-TAB |
|---------------------------------+-----------------------------|Note that with kotl-mode:tab-flag = ‘t’, {TAB} executes kotl-mode:indent-line with any prefix argument given. This bypasses all of the functionality in the following tables.
Here is a summary of how different prefix arguments affect the function of these key bindings. With kotl-mode:tab-flag = ‘nil’ (default):
|-------------+------------------------+-------------------------|
| Prefix Arg | TAB Function | Shift-TAB Function |
|-------------+------------------------+-------------------------|
| nil | Demote Tree | Promote Tree |
| C-u | Demote Siblings | Promote Siblings |
| C-u C-u | Reset View Spec | Reset View Spec |
| C-u C-u C-u | Show Whole Outline | Show Whole Outlin |
| 0 | Demote and Refill Tree | Promote and Refill Tree |
| Other ARG | Demote Tree ARG Levels | Promote Tree ARG Levels |
|-------------+------------------------+-------------------------|The Koutliner also supports Org Table editing, see Tables in the Org Mode Manual, via Org table minor mode. Use {M-x orgtbl-mode RET} to toggle this on and off. Alternatively, a press of the Action Key on a | table delimiter also toggles this minor mode on or off.
When orgtbl-mode is enabled within a Koutline and point is inside a table, {TAB} moves forward one table item and {S-TAB} moves backward an item. However, if given any prefix argument, these keys behave as shown in the prior tables.
Within a table, to demote and promote the Koutline tree rooted at point, you can use any of the keys in the following table:
|-----------------------------------------+----------------------------|
| Demotion Inside Org Table | Promotion Inside Org Table |
|-----------------------------------------+----------------------------|
| C-c C-. | C-c C-, |
| C-c C-> | C-c C-< |
|-----------------------------------------+----------------------------|