Function: kfile:narrow-to-kcells

kfile:narrow-to-kcells is an interactive and byte-compiled function defined in kfile.el.

Signature

(kfile:narrow-to-kcells)

Documentation

Narrow kotl file to kcell section only.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kfile.el
(defun kfile:narrow-to-kcells ()
  "Narrow kotl file to kcell section only."
  (interactive)
  (when (kview:is-p kotl-kview)
    (let ((start-text) (end-text))
      (save-excursion
	(widen)
	(goto-char (point-min))
	;; Skip to start of kcells.
	(when (search-forward "\n\^_" nil t)
	  (setq start-text (1+ (match-end 0))))
	;; Skip past end of kcells.
	(when (and start-text (search-forward "\n\^_" nil t))
	  (setq end-text (1+ (match-beginning 0))))
	(if (and start-text end-text)
	    (progn (narrow-to-region start-text end-text)
		   (goto-char (point-min)))
	  (error
	   "(kfile:narrow-to-kcells): Cannot find start or end of kcells"))))))