Function: orgtbl--skip

orgtbl--skip is a byte-compiled function defined in org-table.el.gz.

Signature

(orgtbl--skip AST _ INFO)

Documentation

Extract first X table rows from AST.

X is taken from :skip property in INFO plist. Return the modified AST.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-table.el.gz
(defun orgtbl--skip (ast _ info)
  "Extract first X table rows from AST.
X is taken from :skip property in INFO plist.
Return the modified AST."
  (when-let* ((skip (plist-get info :skip)))
    (unless (wholenump skip) (user-error "Wrong :skip value"))
    (let ((n 0))
      (org-element-map ast 'table-row
        (lambda (row)
	  (if (>= n skip) t
	    (org-element-extract row)
	    (cl-incf n)
	    nil))
        nil t)))
  ast)