Function: kcell-view:child

kcell-view:child is a byte-compiled function defined in kview.el.

Signature

(kcell-view:child &optional VISIBLE-P LBL-SEP-LEN)

Documentation

Move to start of current cell's child.

With optional VISIBLE-P, consider only visible children. Return t unless cell has no matching child. Optional LBL-SEP-LEN is the length of the separation between a cell's label and the start of its contents.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kview.el
(defun kcell-view:child (&optional visible-p lbl-sep-len)
  "Move to start of current cell's child.
With optional VISIBLE-P, consider only visible children.
Return t unless cell has no matching child.
Optional LBL-SEP-LEN is the length of the separation between
a cell's label and the start of its contents."
  (let* ((opoint (point))
	 (prev-indent (kcell-view:indent nil lbl-sep-len))
	 (next (kcell-view:next visible-p lbl-sep-len)))
    (unless lbl-sep-len
      (setq lbl-sep-len (kview:label-separator-length kotl-kview)))
    ;; Since kcell-view:next leaves point at the start of a cell, the cell's
    ;; indent is just the current-column of point.
    (if (and next (>= (- (current-column) prev-indent)
		      (kview:level-indent kotl-kview)))
	t
      ;; Move back to previous point and return nil.
      (goto-char opoint)
      nil)))