emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Xavier Garrido <xavier.garrido@gmail.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Exporting C++ code block to html
Date: Fri, 27 Sep 2013 20:45:09 +0200	[thread overview]
Message-ID: <5245D235.20709@gmail.com> (raw)

[-- 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()

             reply	other threads:[~2013-09-27 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-27 18:45 Xavier Garrido [this message]
2013-09-28 12:05 ` Exporting C++ code block to html Eric Schulte
2013-09-28 15:53   ` Xavier Garrido
2013-09-28 14:11 ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5245D235.20709@gmail.com \
    --to=xavier.garrido@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).