emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting C++ code block to html
@ 2013-09-27 18:45 Xavier Garrido
  2013-09-28 12:05 ` Eric Schulte
  2013-09-28 14:11 ` Achim Gratz
  0 siblings, 2 replies; 4+ messages in thread
From: Xavier Garrido @ 2013-09-27 18:45 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 643 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org_html_export.log --]
[-- Type: text/x-log; name="org_html_export.log", Size: 9096 bytes --]

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 \x18\304\216\305ed	#\210\306 \210\307\211\x12+\207" [save-match-data-internal verbose font-lock-fontified match-data ((byte-code "\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 = 1;\n" "c++")
  org-html-do-format-code("int j = 1;\n" "c++" nil t nil)
  org-html-format-code((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 = 1;\n" :post-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.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-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 "groups" :frame "hsides") :html-table-row-tags ("<tr>" . "</tr>") :html-xml-declaration (("html" . "<?xml version=\"1.0\" encoding=\"%s\"?>") ("php" . "<?php echo \"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\" ?>\"; ?>")) :html-inline-images t :creator "<a href=\"http://www.gnu.org/software/emacs/\">Emacs</a> 24.3.1 (<a href=\"http://orgmode.org\">Org</a> mode 8.2)" :with-latex t :author nil ...))
  org-html-src-block((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 = 1;\n" :post-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))) 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-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 "groups" :frame "hsides") :html-table-row-tags ("<tr>" . "</tr>") :html-xml-declaration (("html" . "<?xml version=\"1.0\" encoding=\"%s\"?>") ("php" . "<?php echo \"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\" ?>\"; ?>")) :html-inline-images t :creator "<a href=\"http://www.gnu.org/software/emacs/\">Emacs</a> 24.3.1 (<a href=\"http://orgmode.org\">Org</a> mode 8.2)" :with-latex t :author nil ...))
  org-export-data((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 = 1;\n" :post-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.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-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 "groups" :frame "hsides") :html-table-row-tags ("<tr>" . "</tr>") :html-xml-declaration (("html" . "<?xml version=\"1.0\" encoding=\"%s\"?>") ("php" . "<?php echo \"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\" ?>\"; ?>")) :html-inline-images t :creator "<a href=\"http://www.gnu.org/software/emacs/\">Emacs</a> 24.3.1 (<a href=\"http://orgmode.org\">Org</a> mode 8.2)" :with-latex t :author nil ...))
  #[(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 = 1;\n" :post-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))))
  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 = 1;\n" :post-blank 0 :post-affiliated 1 :parent (section (:begin 1 :end 39 :contents-begin 1 :contents-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 :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :hiddenp nil :value "int j = 1;\n" :post-blank 0 :post-affiliated 1 :parent #0))) (: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-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 "groups" :frame "hsides") :html-table-row-tags ("<tr>" . "</tr>") :html-xml-declaration (("html" . "<?xml version=\"1.0\" encoding=\"%s\"?>") ("php" . "<?php echo \"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\" ?>\"; ?>")) :html-inline-images t :creator "<a href=\"http://www.gnu.org/software/emacs/\">Emacs</a> 24.3.1 (<a href=\"http://orgmode.org\">Org</a> mode 8.2)" :with-latex t :author nil ...))
  #[(element) "\302     \"\207" [element info org-export-data] 3]((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 :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :hiddenp nil :value "int j = 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-blank 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 = 1;\n" :post-blank 0 :post-affiliated 1 :parent #1)))) "")
  org-export-data((org-data nil (section (:begin 1 :end 39 :contents-begin 1 :contents-end 39 :post-blank 0 :parent #0) (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 = 1;\n" :post-blank 0 :post-affiliated 1 :parent #1)))) (: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-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 "groups" :frame "hsides") :html-table-row-tags ("<tr>" . "</tr>") :html-xml-declaration (("html" . "<?xml version=\"1.0\" encoding=\"%s\"?>") ("php" . "<?php echo \"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\" ?>\"; ?>")) :html-inline-images t :creator "<a href=\"http://www.gnu.org/software/emacs/\">Emacs</a> 24.3.1 (<a href=\"http://orgmode.org\">Org</a> 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()

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-28 15:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 18:45 Exporting C++ code block to html Xavier Garrido
2013-09-28 12:05 ` Eric Schulte
2013-09-28 15:53   ` Xavier Garrido
2013-09-28 14:11 ` Achim Gratz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).