org-table: Fix `org-table-map-tables'

* lisp/org-table.el (org-table-map-tables): Apply function at the
  beginning of the table, not at the first affiliated keyword, if any.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00167.html>
This commit is contained in:
Nicolas Goaziou 2019-04-23 10:35:31 +02:00
parent ffccea7d73
commit 0f9b7114d1

View file

@ -4105,7 +4105,7 @@ beginning and end position of the current table."
(unless quietly
(message "Mapping tables: %d%%"
(floor (* 100.0 (point)) (buffer-size))))
(goto-char (org-element-property :begin table))
(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))