Function: org-export-get-table-cell-at

org-export-get-table-cell-at is a byte-compiled function defined in ox.el.gz.

Signature

(org-export-get-table-cell-at ADDRESS TABLE INFO)

Documentation

Return regular table-cell object at ADDRESS in TABLE.

Address is a CONS cell (ROW . COLUMN), where ROW and COLUMN are zero-based index. TABLE is a table type element. INFO is a plist used as a communication channel.

If no table-cell, among exportable cells, is found at ADDRESS, return nil.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
(defun org-export-get-table-cell-at (address table info)
  "Return regular table-cell object at ADDRESS in TABLE.

Address is a CONS cell (ROW . COLUMN), where ROW and COLUMN are
zero-based index.  TABLE is a table type element.  INFO is
a plist used as a communication channel.

If no table-cell, among exportable cells, is found at ADDRESS,
return nil."
  (let ((column-pos (cdr address)) (column-count 0))
    (org-element-map
	;; Row at (car address) or nil.
	(let ((row-pos (car address)) (row-count 0))
	  (org-element-map table 'table-row
	    (lambda (row)
	      (cond ((eq (org-element-property :type row) 'rule) nil)
		    ((= row-count row-pos) row)
		    (t (cl-incf row-count) nil)))
	    info 'first-match))
	'table-cell
      (lambda (cell)
	(if (= column-count column-pos) cell
	  (cl-incf column-count) nil))
      info 'first-match)))