From 04fe96d8782719b2ef90afd16c6b3dcfbd9349c6 Mon Sep 17 00:00:00 2001 From: Konubinix Date: Wed, 20 Aug 2014 14:32:47 +0200 Subject: [PATCH] Make the regexp matching the beginning of a table more explicit * org-table.el (org-table-get-remote-range): Make the regexp matching the beginning of a table more explicit, all | characters were matched, even those contained into the :tags value (like in :tags "@home|@computer"). This caused the | character to be interpreted as the beginning of a line. Now, the | is matched only if it is at the beginning at a line (modulo beginning spaces). --- lisp/org-table.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index d1609f9..5654783 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -42,7 +42,7 @@ (string backend &optional body-only ext-plist)) (declare-function aa2u "ext:ascii-art-to-unicode" ()) (declare-function calc-eval "calc" (str &optional separator &rest args)) - + (defvar orgtbl-mode) ; defined below (defvar orgtbl-mode-menu) ; defined when orgtbl mode get initialized (defvar constants-unit-system) @@ -2768,7 +2768,7 @@ not overwrite the stored one." (user-error "Invalid field specifier \"%s\"" (match-string 0 form))) (setq form (replace-match formrpl t t form))) - + (if lispp (setq ev (condition-case nil (eval (eval (read form))) @@ -5053,7 +5053,7 @@ list of the fields in the rectangle." (widen) (goto-char loc) (forward-char 1) - (unless (and (re-search-forward "^\\(\\*+ \\)\\|[ \t]*|" nil t) + (unless (and (re-search-forward "^\\(\\*+ \\)\\|^[ \t]*|" nil t) (not (match-beginning 1))) (user-error "Cannot find a table at NAME or ID %s" name-or-id)) (setq tbeg (point-at-bol)) -- 2.0.1