Function: org-table-map-tables

org-table-map-tables is an autoloaded and byte-compiled function defined in org-table.el.gz.

Signature

(org-table-map-tables F &optional QUIETLY)

Documentation

Apply function F to the start of all tables in the buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-table.el.gz
;;; Generic Tools

;;;###autoload
(defun org-table-map-tables (f &optional quietly)
  "Apply function F to the start of all tables in the buffer."
  (org-with-point-at 1
    (while (re-search-forward org-table-line-regexp nil t)
      (let ((table (org-element-lineage (org-element-at-point) '(table) t)))
	(when table
	  (unless quietly
	    (message "Mapping tables: %d%%"
		     (floor (* 100.0 (point)) (buffer-size))))
	  (goto-char (org-element-property :post-affiliated table))
	  (let ((end (copy-marker (org-element-property :end table))))
	    (unwind-protect
		(progn (funcall f) (goto-char end))
	      (set-marker end nil)))))))
  (unless quietly (message "Mapping tables: done")))