Function: kotl-mode:action-key
kotl-mode:action-key is an interactive and byte-compiled function
defined in kotl-mode.el.
Signature
(kotl-mode:action-key)
Documentation
Collapses, expands, links to, and scrolls through koutline cells.
Invoked via a key press when in kotl-mode. It assumes that its caller has already checked that the key was pressed in an appropriate buffer and has moved the cursor to the selected buffer.
If key is pressed:
(1) at the end of buffer, uncollapse and unhide all cells in view;
(2) within a cell, if its subtree is hidden then show it,
otherwise hide it;
(3) between cells or within the read-only indentation region to the left of
a cell, then move point to prior location and begin creation of a
klink to some other outline cell; press the Action Key twice to select the
link referent cell;
(4) anywhere else, invoke action-key-eol-function, typically to scroll up
a windowful.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
;;; ------------------------------------------------------------------------
;;; Smart Key Support
;;; ------------------------------------------------------------------------
(defun kotl-mode:action-key ()
"Collapses, expands, links to, and scrolls through koutline cells.
Invoked via a key press when in kotl-mode. It assumes that its caller has
already checked that the key was pressed in an appropriate buffer and has
moved the cursor to the selected buffer.
If key is pressed:
(1) at the end of buffer, uncollapse and unhide all cells in view;
(2) within a cell, if its subtree is hidden then show it,
otherwise hide it;
(3) between cells or within the read-only indentation region to the left of
a cell, then move point to prior location and begin creation of a
klink to some other outline cell; press the Action Key twice to select the
link referent cell;
(4) anywhere else, invoke `action-key-eol-function', typically to scroll up
a windowful."
(interactive)
(cond ((kotl-mode:eobp) (kotl-mode:show-all))
((kotl-mode:eolp t) (funcall action-key-eol-function))
((not (kview:valid-position-p))
(if (markerp action-key-depress-prev-point)
(progn (select-window
(get-buffer-window
(marker-buffer action-key-depress-prev-point)))
(goto-char (marker-position action-key-depress-prev-point))
(call-interactively 'klink:create))
(kotl-mode:to-valid-position)
(error "(kotl-mode:action-key): Action Key released at invalid position")))
((and (/= (point) (point-max)) (= (following-char) ?|)
(or (org-at-table-p t) (looking-at "[| \t]+$")))
;; On a | separator in a table, toggle Org table minor mode
(orgtbl-mode 'toggle)
(message "Org table minor mode %s" (if orgtbl-mode "enabled" "disabled")))
((org-at-table-p t)
;; Wrap the table cell or region
(org-table-wrap-region current-prefix-arg))
(t ;; On a cell line (not at the end of line).
(if (smart-outline-subtree-hidden-p)
(kotl-mode:show-tree)
(kotl-mode:hide-tree))))
(kotl-mode:to-valid-position))