andrew dasys wrote: > > * MASH > | id | Actor | Character | > |----+---------------+---------------------------| > | 1 | Allan Alda | "Hawkeye" Benjamin Pierce | > | 2 | Gary Burghoff | "Radar" Walter O'Reilly | > | 3 | Loretta Switt | "Hotlips" Margaret Hoolihan | > > ....[export to latex gets error].... I cannot reproduce this - the export succeeds (but see below). Version info: GNU Emacs 23.0.91.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2009-03-06 on alphaville.usa.hp.com Org-mode version 6.24 > > Debugger entered--Lisp error: (wrong-number-of-arguments #[(string &optional separators) "†ÆÇȉÉ > ƒ& ǔUƒ& GWƒ& T‚' #ƒYǔ GWƒYÊǔÇ=„SǔǕ=ƒKǔ =„S ǔO BǕ‚ G=„g ÈO B Ÿ,‡" [separators list notfirst start rexp string "[ > ]+" 0 nil string-match t] 5 1390318] 3) > split-string(#("| id | Actor | Character |\n|----+---------------+-------------------------------|\n| 1 | Allan Alda | ``Hawkeye'' Benjamin Pierce |\n| 2 | Gary Burghoff | ``Radar'' Walter O'Reilly |\n| 3 | Loretta Switt | ``Hotlips'' Margaret Hoolihan |\n" 0 2 nil 2 4 (org-label nil org-attributes nil org-caption nil fontified nil) 4 7 nil 7 12 (org-label nil org-attributes nil org-caption nil fontified nil) 12 23 nil 23 32 (org-label nil org-attributes nil org-caption nil fontified nil) 32 113 nil 113 114 (org-label nil org-attributes nil org-caption nil fontified nil) 114 117 nil 117 127 (org-label nil org-attributes nil org-caption nil fontified nil) 127 133 nil 133 135 (org-protected t) 135 141 (org-label nil org-attributes nil org-caption nil fontified nil) 141 142 (org-protected t fontified nil org-caption nil org-attributes nil org-label nil) 142 144 (org-protected t) 144 160 (org-label nil org-attributes nil org-caption nil fontified nil) 160 168 nil 168 169 (org-label nil org-attributes nil org-caption nil fontified nil) 169 172 nil 172 185 (org-label nil org-attributes nil org-caption nil fontified nil) 185 188 nil 188 190 (org-protected t) 190 194 (org-label nil org-attributes nil org-caption nil fontified nil) 194 195 (org-protected t fontified nil org-caption nil org-attributes nil org-label nil) 195 197 (org-protected t) 197 213 (org-label nil org-attributes nil org-caption nil fontified nil) 213 223 nil 223 224 (org-label nil org-attributes nil org-caption nil fontified nil) 224 227 nil 227 240 (org-label nil org-attributes nil org-caption nil fontified nil) 240 243 nil 243 245 (org-protected t) 245 251 (org-label nil org-attributes nil org-caption nil fontified nil) 251 252 (org-protected t fontified nil org-caption nil org-attributes nil org-label nil) 252 254 (org-protected t) 254 272 (org-label nil org-attributes nil org-caption nil fontified nil) 272 275 nil) "\n" t) > (setq lines (split-string raw-table "\n" t)) ... and this looks very strange to me: split-string is similar to AWK's or Python's split() function, which is supposed to split a string using the given separator, and return a list of substrings. The argument to split-string is correct (the raw table as a string), as is the separator ("\n"). So where does split-string get the ungodly mess shown above? Is it possible that you have redefined split-string somehow? Or perhaps some matching function that split-string uses? What happens if you evaluate the following (just press C-x C-e after the closing paren or cut-and-paste the expression into the *scratch* buffer and press C-j)? What happens if you restart your emacs with -Q and evaluate the same expression? In my setup, I can evaluate the following with no errors: (split-string #("| id | Actor | Character |\n|----+---------------+-------------------------------|\n| 1 | Allan Alda | ``Hawkeye'' Benjamin Pierce |\n| 2 | Gary Burghoff | ``Radar'' Walter O'Reilly |\n| 3 | Loretta Switt | ``Hotlips'' Margaret Hoolihan |\n" 0 2 nil 2 4 (org-label nil org-attributes nil org-caption nil fontified nil) 4 7 nil 7 12 (org-label nil org-attributes nil org-caption nil fontified nil) 12 23 nil 23 32 (org-label nil org-attributes nil org-caption nil fontified nil) 32 113 nil 113 114 (org-label nil org-attributes nil org-caption nil fontified nil) 114 117 nil 117 127 (org-label nil org-attributes nil org-caption nil fontified nil) 127 133 nil 133 135 (org-protected t) 135 141 (org-label nil org-attributes nil org-caption nil fontified nil) 141 142 (org-protected t fontified nil org-caption nil org-attributes nil org-label nil) 142 144 (org-protected t) 144 160 (org-label nil org-attributes nil org-caption nil fontified nil) 160 168 nil 168 169 (org-label nil org-attributes nil org-caption nil fontified nil) 169 172 nil 172 185 (org-label nil org-attributes nil org-caption nil fontified nil) 185 188 nil 188 190 (org-protected t) 190 194 (org-label nil org-attributes nil org-caption nil fontified nil) 194 195 (org-protected t fontified nil org-caption nil org-attributes nil org-label nil) 195 197 (org-protected t) 197 213 (org-label nil org-attributes nil org-caption nil fontified nil) 213 223 nil 223 224 (org-label nil org-attributes nil org-caption nil fontified nil) 224 227 nil 227 240 (org-label nil org-attributes nil org-caption nil fontified nil) 240 243 nil 243 245 (org-protected t) 245 251 (org-label nil org-attributes nil org-caption nil fontified nil) 251 252 (org-protected t fontified nil org-caption nil org-attributes nil org-label nil) 252 254 (org-protected t) 254 272 (org-label nil org-attributes nil org-caption nil fontified nil) 272 275 nil) "\n" t) What version of emacs are you running? Also, can you do C-h f split-string RET and tell us what that says? --------------------------------------------------------------------------- I said above that the export succeeds and it does, in the sense that I get no errors. However, the exported latex looks strange - the table comes *before* the "MASH" section. Is this a bug or is it a peculiarity of my configuration? Can somebody please try it and let me know? Thanks, Nick ,---- | % Created 2009-03-09 Mon 17:34 | \documentclass[11pt]{article} | \usepackage[utf8]{inputenc} | \usepackage[T1]{fontenc} | \usepackage{graphicx} | \usepackage{longtable} | \usepackage{hyperref} | | | \title{andrew-dasys} | \author{Nick Dokos} | \date{09 March 2009} | | \begin{document} | | \maketitle | | \setcounter{tocdepth}{3} | \tableofcontents | \vspace*{1cm} | | \begin{center} | \begin{tabular}{rll} | id & Actor & Character \\ | \hline | 1 & Allan Alda & ``Hawkeye'' Benjamin Pierce \\ | 2 & Gary Burghoff & ``Radar'' Walter O'Reilly \\ | 3 & Loretta Switt & ``Hotlips'' Margaret Hoolihan \\ | \end{tabular} | \end{center} | | | \section{MASH} | \label{sec-1} | | | | \end{document} `----