diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 696d29f37..565496d85 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2009-07-02 Carsten Dominik + + * org-table.el (org-table-get-remote-range): Find #+TBLNAME also + when indented. + + * org.el (org-fontify-meta-lines-and-blocks): Make #+TBLNAME + highlight also when indented. + 2009-07-01 Carsten Dominik * org-footnote.el (org-footnote-renumber-fn:N): New command. diff --git a/lisp/org-table.el b/lisp/org-table.el index 6c2f8d83d..410f72164 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -4184,11 +4184,13 @@ list of the fields in the rectangle ." (save-excursion (goto-char (point-min)) (if (re-search-forward - (concat "^#\\+TBLNAME:[ \t]*" (regexp-quote name-or-id) "[ \t]*$") + (concat "^#[ \t]*\\+TBLNAME:[ \t]*" (regexp-quote name-or-id) "[ \t]*$") nil t) (setq buffer (current-buffer) loc (match-beginning 0)) - (setq id-loc (org-id-find name-or-id 'marker) - buffer (marker-buffer id-loc) + (setq id-loc (org-id-find name-or-id 'marker)) + (unless (and id-loc (markerp id-loc)) + (error "Can't find remote table \"%s\"" name-or-id)) + (setq buffer (marker-buffer id-loc) loc (marker-position id-loc)) (move-marker id-loc nil))) (switch-to-buffer buffer) diff --git a/lisp/org.el b/lisp/org.el index fde19b5e2..ddc03082f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4236,7 +4236,7 @@ will be prompted for." beg (match-end 0) '(font-lock-fontified t face org-meta-line)) t) - ((or (member dc1 '("caption:" "label:" "orgtbl:" "tblfm:")) + ((or (member dc1 '("caption:" "label:" "orgtbl:" "tblfm:" "tblname:")) (and (match-end 4) (equal dc3 "attr"))) (add-text-properties beg (match-end 0) @@ -8714,16 +8714,18 @@ This function can be used in a hook." ;;;; Completion (defconst org-additional-option-like-keywords - '("BEGIN_HTML" "BEGIN_LaTeX" "END_HTML" "END_LaTeX" - "ORGTBL" "HTML:" "LaTeX:" "BEGIN:" "END:" "TBLFM" - "LATEX_HEADER:" + '("BEGIN_HTML" "END_HTML" "HTML:" "ATTR_HTML" + "BEGIN_DocBook" "END_DocBook" "DocBook:" "ATTR_DocBook" + "BEGIN_LaTeX" "END_LaTeX" "LaTeX:" "LATEX_HEADER:" "ATTR_LaTeX" + "BEGIN:" "END:" + "ORGTBL" "TBLFM:" "TBLNAME:" "BEGIN_EXAMPLE" "END_EXAMPLE" "BEGIN_QUOTE" "END_QUOTE" "BEGIN_VERSE" "END_VERSE" "BEGIN_CENTER" "END_CENTER" "BEGIN_SRC" "END_SRC" "CATEGORY" "COLUMNS" - "CAPTION" "LABEL" "ATTR_HTML" "ATTR_LaTeX")) + "CAPTION" "LABEL")) (defcustom org-structure-template-alist '(