* Tables and Latex "Wrong-number-of-arguments" error @ 2009-03-04 18:48 andrew dasys 2009-03-05 14:28 ` Carsten Dominik 0 siblings, 1 reply; 12+ messages in thread From: andrew dasys @ 2009-03-04 18:48 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 1319 bytes --] Trying to org-export-latex-... any table in 6.23trans and 6.23b results both on WinXP and Ubuntu results in an error. Sending to html works great. Any guidance would be greatly appreciated. Table is as simple As I could think of: * MASH | id | Actor | Character | |----+---------------+---------------------------| | 1 | Allan Alda | "Hawkeye" Benjamin Pierce | | 2 | Gary Burghoff | "Radar" Walter O'Reilly | | 3 | Loretta Switt | "Hotlips" Margaret Hoolihan | Results in following error: Exporting to LaTeX... setq: Wrong number of arguments: #[(string &optional separators) <U+0086>^E^@<C6><C7><C8><U+0089>^Y^ZESC^\ <C9>^L <U+0083>&^@^KǔU<U+0083>&^@^K^MGW<U+0083>&^@^KT<U+0082>'^@^K#<U+0083>Y^@ǔ^MGW<U+0083>Y^@<CA>^Rǔ<C7>=<U+0084>S ^@ǔ<C7><U+0095>=<U+0083>K^@ǔ^K=<U+0084>S^@^M^KǔO B^QǕ^S<U+0082>^L^@^K^MG=<U+0084>g^@^M^K<C8>O B^Q <U+009F>,<U+0087>" [separators list notfirst start rexp string "[ ^L ^M^K]+" 0 nil string-match ...] 5 1390318], 3 ./tmp/table.org (END) Does not seem to be resolved by Manish's comments from: http://lists.gnu.org/archive/html/emacs-orgmode/2009-02/msg00354.html P.S Continue to be amazed by Org - great work thank you. P.P.S thread on variable usage was great way to see how others were using Org. [-- Attachment #1.2: Type: text/html, Size: 1766 bytes --] [-- Attachment #2: Type: text/plain, Size: 204 bytes --] _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Tables and Latex "Wrong-number-of-arguments" error 2009-03-04 18:48 Tables and Latex "Wrong-number-of-arguments" error andrew dasys @ 2009-03-05 14:28 ` Carsten Dominik 2009-03-09 20:15 ` andrew dasys 0 siblings, 1 reply; 12+ messages in thread From: Carsten Dominik @ 2009-03-05 14:28 UTC (permalink / raw) To: andrew dasys; +Cc: emacs-orgmode Please make a backtrace with uncompiled code: Reload Org with C-u C-c C-x r and hit the error again. Thanks. - Carsten On Mar 4, 2009, at 7:48 PM, andrew dasys wrote: > Trying to org-export-latex-... any table in 6.23trans and 6.23b > results both on WinXP and Ubuntu results in an error. Sending to > html works great. Any guidance would be greatly appreciated. > > Table is as simple As I could think of: > > * MASH > | id | Actor | Character | > |----+---------------+---------------------------| > | 1 | Allan Alda | "Hawkeye" Benjamin Pierce | > | 2 | Gary Burghoff | "Radar" Walter O'Reilly | > | 3 | Loretta Switt | "Hotlips" Margaret Hoolihan | > > > Results in following error: > > Exporting to LaTeX... > setq: Wrong number of arguments: #[(string &optional separators) <U > +0086>^E^@<C6><C7><C8><U+0089>^Y^ZESC^\ > <C9>^L > <U+0083>&^@^KǔU<U+0083>&^@^K^MGW<U+0083>&^@^KT<U+0082>'^@^K#<U > +0083>Y^@ǔ^MGW<U+0083>Y^@<CA>^Rǔ<C7>=<U+0084>S > ^@ǔ<C7><U+0095>=<U+0083>K^@ǔ^K=<U+0084>S^@^M^KǔO B^QǕ^S<U > +0082>^L^@^K^MG=<U+0084>g^@^M^K<C8>O B^Q > <U+009F>,<U+0087>" [separators list notfirst start rexp string "[ ^L > ^M^K]+" 0 nil string-match ...] 5 1390318], 3 > ./tmp/table.org (END) > > > > Does not seem to be resolved by Manish's comments from: > http://lists.gnu.org/archive/html/emacs-orgmode/2009-02/msg00354.html > > P.S Continue to be amazed by Org - great work thank you. > P.P.S thread on variable usage was great way to see how others were > using Org. > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Tables and Latex "Wrong-number-of-arguments" error 2009-03-05 14:28 ` Carsten Dominik @ 2009-03-09 20:15 ` andrew dasys 2009-03-09 22:22 ` Nick Dokos 0 siblings, 1 reply; 12+ messages in thread From: andrew dasys @ 2009-03-09 20:15 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 2382 bytes --] Carsten, Attached text file with original table.org and associated backtrace. This was run on 6.24a fresh from git. Slight delay in that I could not get back to my Linux machine for a few days. Also the org-reload does not work as it seems neither my windows or ubuntu machine recognize find-library-name (definition-is-void) so this may be the cause of the above problem. Thank you for looking into this. Andrew On Thu, Mar 5, 2009 at 10:28 AM, Carsten Dominik <dominik@science.uva.nl>wrote: > Please make a backtrace with uncompiled code: > > Reload Org with > > C-u C-c C-x r > > and hit the error again. > > Thanks. > > - Carsten > > > On Mar 4, 2009, at 7:48 PM, andrew dasys wrote: > > Trying to org-export-latex-... any table in 6.23trans and 6.23b results >> both on WinXP and Ubuntu results in an error. Sending to html works great. >> Any guidance would be greatly appreciated. >> >> Table is as simple As I could think of: >> >> * MASH >> | id | Actor | Character | >> |----+---------------+---------------------------| >> | 1 | Allan Alda | "Hawkeye" Benjamin Pierce | >> | 2 | Gary Burghoff | "Radar" Walter O'Reilly | >> | 3 | Loretta Switt | "Hotlips" Margaret Hoolihan | >> >> >> Results in following error: >> >> Exporting to LaTeX... >> setq: Wrong number of arguments: #[(string &optional separators) >> <U+0086>^E^@<C6><C7><C8><U+0089>^Y^ZESC^\ >> <C9>^L >> >> <U+0083>&^@^KǔU<U+0083>&^@^K^MGW<U+0083>&^@^KT<U+0082>'^@^K#<U+0083>Y^@ǔ^MGW<U+0083>Y^@<CA>^Rǔ<C7>=<U+0084>S >> ^@ǔ<C7><U+0095>=<U+0083>K^@ǔ^K=<U+0084>S^@^M^KǔO >> B^QǕ^S<U+0082>^L^@^K^MG=<U+0084>g^@^M^K<C8>O B^Q >> <U+009F>,<U+0087>" [separators list notfirst start rexp string "[ ^L >> ^M^K]+" 0 nil string-match ...] 5 1390318], 3 >> ./tmp/table.org (END) >> >> >> >> Does not seem to be resolved by Manish's comments from: >> http://lists.gnu.org/archive/html/emacs-orgmode/2009-02/msg00354.html >> >> P.S Continue to be amazed by Org - great work thank you. >> P.P.S thread on variable usage was great way to see how others were using >> Org. >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> > > [-- Attachment #1.2: Type: text/html, Size: 3506 bytes --] [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: table.diag.txt --] [-- Type: text/plain; charset=x-utf8utf8; name="table.diag.txt", Size: 10796 bytes --] * MASH | id | Actor | Character | |----+---------------+---------------------------| | 1 | Allan Alda | "Hawkeye" Benjamin Pierce | | 2 | Gary Burghoff | "Radar" Walter O'Reilly | | 3 | Loretta Switt | "Hotlips" Margaret Hoolihan | Debugger entered--Lisp error: (wrong-number-of-arguments #[(string &optional separators) "\b\x05\0ÆÇÈ\x19\x1a^[\x1cÉ\f &\0\vÇU&\0\v\rGW&\0\vT'\0\v#Y\0Ç\rGWY\0Ê\x12ÇÇ=S\0ÇÇ=K\0Ç\v=S\0\r\vÇO B\x11Ç\x13\f\0\v\rG=g\0\r\vÈO B\x11 ," [separators list notfirst start rexp string "[ \f \r\v]+" 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)) (progn (setq caption (org-find-text-property-in-string ... raw-table) attr (org-find-text-property-in-string ... raw-table) label (org-find-text-property-in-string ... raw-table) longtblp (and attr ... ...) align (and attr ... ... ...) floatp (or caption label)) (setq lines (split-string raw-table "\n" t)) (apply (quote delete-region) (list beg end)) (when org-export-table-remove-special-lines (setq lines ...)) (setq olines lines) (while (and ... ...) (unless ... ... ... ...)) (setq line-fmt (replace-regexp-in-string "||" "|" line-fmt)) (when (and ... ...) (setq line-fmt ...)) (unless align (setq align ...)) (setq lines (mapcar ... lines)) (when insert (insert ... "\n\n"))) (if org-export-latex-tables-verbatim (let* (...) (apply ... ...) (insert ...)) (progn (setq caption ... attr ... label ... longtblp ... align ... floatp ...) (setq lines ...) (apply ... ...) (when org-export-table-remove-special-lines ...) (setq olines lines) (while ... ...) (setq line-fmt ...) (when ... ...) (unless align ...) (setq lines ...) (when insert ...))) (let* ((beg ...) (end ...) (raw-table ...) fnum fields line lines olines gr colgropen line-fmt align caption label attr floatp longtblp) (if org-export-latex-tables-verbatim (let* ... ... ...) (progn ... ... ... ... ... ... ... ... ... ... ...))) (while (re-search-forward "^\\([ ]*\\)|" nil t) (save-excursion (org-table-align)) (let* (... ... ... fnum fields line lines olines gr colgropen line-fmt align caption label attr floatp longtblp) (if org-export-latex-tables-verbatim ... ...))) org-export-latex-tables(t) (if (memq (quote tables) exclude-list) nil (org-export-latex-tables (plist-get org-export-latex-options-plist :tables))) (unless (memq (quote tables) exclude-list) (org-export-latex-tables (plist-get org-export-latex-options-plist :tables))) (save-current-buffer (set-buffer temp-buffer) (insert content) (unless (memq ... exclude-list) (org-export-latex-quotation-marks)) (unless (memq ... exclude-list) (when ... ...)) (unless (memq ... exclude-list) (org-export-latex-special-chars ...)) (unless (memq ... exclude-list) (org-export-latex-links)) (unless (memq ... exclude-list) (org-export-latex-keywords)) (unless (memq ... exclude-list) (org-export-latex-lists)) (unless (memq ... exclude-list) (org-export-latex-tables ...)) (unless (memq ... exclude-list) (org-export-latex-fixed-width ...)) (buffer-substring (point-min) (point-max))) (with-current-buffer temp-buffer (insert content) (unless (memq ... exclude-list) (org-export-latex-quotation-marks)) (unless (memq ... exclude-list) (when ... ...)) (unless (memq ... exclude-list) (org-export-latex-special-chars ...)) (unless (memq ... exclude-list) (org-export-latex-links)) (unless (memq ... exclude-list) (org-export-latex-keywords)) (unless (memq ... exclude-list) (org-export-latex-lists)) (unless (memq ... exclude-list) (org-export-latex-tables ...)) (unless (memq ... exclude-list) (org-export-latex-fixed-width ...)) (buffer-substring (point-min) (point-max))) (unwind-protect (with-current-buffer temp-buffer (insert content) (unless ... ...) (unless ... ...) (unless ... ...) (unless ... ...) (unless ... ...) (unless ... ...) (unless ... ...) (unless ... ...) (buffer-substring ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (let ((temp-buffer ...)) (unwind-protect (with-current-buffer temp-buffer ... ... ... ... ... ... ... ... ... ...) (and ... ...))) (with-temp-buffer (insert content) (unless (memq ... exclude-list) (org-export-latex-quotation-marks)) (unless (memq ... exclude-list) (when ... ...)) (unless (memq ... exclude-list) (org-export-latex-special-chars ...)) (unless (memq ... exclude-list) (org-export-latex-links)) (unless (memq ... exclude-list) (org-export-latex-keywords)) (unless (memq ... exclude-list) (org-export-latex-lists)) (unless (memq ... exclude-list) (org-export-latex-tables ...)) (unless (memq ... exclude-list) (org-export-latex-fixed-width ...)) (buffer-substring (point-min) (point-max))) org-export-latex-content(#("| 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\n" 0 50 (org-label nil org-attributes nil org-caption nil fontified nil) 50 51 (fontified nil) 51 101 (fontified nil) 101 102 (fontified nil) 102 152 (org-label nil org-attributes nil org-caption nil fontified nil) 152 153 (fontified nil) 153 203 (org-label nil org-attributes nil org-caption nil fontified nil) 203 204 (fontified nil) 204 257 (org-label nil org-attributes nil org-caption nil fontified nil) 257 259 (fontified nil))) (prog1 (org-export-latex-content (org-export-preprocess-string ... :for-LaTeX t :emph-multiline t :add-text nil :comments nil :skip-before-1st-heading nil :LaTeX-fragments nil :timestamps ... :footnotes ...)) (org-unmodified (add-text-properties pt ... ...))) (let* ((pt ...) (end ...)) (prog1 (org-export-latex-content ...) (org-unmodified ...))) (save-excursion (goto-char (or beg ...)) (if (org-at-heading-p) (beginning-of-line 2)) (let* (... ...) (prog1 ... ...))) org-export-latex-first-lines((:exclude-tags ("noexport") :select-tags ("export") :email "andrew@kungfu" :author "andrew" :auto-postamble t :auto-preamble t :postamble nil :preamble nil :publishing-directory nil :timestamp nil :expand-quoted-html t :html-table-tag "<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">" :html-extension "html" :inline-images maybe :convert-org-links t :agenda-style "" :style-extra "" :style "" :style-include-scripts t :style-include-default t :table-auto-headline t :tables t :time-stamp-file t :creator-info t :author-info t ...) nil) (if skip "" (org-export-latex-first-lines opt-plist rbeg)) (let* ((wcf ...) (opt-plist org-export-latex-options-plist) (region-p ...) (rbeg ...) (rend ...) (subtree-p ...) (opt-plist ...) (org-export-latex-options-plist opt-plist) (title ...) (filename ...) (filename ...) (buffer ...) (odd org-odd-levels-only) (header ...) (skip ...) (text ...) (first-lines ...) (coding-system ...) (coding-system-for-write ...) (save-buffer-coding-system ...) (region ...) (string-for-export ...)) (set-buffer buffer) (erase-buffer) (and (fboundp ...) (set-buffer-file-coding-system coding-system-for-write)) (unless (or ... body-only) (insert header)) (when (and text ...) (insert ... "\n\n")) (unless (or skip ...) (insert first-lines)) (org-export-latex-global (with-temp-buffer ... ... ...)) (unless body-only (insert "\n\\end{document}")) (or to-buffer (save-buffer)) (goto-char (point-min)) (message "Exporting to LaTeX...done") (prog1 (if ... ... ...) (set-window-configuration wcf))) org-export-as-latex(nil nil nil "*Org LaTeX Export*") org-export-as-latex-to-buffer(nil) call-interactively(org-export-as-latex-to-buffer) (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set-process-sentinel p ...) (message "Background process \"%s\": started" p)) (call-interactively (nth 1 ass))) (let* ((bg ...) (help "[t] insert the export option template\n[v] limit export to visible part of outline tree\n\n[a] export as ASCII\n\n[h] export as HTML\n[H] export as HTML to temporary buffer\n[R] export region as HTML\n[b] export as HTML and browse immediately\n[x] export as XOXO\n\n[l] export as LaTeX\n[p] export as LaTeX and process to PDF\n[d] export as LaTeX, process to PDF, and open the resulting PDF document\n[L] export as LaTeX to temporary buffer\n\n[i] export current file as iCalendar file\n[I] export all agenda files as iCalendar files\n[c] export agenda files into combined iCalendar file\n\n[F] publish current file\n[P] publish current project\n[X] publish... (project will be prompted for)\n[A] publish all projects") (cmds ...) r1 r2 ass) (save-excursion (save-window-excursion ... ... ... ... ...)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error "No command associated with key %c" r1)) (if (and bg ... ... ...) (let ... ... ...) (call-interactively ...))) org-export(nil) * call-interactively(org-export) [-- Attachment #3: Type: text/plain, Size: 204 bytes --] _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Tables and Latex "Wrong-number-of-arguments" error 2009-03-09 20:15 ` andrew dasys @ 2009-03-09 22:22 ` Nick Dokos 2009-03-09 22:42 ` latex exporting strangeness [was: Re: Tables and Latex "Wrong-number-of-arguments" error] Nick Dokos 2009-03-09 23:23 ` Tables and Latex "Wrong-number-of-arguments" error andrew dasys 0 siblings, 2 replies; 12+ messages in thread From: Nick Dokos @ 2009-03-09 22:22 UTC (permalink / raw) To: andrew dasys; +Cc: emacs-orgmode [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 7016 bytes --] andrew dasys <adasys@objectivity.ca> 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) "\b\x05\0ÆÇÈ\x19\x1a^[\x1cÉ\f > &\0\vÇU&\0\v\rGW&\0\vT'\0\v#Y\0Ç\rGWY\0Ê\x12ÇÇ=S\0ÇÇ=K\0Ç\v=S\0\r\vÇO B\x11Ç\x13\f\0\v\rG=g\0\r\vÈO B\x11 ," [separators list notfirst start rexp string "[ \f > \r\v]+" 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} `---- ^ permalink raw reply [flat|nested] 12+ messages in thread
* latex exporting strangeness [was: Re: Tables and Latex "Wrong-number-of-arguments" error] 2009-03-09 22:22 ` Nick Dokos @ 2009-03-09 22:42 ` Nick Dokos 2009-03-09 23:38 ` andrew dasys 2009-03-09 23:23 ` Tables and Latex "Wrong-number-of-arguments" error andrew dasys 1 sibling, 1 reply; 12+ messages in thread From: Nick Dokos @ 2009-03-09 22:42 UTC (permalink / raw) To: nicholas.dokos; +Cc: andrew dasys, emacs-orgmode [replying to my own mail] Nick Dokos <nicholas.dokos@hp.com> wrote: > > 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? > I seem to recall that this has come up before: basically, an empty line at the beginning of the org file restores sanity. So even if it is a bug, there is an easy workaround. Sorry for the noise, Nick ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: latex exporting strangeness [was: Re: Tables and Latex "Wrong-number-of-arguments" error] 2009-03-09 22:42 ` latex exporting strangeness [was: Re: Tables and Latex "Wrong-number-of-arguments" error] Nick Dokos @ 2009-03-09 23:38 ` andrew dasys 2009-03-10 2:01 ` Nick Dokos 0 siblings, 1 reply; 12+ messages in thread From: andrew dasys @ 2009-03-09 23:38 UTC (permalink / raw) To: nicholas.dokos; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 723 bytes --] Blank at start of file does not do it for me. On Mon, Mar 9, 2009 at 6:42 PM, Nick Dokos <nicholas.dokos@hp.com> wrote: > [replying to my own mail] > > Nick Dokos <nicholas.dokos@hp.com> wrote: > > > > > 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? > > > > I seem to recall that this has come up before: basically, an empty line > at the beginning of the org file restores sanity. So even if it is a bug, > there is an easy workaround. > > Sorry for the noise, > Nick > > > > [-- Attachment #1.2: Type: text/html, Size: 1156 bytes --] [-- Attachment #2: Type: text/plain, Size: 204 bytes --] _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: latex exporting strangeness [was: Re: Tables and Latex "Wrong-number-of-arguments" error] 2009-03-09 23:38 ` andrew dasys @ 2009-03-10 2:01 ` Nick Dokos 0 siblings, 0 replies; 12+ messages in thread From: Nick Dokos @ 2009-03-10 2:01 UTC (permalink / raw) To: andrew dasys; +Cc: emacs-orgmode andrew dasys <adasys@objectivity.ca> wrote: > Blank at start of file does not do it for me. > Yes, this is just a workaround for the funny ordering: it does not resolve the error you get (but I hope that the patch that I just posted will). Nick ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Tables and Latex "Wrong-number-of-arguments" error 2009-03-09 22:22 ` Nick Dokos 2009-03-09 22:42 ` latex exporting strangeness [was: Re: Tables and Latex "Wrong-number-of-arguments" error] Nick Dokos @ 2009-03-09 23:23 ` andrew dasys 2009-03-10 1:58 ` Nick Dokos 2009-03-10 2:12 ` Nick Dokos 1 sibling, 2 replies; 12+ messages in thread From: andrew dasys @ 2009-03-09 23:23 UTC (permalink / raw) To: nicholas.dokos; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 7901 bytes --] Nick, thank you for looking at this. I am running Emacs 21.4.1 Nothing bleeding edge here. The help for split-string looks reasonable (compiled Lisp comes from "subr" ....) (complete output attached) A bit of debugging gets me to the point where split-string works fine if you only include the text that is in the table so from "|id ..... Hoolihan |\n" if you add any of the other text starting at: 0 2 nil 2 4 (org-label nil org.... then I get the error. On Mon, Mar 9, 2009 at 6:22 PM, Nick Dokos <nicholas.dokos@hp.com> wrote: > andrew dasys <adasys@objectivity.ca> 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} > `---- > [-- Attachment #1.2: Type: text/html, Size: 8744 bytes --] [-- Attachment #2: split-string.txt --] [-- Type: text/plain, Size: 621 bytes --] split-string is a compiled Lisp function in `subr'. (split-string STRING &optional SEPARATORS) Splits STRING into substrings where there are matches for SEPARATORS. Each match for SEPARATORS is a splitting point. The substrings between the splitting points are made into a list which is returned. If SEPARATORS is absent, it defaults to "[ \f\t\n\r\v]+". If there is match for SEPARATORS at the beginning of STRING, we do not include a null substring for that. Likewise, if there is a match at the end of STRING, we don't include a null substring for that. Modifies the match data; use `save-match-data' if necessary. [-- Attachment #3: Type: text/plain, Size: 204 bytes --] _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Tables and Latex "Wrong-number-of-arguments" error 2009-03-09 23:23 ` Tables and Latex "Wrong-number-of-arguments" error andrew dasys @ 2009-03-10 1:58 ` Nick Dokos 2009-03-10 2:12 ` Nick Dokos 1 sibling, 0 replies; 12+ messages in thread From: Nick Dokos @ 2009-03-10 1:58 UTC (permalink / raw) To: andrew dasys; +Cc: emacs-orgmode [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1535 bytes --] andrew dasys <adasys@objectivity.ca> wrote: > Nick, > thank you for looking at this. > > I am running Emacs 21.4.1 Nothing bleeding edge here. > > The help for split-string looks reasonable (compiled Lisp comes from "subr" ....) (complete output attached) > ... > split-string is a compiled Lisp function in `subr'. > (split-string STRING &optional SEPARATORS) > > Splits STRING into substrings where there are matches for SEPARATORS. > Each match for SEPARATORS is a splitting point. > The substrings between the splitting points are made into a list > which is returned. > If SEPARATORS is absent, it defaults to "[ \f\t\n\r\v]+". > > If there is match for SEPARATORS at the beginning of STRING, we do not > include a null substring for that. Likewise, if there is a match > at the end of STRING, we don't include a null substring for that. > > Modifies the match data; use `save-match-data' if necessary. I think that explains it: split-string takes one mandatory and two optional arguments (separator regexp and an omit-nulls boolean) in emacs-22/23; but only *one* optional argument in emacs-21 (the separator arg). The org latex-exporting code calls it with two optional arguments and that makes the emacs-21 implementation of split-string blow up. I just did an experiment: in my emacs-23, I called split-string with one mandatory and *three* more arguments: (split-string "foo bar baz" "\n" t t) and I got Debugger entered--Lisp error: (wrong-number-of-arguments #[(string &optional separators omit-nulls) "\b\b ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Tables and Latex "Wrong-number-of-arguments" error 2009-03-09 23:23 ` Tables and Latex "Wrong-number-of-arguments" error andrew dasys 2009-03-10 1:58 ` Nick Dokos @ 2009-03-10 2:12 ` Nick Dokos 2009-03-10 5:36 ` Carsten Dominik 1 sibling, 1 reply; 12+ messages in thread From: Nick Dokos @ 2009-03-10 2:12 UTC (permalink / raw) To: andrew dasys; +Cc: emacs-orgmode [I mangled the previous response, so let me try again.] andrew dasys <adasys@objectivity.ca> wrote: > Nick, > thank you for looking at this. > > I am running Emacs 21.4.1 Nothing bleeding edge here. > > The help for split-string looks reasonable (compiled Lisp comes from "subr" ....) (complete output attached) > .... > > split-string is a compiled Lisp function in `subr'. > (split-string STRING &optional SEPARATORS) > > Splits STRING into substrings where there are matches for SEPARATORS. > Each match for SEPARATORS is a splitting point. > The substrings between the splitting points are made into a list > which is returned. > If SEPARATORS is absent, it defaults to "[ \f\t\n\r\v]+". > > If there is match for SEPARATORS at the beginning of STRING, we do not > include a null substring for that. Likewise, if there is a match > at the end of STRING, we don't include a null substring for that. > > Modifies the match data; use `save-match-data' if necessary. I think that explains it: split-string takes one mandatory and two optional arguments (separator regexp and an omit-nulls boolean) in emacs-22/23; but only *one* optional argument in emacs-21 (the separator arg). The org latex-exporting code calls it with two optional arguments and that makes the emacs-21 implementation of split-string blow up. I just did an experiment: in my emacs-23, I called split-string with one mandatory and *three* more arguments: (split-string "foo bar baz" "\n" t t) and I got output which looks very similar to what you are getting. So I think it's an incompatibility with emacs-21. Try the following patch for now and let us know whether it resolves your problem: diff --git a/lisp/org-export-latex.el b/lisp/org-export-latex.el index 0c0c87f..e8ef6d5 100644 --- a/lisp/org-export-latex.el +++ b/lisp/org-export-latex.el @@ -1111,7 +1111,10 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (string-match "\\<align=\\([^ \t\n\r,]+\\)" attr) (match-string 1 attr)) floatp (or caption label)) - (setq lines (split-string raw-table "\n" t)) + (setq lines + (if (< emacs-major-version 22) + (split-string raw-table "\n") + (split-string raw-table "\n" t))) (apply 'delete-region (list beg end)) (when org-export-table-remove-special-lines (setq lines (org-table-clean-before-export lines 'maybe-quoted))) Nick ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: Tables and Latex "Wrong-number-of-arguments" error 2009-03-10 2:12 ` Nick Dokos @ 2009-03-10 5:36 ` Carsten Dominik 2009-03-10 13:12 ` andrew dasys 0 siblings, 1 reply; 12+ messages in thread From: Carsten Dominik @ 2009-03-10 5:36 UTC (permalink / raw) To: nicholas.dokos; +Cc: andrew dasys, emacs-orgmode Fix, thanks, in particular to Nick for sorting this out. Andrew, I strongly suggest you upgrade to Emacs 22. - Carsten On Mar 10, 2009, at 3:12 AM, Nick Dokos wrote: > [I mangled the previous response, so let me try again.] > > andrew dasys <adasys@objectivity.ca> wrote: > >> Nick, >> thank you for looking at this. >> >> I am running Emacs 21.4.1 Nothing bleeding edge here. >> >> The help for split-string looks reasonable (compiled Lisp comes >> from "subr" ....) (complete output attached) >> > .... >> >> split-string is a compiled Lisp function in `subr'. >> (split-string STRING &optional SEPARATORS) >> >> Splits STRING into substrings where there are matches for SEPARATORS. >> Each match for SEPARATORS is a splitting point. >> The substrings between the splitting points are made into a list >> which is returned. >> If SEPARATORS is absent, it defaults to "[ \f\t\n\r\v]+". >> >> If there is match for SEPARATORS at the beginning of STRING, we do >> not >> include a null substring for that. Likewise, if there is a match >> at the end of STRING, we don't include a null substring for that. >> >> Modifies the match data; use `save-match-data' if necessary. > > I think that explains it: split-string takes one mandatory and two > optional arguments (separator regexp and an omit-nulls boolean) in > emacs-22/23; but only *one* optional argument in emacs-21 (the > separator > arg). The org latex-exporting code calls it with two optional > arguments > and that makes the emacs-21 implementation of split-string blow up. > > I just did an experiment: in my emacs-23, I called split-string > with one mandatory and *three* more arguments: > > (split-string "foo > bar > baz" "\n" t t) > > and I got output which looks very similar to what you are getting. > > So I think it's an incompatibility with emacs-21. Try the following > patch for now and let us know whether it resolves your problem: > > > diff --git a/lisp/org-export-latex.el b/lisp/org-export-latex.el > index 0c0c87f..e8ef6d5 100644 > --- a/lisp/org-export-latex.el > +++ b/lisp/org-export-latex.el > @@ -1111,7 +1111,10 @@ The conversion is made depending of STRING- > BEFORE and STRING-AFTER." > (string-match "\\<align=\\([^ \t\n\r,]+\\)" attr) > (match-string 1 attr)) > floatp (or caption label)) > - (setq lines (split-string raw-table "\n" t)) > + (setq lines > + (if (< emacs-major-version 22) > + (split-string raw-table "\n") > + (split-string raw-table "\n" t))) > (apply 'delete-region (list beg end)) > (when org-export-table-remove-special-lines > (setq lines (org-table-clean-before-export lines 'maybe-quoted))) > > Nick > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Tables and Latex "Wrong-number-of-arguments" error 2009-03-10 5:36 ` Carsten Dominik @ 2009-03-10 13:12 ` andrew dasys 0 siblings, 0 replies; 12+ messages in thread From: andrew dasys @ 2009-03-10 13:12 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 3307 bytes --] Nick, thank you for figuring this out. Will upgrade as suggested. Again thank you both for the great application. Andrew On Tue, Mar 10, 2009 at 1:36 AM, Carsten Dominik <dominik@science.uva.nl>wrote: > Fix, thanks, in particular to Nick for sorting this out. > > Andrew, I strongly suggest you upgrade to Emacs 22. > > - Carsten > > > On Mar 10, 2009, at 3:12 AM, Nick Dokos wrote: > > [I mangled the previous response, so let me try again.] >> >> andrew dasys <adasys@objectivity.ca> wrote: >> >> Nick, >>> thank you for looking at this. >>> >>> I am running Emacs 21.4.1 Nothing bleeding edge here. >>> >>> The help for split-string looks reasonable (compiled Lisp comes from >>> "subr" ....) (complete output attached) >>> >>> .... >> >>> >>> split-string is a compiled Lisp function in `subr'. >>> (split-string STRING &optional SEPARATORS) >>> >>> Splits STRING into substrings where there are matches for SEPARATORS. >>> Each match for SEPARATORS is a splitting point. >>> The substrings between the splitting points are made into a list >>> which is returned. >>> If SEPARATORS is absent, it defaults to "[ \f\t\n\r\v]+". >>> >>> If there is match for SEPARATORS at the beginning of STRING, we do not >>> include a null substring for that. Likewise, if there is a match >>> at the end of STRING, we don't include a null substring for that. >>> >>> Modifies the match data; use `save-match-data' if necessary. >>> >> >> I think that explains it: split-string takes one mandatory and two >> optional arguments (separator regexp and an omit-nulls boolean) in >> emacs-22/23; but only *one* optional argument in emacs-21 (the separator >> arg). The org latex-exporting code calls it with two optional arguments >> and that makes the emacs-21 implementation of split-string blow up. >> >> I just did an experiment: in my emacs-23, I called split-string >> with one mandatory and *three* more arguments: >> >> (split-string "foo >> bar >> baz" "\n" t t) >> >> and I got output which looks very similar to what you are getting. >> >> So I think it's an incompatibility with emacs-21. Try the following >> patch for now and let us know whether it resolves your problem: >> >> >> diff --git a/lisp/org-export-latex.el b/lisp/org-export-latex.el >> index 0c0c87f..e8ef6d5 100644 >> --- a/lisp/org-export-latex.el >> +++ b/lisp/org-export-latex.el >> @@ -1111,7 +1111,10 @@ The conversion is made depending of STRING-BEFORE >> and STRING-AFTER." >> (string-match "\\<align=\\([^ \t\n\r,]+\\)" >> attr) >> (match-string 1 attr)) >> floatp (or caption label)) >> - (setq lines (split-string raw-table "\n" t)) >> + (setq lines >> + (if (< emacs-major-version 22) >> + (split-string raw-table "\n") >> + (split-string raw-table "\n" t))) >> (apply 'delete-region (list beg end)) >> (when org-export-table-remove-special-lines >> (setq lines (org-table-clean-before-export lines >> 'maybe-quoted))) >> >> Nick >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> > > [-- Attachment #1.2: Type: text/html, Size: 4647 bytes --] [-- Attachment #2: Type: text/plain, Size: 204 bytes --] _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-03-10 13:12 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-03-04 18:48 Tables and Latex "Wrong-number-of-arguments" error andrew dasys 2009-03-05 14:28 ` Carsten Dominik 2009-03-09 20:15 ` andrew dasys 2009-03-09 22:22 ` Nick Dokos 2009-03-09 22:42 ` latex exporting strangeness [was: Re: Tables and Latex "Wrong-number-of-arguments" error] Nick Dokos 2009-03-09 23:38 ` andrew dasys 2009-03-10 2:01 ` Nick Dokos 2009-03-09 23:23 ` Tables and Latex "Wrong-number-of-arguments" error andrew dasys 2009-03-10 1:58 ` Nick Dokos 2009-03-10 2:12 ` Nick Dokos 2009-03-10 5:36 ` Carsten Dominik 2009-03-10 13:12 ` andrew dasys
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.