From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dirk Scharff Subject: Re: Wrong type argument listp on export Date: Thu, 21 Jul 2011 22:48:06 +0200 Message-ID: <85A0D45A-A559-43E3-BF78-B38D2F81DEA4@googlemail.com> References: <874o2f1qzy.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: multipart/mixed; boundary="Apple-Mail=_565F03BB-6ECE-4472-8AD9-50F9CFB06DFE" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qk0AK-0006yE-4e for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 16:48:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qk0AI-0000NE-2r for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 16:48:16 -0400 Received: from mail-fx0-f52.google.com ([209.85.161.52]:38182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qk0AH-0000Mw-Me for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 16:48:14 -0400 Received: by fxd18 with SMTP id 18so3329355fxd.39 for ; Thu, 21 Jul 2011 13:48:12 -0700 (PDT) In-Reply-To: <874o2f1qzy.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: Aankhen , Org mailing list --Apple-Mail=_565F03BB-6ECE-4472-8AD9-50F9CFB06DFE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Eric, thanks again for your support. I pulled again from git = (release_7.6.146.g6b389). I'm still having difficulties with this. I'll = attach your something.org example from earlier in a slightly modified = version to fit this case.=20 --Apple-Mail=_565F03BB-6ECE-4472-8AD9-50F9CFB06DFE Content-Disposition: attachment; filename=something.org Content-Type: application/octet-stream; name="something.org" Content-Transfer-Encoding: 7bit * Some document #+begin_src sh :exports both :var x=3 echo $x #+end_src --Apple-Mail=_565F03BB-6ECE-4472-8AD9-50F9CFB06DFE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 When I C-c C-e A on this file i still get the same error. I'm not good in using debug-on-error yet (and I don't know Lisp at = all=85), so I'll just paste the trace below this for now.=20 Best regards, Dirk.=20 Debugger entered--Lisp error: (wrong-type-argument listp 3) copy-seq((x . 3)) #[(G28402 G28403 arg) "=08A<\203 \303=08A!\202=0F=08A\211=19\205[\304 !\205$ :?\205$ G\305U?\205[ = <\203>=08@\306\235\203>\307\nJ !\310\"\202[ = ;\203Z=08@\311\235\203Z\312\313\307\nJ\314 !!\310\"\315#\202[ = )\207" [arg v G28402 copy-seq sequencep 0 (:result-params) sort string< = (:results :exports) mapconcat identity split-string " "] = 7](----cl-var--28400-- ----cl-var--28401-- (:var x . 3)) apply(#[(G28402 G28403 arg) "=08A<\203 \303=08A!\202=0F=08A\211=19\205[\304 !\205$ :?\205$ G\305U?\205[ = <\203>=08@\306\235\203>\307\nJ !\310\"\202[ = ;\203Z=08@\311\235\203Z\312\313\307\nJ\314 !!\310\"\315#\202[ = )\207" [arg v G28402 copy-seq sequencep 0 (:result-params) sort string< = (:results :exports) mapconcat identity split-string " "] 7] = ----cl-var--28400-- ----cl-var--28401-- (:var x . 3)) (lambda (&rest --cl-rest--) (apply #[(G28402 G28403 arg) "=08A<\203 \303=08A!\202=0F=08A\211=19\205[\304 !\205$ :?\205$ G\305U?\205[ = <\203>=08@\306\235\203>\307\nJ !\310\"\202[ = ;\203Z=08@\311\235\203Z\312\313\307\nJ\314 !!\310\"\315#\202[ = )\207" [arg v G28402 copy-seq sequencep 0 (:result-params) sort string< = (:results :exports) mapconcat identity split-string " "] 7] (quote = ----cl-var--28400--) (quote ----cl-var--28401--) --cl-rest--))((:var x . = 3)) #[(G28404 G28405 arg) "=08J !\211=1A\205 \303\304\n\")\207" [G28405 arg normalized format "%S"] = 4](----cl-var--28400-- ----cl-var--28401-- (:var x . 3)) apply(#[(G28404 G28405 arg) "=08J !\211=1A\205 \303\304\n\")\207" [G28405 arg normalized format "%S"] 4] = ----cl-var--28400-- ----cl-var--28401-- (:var x . 3)) (lambda (&rest --cl-rest--) (apply #[(G28404 G28405 arg) "=08J = !\211=1A\205 \303\304\n\")\207" [G28405 arg normalized format "%S"] 4] (quote = ----cl-var--28400--) (quote ----cl-var--28401--) --cl-rest--))((:var x . = 3)) mapcar((lambda (&rest --cl-rest--) (apply #[(G28404 G28405 arg) "=08J = !\211=1A\205 \303\304\n\")\207" [G28405 arg normalized format "%S"] 4] (quote = ----cl-var--28400--) (quote ----cl-var--28401--) --cl-rest--)) ((:cache = . "no") (:colname-names) (:comments . "") (:exports . "both") (:hlines . = "no") (:noweb . "no") (:padline . "") (:padnewline . "yes") = (:result-params "replace") (:result-type . value) (:results . "replace") = (:rowname-names) (:session . "none") (:shebang . "") (:tangle . "no") = (:var x . 3))) org-babel-sha1-hash(("sh" "echo $x" ((:cache . "no") (:colname-names) = (:comments . "") (:exports . "both") (:hlines . "no") (:noweb . "no") = (:padline . "") (:padnewline . "yes") (:result-params "replace") = (:result-type . value) (:results . "replace") (:rowname-names) (:session = . "none") (:shebang . "") (:tangle . "no") (:var x . 3)) "" nil 0)) org-babel-exp-src-block(#("echo $x" 0 7 (fontified t = font-lock-fontified t line-prefix #(" " 0 2 (face org-indent)) = wrap-prefix #(" " 0 2 (face org-indent)))) #("sh" 0 2 (wrap-prefix #(" = " 0 2 (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t)) #(":exports" 0 8 (wrap-prefix #(" " = 0 2 (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t)) #("both" 0 4 (wrap-prefix #(" " 0 2 = (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t)) #(":var" 0 4 (wrap-prefix #(" " 0 2 = (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t)) #("x=3D3" 0 3 (wrap-prefix #(" " 0 = 2 (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t))) apply(org-babel-exp-src-block #("echo $x" 0 7 (fontified t = font-lock-fontified t line-prefix #(" " 0 2 (face org-indent)) = wrap-prefix #(" " 0 2 (face org-indent)))) (#("sh" 0 2 (wrap-prefix #(" = " 0 2 (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t)) #(":exports" 0 8 (wrap-prefix #(" " = 0 2 (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t)) #("both" 0 4 (wrap-prefix #(" " 0 2 = (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t)) #(":var" 0 4 (wrap-prefix #(" " 0 2 = (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t)) #("x=3D3" 0 3 (wrap-prefix #(" " 0 = 2 (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) = font-lock-fontified t fontified t)))) = byte-code("\306\307\211\211\211\211\211\211\211\211\211\211=18=19=1A=1B=1C= =1D=1E*=1E+=1E,=1E-=1E.=1E/\310\311!\211=1E0\205)\311K=1E1\312\216\311\313= M\210eb\210`=15\314=1E2\315=0E2\307\306#\203@=01\316\224=1E3\316\225=1E4\3= 17\320!G=1E,\321\322\323\317\324!\227!\"=1E5\325\317\324!\227!=1E+\326 = =1E6\327\216\330\317\331!\332\"*=1A\320=1E7=0E8\206|\333\n\235=19\307=1E9\= 334=0E7!\204\251\315=0E5\307\306#\203\251\317\320!\227\335\230\203\241=0E7= S=167\202\200=0E7T=167\202\200\334=0E7!\204\272\336\337=0E+=0E3`{#\210\316= \225=169 \204\321\326 = =1E6\340\216\341=0E4\316\224{!*=13=0E+=0E.>\204\340=0E+=0E.B=16.\326 = =1E6\342\216\311 =0E3\"\210*\343=0E+=0E:\"\211=1E;A@)\211=16*\2039=01\326 = =1E6\344\216=0E+=0E<>\203=11=01\345\202=17=01\346=0E*=0B= \n#*\211=1E=3D\2038=01=0E3=0E9|\210=0E3b\210=0E=3Dc\210 = \2048=01\347=0E3`=0E,#\210). `=15\2029)\311 d\"\210\350\351!.=0F\207" [progress-marker preserve-indent headers body = end start t nil fboundp interblock ((byte-code "=08\203=0B\302 = M\210\202=0F\303\302!\210\302\207" [--cl-letf-bound-- --cl-letf-save-- = interblock fmakunbound] 2)) #[(start end) "\301\302=08\"\207" = [org-export-interblocks mapcar #[(pair) "=08\211=19A@)\n=0B\"\207" [pair = x start end] 4]] 3] "^\\([ ]*\\)#\\+begin_\\(\\S-+\\)[ = ]*\\(.*\\)?[ \n]" re-search-forward 0 match-string 1 format "[ \n]*[ ]*#\\+\\(begin\\|end\\)_%s" regexp-quote 2 intern match-data = ((byte-code "\301=08\302\"\207" [save-match-data-internal set-match-data = evaporate] 3)) org-split-string 3 "[ ]+" "-i" zerop "end" error = "unbalanced begin/end_%s blocks with %S" ((byte-code "\301=08\302\"\207" = [save-match-data-internal set-match-data evaporate] 3)) = org-remove-indentation ((byte-code "\301=08\302\"\207" = [save-match-data-internal set-match-data evaporate] 3)) assoc = ((byte-code "\301=08\302\"\207" [save-match-data-internal set-match-data = evaporate] 3)) "" apply indent-code-rigidly run-hooks = org-export-blocks-postblock-hook func type indentation matched types = case-fold-search --cl-letf-bound-- --cl-letf-save-- ...] 13) org-export-blocks-preprocess() org-export-preprocess-string(#("* Some document \n#+begin_src sh = :exports both :var x=3D3\n echo $x\n#+end_src\n\n\n\n" 0 2 (fontified t = face org-level-1 line-prefix nil wrap-prefix #(" " 0 2 (face = org-indent))) 2 16 (fontified t face org-level-1 line-prefix nil = wrap-prefix #(" " 0 2 (face org-indent))) 16 17 (fontified t) 17 54 = (fontified t face org-block-begin-line font-lock-fontified t = font-lock-multiline t line-prefix #(" " 0 2 (face org-indent)) = wrap-prefix #(" " 0 2 (face org-indent))) 54 55 (fontified t = font-lock-fontified t font-lock-multiline t face org-block-begin-line = line-prefix #(" " 0 2 (face org-indent)) wrap-prefix #(" " 0 2 (face = org-indent))) 55 64 (fontified t font-lock-fontified t = font-lock-multiline t face org-block line-prefix #(" " 0 2 (face = org-indent)) wrap-prefix #(" " 0 2 (face org-indent))) 64 65 (fontified = t font-lock-fontified t font-lock-multiline t face org-block line-prefix = #(" " 0 2 (face org-indent)) wrap-prefix #(" " 0 2 (face org-indent))) = 65 74 (fontified t face org-block-end-line font-lock-fontified t = font-lock-multiline t line-prefix #(" " 0 2 (face org-indent)) = wrap-prefix #(" " 0 2 (face org-indent))) 74 75 (fontified t face = org-block-end-line line-prefix #(" " 0 2 (face org-indent)) wrap-prefix = #(" " 0 2 (face org-indent))) 75 78 (fontified t line-prefix #(" " 0 2 = (face org-indent)) wrap-prefix #(" " 0 2 (face org-indent)))) = :for-backend ascii :skip-before-1st-heading nil :drawers nil :tags = not-in-toc :priority nil :footnotes t :timestamps t :todo-keywords t = :tasks t :verbatim-multiline t :select-tags ("export") :exclude-tags = ("noexport") :archived-trees headline :add-text nil) org-export-as-ascii(nil nil nil "*Org ASCII Export*") org-export-as-ascii-to-buffer(nil) call-interactively(org-export-as-ascii-to-buffer) org-export(nil) call-interactively(org-export nil nil) Am 21.07.2011 um 19:04 schrieb Eric Schulte: > Aankhen writes: >=20 >> Hi, >>=20 >> On Wed, Jul 20, 2011 at 16:36, Dirk Scharff = wrote: >>> I narrowed down my problem to the following short example: >>>=20 >>> * My Test Block >>> This is a test >>> #+source testblock >>> #+begin_src python :var x=3D3 :exports both :results output >>> print x*x >>> #+end_src >>>=20 >>> executing the source-bock yields the correct result. When exporting = this >>> file however I get the folowing error: >>>=20 >>> Wrong type argument: listp, 3 >>=20 >> I can confirm this using Org-mode from git (d8bd43e). Enabling >> debugging shows that the problem occurs in =91org-babel-sha1-hash=92 = when >> it tries to run =91copy-seq=92 on =91(x . 3)=92 at line 759. It = doesn=92t seem >> to be specific to Python=97using =91:var foo=3Dbar=92 seems to be = what >> triggers it. >>=20 >=20 > Thanks Dirk for pointing out this problem and thanks Aankhen for > isolating the offending line in the code. >=20 > I've just pushed up a fix -- Eric >=20 >>=20 >> Aankhen >>=20 >=20 > --=20 > Eric Schulte > http://cs.unm.edu/~eschulte/ --Apple-Mail=_565F03BB-6ECE-4472-8AD9-50F9CFB06DFE--