From 1cc8cdc49e7c3bbe03495f451caae1c179728ea1 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 28 Jun 2015 23:32:38 +0200 Subject: [PATCH] Be more strict when matching an Org table * lisp/org.el (org-at-table-p): Do not allow "+" character at the beginning of a table row. --- lisp/org.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index f8a623d62..23de14d50 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -4499,7 +4499,9 @@ Normal means, no org-mode-specific context." If TABLE-TYPE is non-nil, also check for table.el-type tables. If `org-enable-table-editor' is nil, return nil unconditionally." (and org-enable-table-editor - (save-excursion (beginning-of-line) (looking-at "[ \t]*[|+]")) + (save-excursion + (beginning-of-line) + (org-looking-at-p (if table-type "[ \t]*[|+]" "[ \t]*|"))) (let ((element (org-element-lineage (org-element-at-point) '(table) t))) (and element (or table-type (eq (org-element-property :type element) 'org))))))