Browse Source

Fix some issue with orgtbl-mode

* lisp/org-table.el (orgtbl-send-replace-tbl): Allow multiple spaces between
keywords in RECEIVE ORGTBL lines.
* doc/org.texi (A @LaTeX{} example): Fix typo in variable name.
Carsten Dominik 11 years ago
parent
commit
daf36fc918
2 changed files with 7 additions and 6 deletions
  1. 5 4
      doc/org.texi
  2. 2 2
      lisp/org-table.el

+ 5 - 4
doc/org.texi

@@ -16782,9 +16782,10 @@ can use Org's facilities to edit and structure lists by turning
 @cindex radio tables
 @cindex radio tables
 
 
 To define the location of the target table, you first need to create two
 To define the location of the target table, you first need to create two
-lines that are comments in the current mode, but contain magic words for
-Orgtbl mode to find.  Orgtbl mode will insert the translated table
-between these lines, replacing whatever was there before.  For example:
+lines that are comments in the current mode, but contain magic words
+@code{BEGIN/END RECEIVE ORGTBL} for Orgtbl mode to find.  Orgtbl mode will
+insert the translated table between these lines, replacing whatever was there
+before.  For example in C mode where comments are between @code{/* ... */}:
 
 
 @example
 @example
 /* BEGIN RECEIVE ORGTBL table_name */
 /* BEGIN RECEIVE ORGTBL table_name */
@@ -16858,7 +16859,7 @@ The best way to wrap the source table in @LaTeX{} is to use the
 activated by placing @code{\usepackage@{comment@}} into the document
 activated by placing @code{\usepackage@{comment@}} into the document
 header.  Orgtbl mode can insert a radio table skeleton@footnote{By
 header.  Orgtbl mode can insert a radio table skeleton@footnote{By
 default this works only for @LaTeX{}, HTML, and Texinfo.  Configure the
 default this works only for @LaTeX{}, HTML, and Texinfo.  Configure the
-variable @code{orgtbl-radio-tables} to install templates for other
+variable @code{orgtbl-radio-table-templates} to install templates for other
 modes.}  with the command @kbd{M-x orgtbl-insert-radio-table RET}.  You will
 modes.}  with the command @kbd{M-x orgtbl-insert-radio-table RET}.  You will
 be prompted for a table name, let's say we use @samp{salesfigures}.  You
 be prompted for a table name, let's say we use @samp{salesfigures}.  You
 will then get the following template:
 will then get the following template:

+ 2 - 2
lisp/org-table.el

@@ -4399,14 +4399,14 @@ a radio table."
   (save-excursion
   (save-excursion
     (goto-char (point-min))
     (goto-char (point-min))
     (unless (re-search-forward
     (unless (re-search-forward
-	     (concat "BEGIN RECEIVE ORGTBL +" name "\\([ \t]\\|$\\)") nil t)
+	     (concat "BEGIN +RECEIVE +ORGTBL +" name "\\([ \t]\\|$\\)") nil t)
       (user-error "Don't know where to insert translated table"))
       (user-error "Don't know where to insert translated table"))
     (goto-char (match-beginning 0))
     (goto-char (match-beginning 0))
     (beginning-of-line 2)
     (beginning-of-line 2)
     (save-excursion
     (save-excursion
       (let ((beg (point)))
       (let ((beg (point)))
 	(unless (re-search-forward
 	(unless (re-search-forward
-		 (concat "END RECEIVE ORGTBL +" name) nil t)
+		 (concat "END +RECEIVE +ORGTBL +" name) nil t)
 	  (user-error "Cannot find end of insertion region"))
 	  (user-error "Cannot find end of insertion region"))
 	(beginning-of-line 1)
 	(beginning-of-line 1)
 	(delete-region beg (point))))
 	(delete-region beg (point))))