Function: smart-outline-assist

smart-outline-assist is an interactive and byte-compiled function defined in hui-mouse.el.

Signature

(smart-outline-assist)

Documentation

Collapse, expand, and move outline entries.

Invoked via an assist key press when in outline-mode. It assumes that its caller has already checked that the assist key was pressed in an appropriate buffer and has moved the cursor to the selected buffer.

If assist key is pressed:
 (1) after an outline heading has been cut via the action key, allow
     multiple pastes throughout the buffer (last paste should be done with
     the Action Key, not the Assist Key);
 (2) at the end of buffer, hide all bodies in buffer;
 (3) at the beginning of a heading line, cut the current heading (sans
     subtree) from the buffer;
 (4) on a heading line but not at the beginning or end, if heading body is
     hidden then show it, otherwise hide it;
 (5) at the end of a line, invoke assist-key-eol-function, typically to
     scroll down a windowful.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-mouse.el
(defun smart-outline-assist ()
  "Collapse, expand, and move outline entries.
Invoked via an assist key press when in `outline-mode'.  It assumes that
its caller has already checked that the assist key was pressed in an
appropriate buffer and has moved the cursor to the selected buffer.

If assist key is pressed:
 (1) after an outline heading has been cut via the action key, allow
     multiple pastes throughout the buffer (last paste should be done with
     the Action Key, not the Assist Key);
 (2) at the end of buffer, hide all bodies in buffer;
 (3) at the beginning of a heading line, cut the current heading (sans
     subtree) from the buffer;
 (4) on a heading line but not at the beginning or end, if heading body is
     hidden then show it, otherwise hide it;
 (5) at the end of a line, invoke `assist-key-eol-function', typically to
     scroll down a windowful."

  (interactive)
  (cond (smart-outline-cut (yank))
	((smart-eobp) (outline-hide-body))
	((and (bolp) (looking-at outline-regexp))
	 (setq smart-outline-cut t)
	 (kill-region (point)
		      ;; Skip past start of current entry
		      (progn (re-search-forward outline-regexp nil t)
			     (smart-outline-to-entry-end))))
	((eolp)
	 (funcall assist-key-eol-function))
	((zerop (smart-outline-level))
	 nil)
	;; On an outline heading line but not at the start/end of line.
	((smart-outline-subtree-hidden-p)
	 (outline-show-entry))
	(t (outline-hide-entry))))