Function: kotl-mode:copy-tree-to-buffer
kotl-mode:copy-tree-to-buffer is an interactive and byte-compiled
function defined in kotl-mode.el.
Signature
(kotl-mode:copy-tree-to-buffer TARGET-BUF CELL-REF INVISIBLE-FLAG)
Documentation
Copy to point in TARGET-BUF the text of the outline tree rooted at CELL-REF.
Use "0" for whole outline buffer. Invisible text is expanded and included only if INVISIBLE-FLAG is non-nil.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
(defun kotl-mode:copy-tree-to-buffer (target-buf cell-ref invisible-flag)
"Copy to point in TARGET-BUF the text of the outline tree rooted at CELL-REF.
Use \"0\" for whole outline buffer. Invisible text is expanded and
included only if INVISIBLE-FLAG is non-nil."
(interactive
(let ((label-default (kcell-view:label)))
(hargs:iform-read
`(interactive
(list
(prog1
(setq target-buf (hargs:read-buffer-name
(format "Buffer to copy tree text to (default %s): " (other-buffer))))
(when (buffer-local-value 'buffer-read-only (get-buffer target-buf))
(signal 'buffer-read-only (list target-buf))))
(hargs:read (format "Tree number to copy to %s: (0 for whole outline) "
target-buf)
nil ,label-default nil 'kcell)
(y-or-n-p "Include any invisible text? "))))))
(message "") ;; Erase last interactive prompt, if any.
(setq target-buf (get-buffer-create target-buf))
(if (equal cell-ref "0")
(kotl-mode:copy-region-to-buffer target-buf (point-min) (point-max) nil invisible-flag)
(let (start end)
(save-excursion
(kotl-mode:goto-cell cell-ref t)
(save-excursion (kfill:forward-line 0) (setq start (point)))
(kotl-mode:to-valid-position)
(setq end (kotl-mode:tree-end)))
(kotl-mode:copy-region-to-buffer target-buf start end nil invisible-flag))))