Koutliner Keys
This appendix summarizes the specialized key bindings available when editing a koutline with Hyperbole. Each key is shown together with its command binding and the documentation for that command. Normal emacs editing keys are modified to account for the structure within outlines. An outliner command which overloads an emacs command named cmd is named kotl-mode:cmd.
kfile:write {C-x C-w}
Write the current outline to FILE.
klink:create {C-c l}
Insert at point an implicit link to REFERENCE. REFERENCE should be a cell-ref or a string containing "filename, cell-ref". See the documentation for (kcell:ref-to-id) for valid cell-ref formats.
kotl-mode:add-below-parent {C-c p}
Add a new cell to current kview after current cell’s parent. If parent is the hidden root cell 0, then add as the first cell of the outline. Otherwise, add it as the next sibling of the parent cell.
kotl-mode:add-cell {C-j}
Add a cell following current cell at optional RELATIVE-LEVEL with CONTENTS string. Optional prefix arg RELATIVE-LEVEL means add as sibling if nil or >= 0, as child if equal to universal argument, {C-u}, and as sibling of current cell’s parent, otherwise. If added as sibling of current level, RELATIVE-LEVEL is used as a repeat count for the number of cells to add.
Return last newly added cell.
kotl-mode:add-child {C-c a}
Add a new cell to current kview as first child of current cell.
kotl-mode:add-prior-cell
Add a new cell to current kview as a prior sibling of the current cell.
kotl-mode:append-cell {C-c +}
Append the CONTENTS-CELL to APPEND-TO-CELL. If neither cell has a no-fill property and kotl-mode:refill-flag is enabled, then APPEND-TO-CELL is refilled.
kotl-mode:back-to-indentation {M-m}
Move point to the first non-read-only non-whitespace character on this line.
kotl-mode:backward-cell {C-c C-b}
Move to prefix ARGth prior cell (same level) within current view. Return number of cells left to move.
kotl-mode:backward-char {C-b}
Move point backward ARG (or 1) characters and return point.
kotl-mode:backward-kill-word {M-DEL}
Kill up to prefix ARG (or 1) words preceding point within a single cell.
kotl-mode:backward-sentence {M-a}
Move point backward ARG (or 1) sentences and return point.
kotl-mode:backward-word {M-b}
Move point backward ARG (or 1) words and return point.
kotl-mode:beginning-of-buffer {M-<}
Move point to beginning of buffer and return point.
kotl-mode:beginning-of-cell {C-c ,}
Move point to beginning of current or ARGth - 1 prior cell and return point.
kotl-mode:beginning-of-line {C-a}
Move point to beginning of current or ARGth - 1 line and return point.
kotl-mode:beginning-of-tree {C-c ^}
Move point to the level 1 root of the current cell’s tree. Leave point at the start of the cell.
kotl-mode:cell-help {C-c h}
Display a temporary buffer of CELL-REF’s attributes. CELL-REF defaults to current cell. Optional prefix arg CELLS-FLAG selects the cells to print:
If = 1, print CELL-REF's cell only;
If > 1, print the visible tree rooted at CELL-REF;
If < 1, print all visible cells in current view
(In this last case, CELL-REF is not used).See also the documentation for kotl-mode:cell-attributes.
kotl-mode:center-line {M-s}
Center the line point is on, within the width specified by fill-column. This means adjusting the indentation so that it equals the distance between the end of the text and fill-column.
kotl-mode:center-paragraph {M-S}
Center each nonblank line in the paragraph at or after point. See center-line for more information.
kotl-mode:copy-after {C-c c}
Copy tree rooted at FROM-CELL-REF to follow tree rooted at TO-CELL-REF. If prefix arg CHILD-P is non-nil, make FROM-CELL-REF the first child of TO-CELL-REF, otherwise make it the sibling following TO-CELL-REF.
Leave point at the start of the root cell of the new tree.
kotl-mode:copy-before {C-c C-c}
Copy tree rooted at FROM-CELL-REF to precede tree rooted at TO-CELL-REF. If prefix arg PARENT-P is non-nil, make FROM-CELL-REF the first child of TO-CELL-REF’s parent, otherwise make it the preceding sibling of TO-CELL-REF.
Leave point at the start of the root cell of the new tree.
kotl-mode:copy-tree-or-region-to-buffer {C-c M-c}
If no usable active region, prompt for and copy a Koutline tree to a specified buffer, otherwise, copy the active region.
Use 0 to copy the whole outline buffer. Prompt for whether or not to expand and include any hidden/invisible text within the copied text.
kotl-mode:copy-to-register {C-x x}
Copy into REGISTER the region START to END. With optional prefix arg DELETE-FLAG, delete region.
kotl-mode:delete-backward-char {DEL}
Delete up to the preceding prefix ARG characters. Return number of characters deleted. Optional KILL-FLAG non-nil means save in kill ring instead of deleting. Do not delete across cell boundaries.
kotl-mode:delete-blank-lines {C-x C-o}
On blank line within a cell, delete all surrounding blank lines, leaving just one. On isolated blank line, delete that one. On nonblank line, delete all blank lines that follow it.
If nothing but whitespace follows point until the end of a cell, delete all whitespace at the end of the cell.
kotl-mode:delete-char {C-d}
Delete up to prefix ARG characters following point. Return number of characters deleted. Optional KILL-FLAG non-nil means save in kill ring instead of deleting. Do not delete across cell boundaries.
kotl-mode:delete-indentation {M-^}
Join this line to previous and fix up whitespace at join. If there is a fill prefix, delete it from the beginning of this line. With argument, join this line to the following line.
kotl-mode:demote-tree {TAB}
Move current tree a maximum of prefix ARG levels lower in current view. Each cell is refilled iff its no-fill attribute is nil and kotl-mode:refill-flag is non-nil. With prefix ARG = 0, cells are demoted up to one level and kotl-mode:refill-flag is treated as true.
kotl-mode:down-level {C-c C-d}
Move down prefix ARG levels lower within current tree.
kotl-mode:end-of-buffer {M->}
Move point to the end of buffer and return point.
kotl-mode:end-of-cell {C-c .}
Move point to end of current or ARGth - 1 succeeding cell and return point.
kotl-mode:end-of-line {C-e}
Move point to end of current or ARGth - 1 line and return point.
kotl-mode:end-of-tree {C-c $}
Move point to the last cell in tree rooted at the current cell. Leave point at the start of the cell.
kotl-mode:example
Display the Koutliner example file for demonstration use by a user.
kotl-mode:exchange-cells {C-c e}
Exchange CELL-REF-1 with CELL-REF-2 in current view. Don’t move point.
kotl-mode:fill-cell {C-c M-j}
Fill current cell if it lacks the no-fill attribute. With optional JUSTIFY, justify cell as well. IGNORE-COLLAPSED-P is used when caller has already expanded cell, indicating it is not collapsed.
kotl-mode:fill-paragraph {C-x f}
Fill current paragraph within cell. With optional JUSTIFY, justify paragraph as well. Ignore any non-nil no-fill attribute attached to the cell.
kotl-mode:fill-tree {C-M-j}
Refill each cell within the tree whose root is at point.
kotl-mode:first-sibling {C-c <}
Move point to the first sibling of the present cell. Leave point at the start of the cell or at its present position if it is already within the first sibling cell.
kotl-mode:fkey-backward-char {C-b} or {left}
Move point backward ARG (or 1) characters and return point.
kotl-mode:fkey-forward-char {C-f} or {right}
Move point forward ARG (or 1) characters and return point.
kotl-mode:fkey-next-line {C-n} or {down}
Move point to ARGth next line and return point.
kotl-mode:fkey-previous-line {C-p} or {up}
Move point to ARGth previous line and return point.
kotl-mode:forward-cell {C-c C-f}
Move to the prefix ARG following cell (same level) within current view. Return number of cells left to move.
kotl-mode:forward-char {C-f}
Move point forward ARG (or 1) characters and return point.
kotl-mode:forward-para {M-n}
Move to prefix ARGth next cell (any level) within current view.
kotl-mode:forward-paragraph {M-]}
Move to prefix ARG next cell (any level) within current view.
kotl-mode:forward-sentence {M-e}
Move point forward ARG (or 1) sentences and return point.
kotl-mode:forward-word {M-f}
Move point forward ARG (or 1) words and return point.
kotl-mode:goto-cell {C-c g}
Move point to start of cell given by CELL-REF. (See the documentation for (kcell:ref-to-id), for valid formats). Return point iff CELL-REF is found within current view. With a prefix argument, CELL-REF is assigned the argument value for use as an idstamp.
Optional second arg, ERROR-P, non-nil means signal an error if CELL-REF is not found within current view. Will signal same error if called interactively when CELL-REF is not found.
kotl-mode:hide-sublevels {C-X $}
Hide all cells in outline at levels deeper than LEVELS-TO-KEEP (a number). Show any hidden cells within LEVELS-TO-KEEP. 1 is the first level.
kotl-mode:hide-subtree {C-M-h}
Hide subtree, ignoring root, at optional CELL-REF (defaults to cell at point).
kotl-mode:hide-tree {C-c BS}
Collapse tree rooted at optional CELL-REF (defaults to cell at point).
kotl-mode:indent-line {TAB}
Indent line relative to the previous one. With optional prefix ARG greater than 1, tab forward ARG times. See the documentation string of ‘kotl-mode:indent-tabs-mode’ for details on when tabs are used for indenting.
kotl-mode:indent-region {C-M-\}
Indent each nonblank line in the region from START to END. If there is a fill prefix, make each line start with the fill prefix. With argument COLUMN, indent each line to that column. Called from a program, takes three args: START, END and COLUMN.
kimport:insert-file {C-x i}
Insert each paragraph in IMPORT-FROM as a separate cell in the current view. Insert as sibling cells following the current cell. IMPORT-FROM may be a buffer name or filename (filename completion is provided).
kimport:insert-register {C-x r i}
Insert contents of REGISTER at point in current cell. REGISTER is a character naming the register to insert. Normally puts point before and mark after the inserted text. If optional second arg is non-nil, puts mark before and point after. Interactively, second arg is non-nil if prefix arg is supplied.
kotl-mode:just-one-space {M-\}
Delete all spaces and tabs around point and leave one space.
kotl-mode:kill-contents {C-c k}
Kill contents of cell from point to cell end. With prefix ARG, kill entire cell contents.
kotl-mode:kill-line {C-k}
Kill ARG lines from point.
kotl-mode:kill-region {C-w}
Kill region between START and END within a single kcell. With optional COPY-P equal to t, copy region to kill ring but don’t kill it. With COPY-P any other non-nil value, return region as a string without affecting the kill ring.
If called interactively and there is no active region, copy any delimited selectable thing at point; see the documentation for hui:delimited-selectable-thing.
If the buffer is read-only and COPY-P is nil, the region will not be deleted but it will be copied to the kill ring and then an error will be signaled.
If a completion is active, this aborts the completion only.
kotl-mode:kill-ring-save {M-w}
Copy region between START and END within a single kcell to kill ring.
kotl-mode:kill-sentence {M-k}
Kill up to prefix ARG (or 1) sentences following point within a single cell.
kotl-mode:kill-tree {C-c C-k}
Kill ARG following trees starting with tree rooted at point. If ARG is a non-positive number, nothing is done.
kotl-mode:kill-word {M-d}
Kill up to prefix ARG words following point within a single cell.
kotl-mode:last-sibling {C-c >}
Move point to the last sibling of the present cell. Leave point at the start of the cell or at its present position if it is already within the last sibling cell.
kotl-mode:mail-tree {C-c C-@}
Mail outline tree rooted at CELL-REF. Use "0" for whole outline buffer.
kotl-mode:move-after {C-c m}
Move tree rooted at FROM-CELL-REF to follow tree rooted at TO-CELL-REF. If prefix arg CHILD-P is non-nil, make FROM-CELL-REF the first child of TO-CELL-REF, otherwise make it the sibling following TO-CELL-REF. With optional COPY-P, copy tree rather than moving it.
Leave point at original location but return the tree’s new start point.
kotl-mode:move-before {C-c RET}
Move tree rooted at FROM-CELL-REF to precede tree rooted at TO-CELL-REF. If prefix arg PARENT-P is non-nil, make FROM-CELL-REF the first child of TO-CELL-REF’s parent, otherwise make it the preceding sibling of TO-CELL-REF. With optional COPY-P, copy tree rather than moving it.
Leave point at original location but return the tree’s new start point.
kotl-mode:newline {RET}
Insert a newline. With ARG, insert ARG newlines. In Auto Fill mode, if no numeric arg, break the preceding line if it is too long.
kotl-mode:next-cell {C-c C-n}
Move to prefix ARG next cell (any level) within current view.
kotl-mode:next-line {C-n}
Move point to ARGth next line and return point.
kotl-mode:open-line {C-o}
Insert a newline and leave point before it. With arg N, insert N newlines.
kotl-mode:overview {C-c C-o}
Show only the first line of each cell in the current outline. With a prefix arg, also toggle the display of blank lines between cells.
kotl-mode:previous-cell {C-c C-p}
Move to prefix ARG previous cell (any level) within current view.
kotl-mode:previous-line {C-p}
Move point to ARGth previous line and return point.
kotl-mode:promote-tree {M-TAB} or {SHIFT-TAB}
Move current tree a maximum of prefix ARG levels higher in current view. Each cell is refilled iff its no-fill attribute is nil and kotl-mode:refill-flag is non-nil. With prefix ARG = 0, cells are promoted up to one level and kotl-mode:refill-flag is treated as true.
kotl-mode:scroll-down {M-v}
Scroll text of current window downward ARG lines; or a windowful if no ARG.
kotl-mode:scroll-up {C-v}
Scroll text of current window upward ARG lines; or a windowful if no ARG.
kotl-mode:set-cell-attribute {C-c C-i}
Include ATTRIBUTE VALUE with the current cell or the cell at optional POS. Replace any existing value that ATTRIBUTE has. When called interactively, display the setting in the minibuffer as confirmation.
kotl-mode:set-fill-prefix {C-x l}
Set fill prefix to line up to point. With prefix arg TURN-OFF or at begin of line, turn fill prefix off.
kotl-mode:show-all {C-c C-a}
Show (expand) all cells in current view. With a prefix arg, also toggle the display of blank lines between cells.
kotl-mode:show-subtree
Show subtree, ignoring root, at optional CELL-REF (defaults to cell at point).
kotl-mode:show-tree {C-c C-s}
Display fully expanded tree rooted at CELL-REF.
kotl-mode:split-cell {C-c s}
Split cell into two cells and move to new cell. Cell contents after point become part of newly created cell. Default is to create new cell as sibling of current cell. With optional universal ARG, {C-u}, new cell is added as child of current cell.
kotl-mode:top-cells {C-c C-t}
Collapse all level 1 cells in view and hide any deeper sublevels. With a prefix arg, also toggle the display of blank lines between cells.
kotl-mode:transpose-cells {C-c t}
Exchange current and previous visible cells, leaving point after both. If no previous cell, exchange current with next cell. With prefix ARG, take current cell and move it past ARG cells. With prefix ARG = 0, interchange the cell that contains point with the cell that contains mark.
kotl-mode:transpose-chars {C-t}
Interchange characters around point, moving forward one character. With prefix ARG, take character before point and drag it forward past ARG other characters (backward if ARG negative). If no prefix ARG and at end of line, the previous two characters are exchanged.
kotl-mode:transpose-lines {C-x C-t}
Exchange current line and previous line, leaving point after both. If no previous line, exchange current with next line. With prefix ARG, take previous line and move it past ARG lines. With prefix ARG = 0, interchange the line that contains point with the line that contains mark.
kotl-mode:transpose-words {M-t}
Interchange words around point, leaving point after both words. With prefix ARG, take word before or around point and drag it forward past ARG other words (backward if ARG negative). If ARG is zero, the words around or after point and around or after mark are interchanged.
kotl-mode:up-level {C-c C-u}
Move up prefix ARG levels higher in current outline view.
kotl-mode:yank {C-y}
Reinsert the last stretch of killed text. More precisely, reinsert the stretch of killed text most recently killed OR yanked. Put point at end, and set mark at beginning. With just C-u as argument, same but put point at beginning (and mark at end). With argument N, reinsert the Nth most recently killed stretch of killed text. See also the command, (kotl-mode:yank-pop).
kotl-mode:yank-pop {M-y}
Replace just-yanked stretch of killed text with a different stretch. This command is allowed only immediately after a (yank) or a (yank-pop). At such a time, the region contains a stretch of reinserted previously-killed text. (yank-pop) deletes that text and inserts in its place a different stretch of killed text.
With no argument, the previous kill is inserted. With argument N, insert the Nth previous kill. If N is negative, this is a more recent kill.
The sequence of kills wraps around, so that after the oldest one comes the newest one.
kotl-mode:zap-to-char {M-z}
Kill up to and including prefix ARGth occurrence of CHAR. Goes backward if ARG is negative; error if CHAR not found.
kview:set-label-separator {C-c M-l}
Set the LABEL-SEPARATOR (a string) between labels and cell contents for the current kview. With optional prefix arg SET-DEFAULT-P, the default separator value used for new outlines is also set to this new value.
kview:set-label-type {C-c C-l}
Change kview’s label display type to NEW-TYPE, updating all displayed labels. See documentation for the kview:default-label-type variable, for valid values of NEW-TYPE.
kvspec:activate {C-c C-v}
Activate optional VIEW-SPEC or existing view specification over the current koutline. VIEW-SPEC must be a string. See ‘<${hyperb:dir}/kotl/EXAMPLE.kotl#2b17=048>’ for details on valid view specs.
kvspec:toggle-blank-lines {C-c b}
Toggle blank lines between cells on or off.