Carsten Dominik 17 лет назад
Родитель
Сommit
f22be634d2
2 измененных файлов с 7 добавлено и 2 удалено
  1. 3 0
      lisp/ChangeLog
  2. 4 2
      lisp/org.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-08-04  Carsten Dominik  <carsten.dominik@gmail.com>
 2009-08-04  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
+	* org.el (org-table-map-tables): Make sure cursor is back at table
+	beginning after funcall.
+
 	* org-agenda.el (org-agenda-bulk-action): Make sure parents are
 	* org-agenda.el (org-agenda-bulk-action): Make sure parents are
 	handled before children, and do not error if an entry is not
 	handled before children, and do not error if an entry is not
 	found, probably because it hase been remove when the parent was
 	found, probably because it hase been remove when the parent was

+ 4 - 2
lisp/org.el

@@ -3028,8 +3028,10 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables."
       (while (re-search-forward org-table-any-line-regexp nil t)
       (while (re-search-forward org-table-any-line-regexp nil t)
 	(message "Mapping tables: %d%%" (/ (* 100.0 (point)) (buffer-size)))
 	(message "Mapping tables: %d%%" (/ (* 100.0 (point)) (buffer-size)))
 	(beginning-of-line 1)
 	(beginning-of-line 1)
-	(if (looking-at org-table-line-regexp)
-	    (save-excursion (funcall function)))
+	(when (looking-at org-table-line-regexp)
+	  (save-excursion (funcall function))
+	  (or (looking-at org-table-line-regexp)
+	      (forward-char 1)))
 	(re-search-forward org-table-any-border-regexp nil 1))))
 	(re-search-forward org-table-any-border-regexp nil 1))))
   (message "Mapping tables: done"))
   (message "Mapping tables: done"))