From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xavier Garrido Subject: Exporting C++ code block to html Date: Fri, 27 Sep 2013 20:45:09 +0200 Message-ID: <5245D235.20709@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010308070505050307030304" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPd2U-0003rI-V4 for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 14:45:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPd2Q-0005k5-1Q for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 14:45:18 -0400 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:55036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPd2P-0005jo-Nh for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 14:45:13 -0400 Received: by mail-wg0-f52.google.com with SMTP id m15so3166783wgh.7 for ; Fri, 27 Sep 2013 11:45:12 -0700 (PDT) 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: "emacs-orgmode@gnu.org" This is a multi-part message in MIME format. --------------010308070505050307030304 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Dear Orgers, I face a problem when I want to 'html' export a pretty simple org file : test.org contains the following lines #+BEGIN_SRC c++ int j= 1; #+END_SRC If I do emacs --batch -q --eval '(require (quote org))' --visit test.org \ --funcall org-html-export-to-html I get Loading vc-git... Loading cc-langs... Symbol's function definition is void: nil I have also activated the debug mode but the messages are quite cryptic for me (attached file). The point is that it only crashes with C/C++ languages but works with python, awk, sh, emacs-lisp ... I'm using orgmode 8.2-35 from the git repository. Thanks for your help, Xavier --------------010308070505050307030304 Content-Type: text/x-log; name="org_html_export.log" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="org_html_export.log" oading vc-git... Loading cc-langs... Debugger entered--Lisp error: (void-function nil) nil(1 12 nil) c-font-lock-fontify-region(1 12 nil) font-lock-fontify-region(1 12 nil) byte-code("\212\303 =18\304\216\305ed #\210\306 \210\307\211=12+\207" [= save-match-data-internal verbose font-lock-fontified match-data ((byte-co= de "\30\302\"\207" [save-match-data-internal set-match-data evaporate] 3)= ) font-lock-fontify-region font-lock-after-fontify-buffer t] 4) font-lock-default-fontify-buffer() font-lock-fontify-buffer() org-html-fontify-code("int j =3D 1;\n" "c++") org-html-do-format-code("int j =3D 1;\n" "c++" nil t nil) org-html-format-code((src-block (:language "c++" :switches nil :paramet= ers nil :begin 1 :end 39 :number-lines nil :preserve-indent nil :retain-l= abels t :use-labels t :label-fmt nil :hiddenp nil :value "int j =3D 1;\n"= :post-blank 0 :post-affiliated 1 :parent (section (:begin 1 :end 39 :con= tents-begin 1 :contents-end 39 :post-blank 0 :parent (org-data nil #2)) #= 0))) (:export-options nil :input-file "/home/garrido/Teachdir/C++.test/te= st.org" :title "test" :html-extension "html" :html-link-org-as-html t :ht= ml-doctype "xhtml-strict" :html-container "div" :html-html5-fancy nil :ht= ml-link-use-abs-url nil :html-link-home "" :html-link-up "" :html-mathjax= "" :html-postamble auto :html-preamble t :html-head "" :html-head-extra = "" :html-head-include-default-style t :html-head-include-scripts t :html-= table-attributes (:border "2" :cellspacing "0" :cellpadding "6" :rules "g= roups" :frame "hsides") :html-table-row-tags ("" . "") :html-xml= -declaration (("html" . "") ("= php" . "= \"; ?>")) :html-inline-images t :creator "Emacs 24.3.1 (Org<= /a> mode 8.2)" :with-latex t :author nil ...)) org-html-src-block((src-block (:language "c++" :switches nil :parameter= s nil :begin 1 :end 39 :number-lines nil :preserve-indent nil :retain-lab= els t :use-labels t :label-fmt nil :hiddenp nil :value "int j =3D 1;\n" := post-blank 0 :post-affiliated 1 :parent (section (:begin 1 :end 39 :conte= nts-begin 1 :contents-end 39 :post-blank 0 :parent (org-data nil #2)) #0)= )) nil (:export-options nil :input-file "/home/garrido/Teachdir/C++.test/= test.org" :title "test" :html-extension "html" :html-link-org-as-html t := html-doctype "xhtml-strict" :html-container "div" :html-html5-fancy nil := html-link-use-abs-url nil :html-link-home "" :html-link-up "" :html-mathj= ax "" :html-postamble auto :html-preamble t :html-head "" :html-head-extr= a "" :html-head-include-default-style t :html-head-include-scripts t :htm= l-table-attributes (:border "2" :cellspacing "0" :cellpadding "6" :rules = "groups" :frame "hsides") :html-table-row-tags ("" . "") :html-x= ml-declaration (("html" . "") = ("php" . "\"; ?>")) :html-inline-images t :creator "Emacs 24.3.1 (Or= g mode 8.2)" :with-latex t :author nil ...)) org-export-data((src-block (:language "c++" :switches nil :parameters n= il :begin 1 :end 39 :number-lines nil :preserve-indent nil :retain-labels= t :use-labels t :label-fmt nil :hiddenp nil :value "int j =3D 1;\n" :pos= t-blank 0 :post-affiliated 1 :parent (section (:begin 1 :end 39 :contents= -begin 1 :contents-end 39 :post-blank 0 :parent (org-data nil #2)) #0))) = (:export-options nil :input-file "/home/garrido/Teachdir/C++.test/test.or= g" :title "test" :html-extension "html" :html-link-org-as-html t :html-do= ctype "xhtml-strict" :html-container "div" :html-html5-fancy nil :html-li= nk-use-abs-url nil :html-link-home "" :html-link-up "" :html-mathjax "" := html-postamble auto :html-preamble t :html-head "" :html-head-extra "" :h= tml-head-include-default-style t :html-head-include-scripts t :html-table= -attributes (:border "2" :cellspacing "0" :cellpadding "6" :rules "groups= " :frame "hsides") :html-table-row-tags ("" . "") :html-xml-decl= aration (("html" . "") ("php" = =2E "\";= ?>")) :html-inline-images t :creator "Emacs 24.3.1 (Org= mode 8.2)" :with-latex t :author nil ...)) #[(element) "\302 \"\207" [element info org-export-data] 3]((src-bl= ock (:language "c++" :switches nil :parameters nil :begin 1 :end 39 :numb= er-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-f= mt nil :hiddenp nil :value "int j =3D 1;\n" :post-blank 0 :post-affiliate= d 1 :parent (section (:begin 1 :end 39 :contents-begin 1 :contents-end 39= :post-blank 0 :parent (org-data nil #2)) #0)))) mapconcat(#[(element) "\302 \"\207" [element info org-export-data] 3]= ((src-block (:language "c++" :switches nil :parameters nil :begin 1 :end= 39 :number-lines nil :preserve-indent nil :retain-labels t :use-labels t= :label-fmt nil :hiddenp nil :value "int j =3D 1;\n" :post-blank 0 :post-= affiliated 1 :parent (section (:begin 1 :end 39 :contents-begin 1 :conten= ts-end 39 :post-blank 0 :parent (org-data nil #3)) #1)))) "") org-export-data((section (:begin 1 :end 39 :contents-begin 1 :contents-= end 39 :post-blank 0 :parent (org-data nil #0)) (src-block (:language "c+= +" :switches nil :parameters nil :begin 1 :end 39 :number-lines nil :pres= erve-indent nil :retain-labels t :use-labels t :label-fmt nil :hiddenp ni= l :value "int j =3D 1;\n" :post-blank 0 :post-affiliated 1 :parent #0))) = (:export-options nil :input-file "/home/garrido/Teachdir/C++.test/test.or= g" :title "test" :html-extension "html" :html-link-org-as-html t :html-do= ctype "xhtml-strict" :html-container "div" :html-html5-fancy nil :html-li= nk-use-abs-url nil :html-link-home "" :html-link-up "" :html-mathjax "" := html-postamble auto :html-preamble t :html-head "" :html-head-extra "" :h= tml-head-include-default-style t :html-head-include-scripts t :html-table= -attributes (:border "2" :cellspacing "0" :cellpadding "6" :rules "groups= " :frame "hsides") :html-table-row-tags ("" . "") :html-xml-decl= aration (("html" . "") ("php" = =2E "\";= ?>")) :html-inline-images t :creator "Emacs 24.3.1 (Org= mode 8.2)" :with-latex t :author nil ...)) #[(element) "\302 \"\207" [element info org-export-data] 3]((sectio= n (:begin 1 :end 39 :contents-begin 1 :contents-end 39 :post-blank 0 :par= ent (org-data nil #0)) (src-block (:language "c++" :switches nil :paramet= ers nil :begin 1 :end 39 :number-lines nil :preserve-indent nil :retain-l= abels t :use-labels t :label-fmt nil :hiddenp nil :value "int j =3D 1;\n"= :post-blank 0 :post-affiliated 1 :parent #0)))) mapconcat(#[(element) "\302 \"\207" [element info org-export-data] 3]= ((section (:begin 1 :end 39 :contents-begin 1 :contents-end 39 :post-bla= nk 0 :parent (org-data nil #1)) (src-block (:language "c++" :switches nil= :parameters nil :begin 1 :end 39 :number-lines nil :preserve-indent nil = :retain-labels t :use-labels t :label-fmt nil :hiddenp nil :value "int j = =3D 1;\n" :post-blank 0 :post-affiliated 1 :parent #1)))) "") org-export-data((org-data nil (section (:begin 1 :end 39 :contents-begi= n 1 :contents-end 39 :post-blank 0 :parent #0) (src-block (:language "c++= " :switches nil :parameters nil :begin 1 :end 39 :number-lines nil :prese= rve-indent nil :retain-labels t :use-labels t :label-fmt nil :hiddenp nil= :value "int j =3D 1;\n" :post-blank 0 :post-affiliated 1 :parent #1)))) = (:export-options nil :input-file "/home/garrido/Teachdir/C++.test/test.or= g" :title "test" :html-extension "html" :html-link-org-as-html t :html-do= ctype "xhtml-strict" :html-container "div" :html-html5-fancy nil :html-li= nk-use-abs-url nil :html-link-home "" :html-link-up "" :html-mathjax "" := html-postamble auto :html-preamble t :html-head "" :html-head-extra "" :h= tml-head-include-default-style t :html-head-include-scripts t :html-table= -attributes (:border "2" :cellspacing "0" :cellpadding "6" :rules "groups= " :frame "hsides") :html-table-row-tags ("" . "") :html-xml-decl= aration (("html" . "") ("php" = =2E "\";= ?>")) :html-inline-images t :creator "Emacs 24.3.1 (Org= mode 8.2)" :with-latex t :author nil ...)) org-export-as(html nil nil nil nil) org-export-to-file(html "./test.html" nil nil nil nil nil) org-html-export-to-html() call-interactively(org-html-export-to-html nil nil) command-execute(org-html-export-to-html) command-line-1(("--eval" "(require (quote org))" "--eval" "(setq debug-= on-error t)" "--visit" "test.org" "--funcall" "org-html-export-to-html"))= command-line() normal-top-level() --------------010308070505050307030304--